Learn R Programming

vismeteor (version 2.0.1)

load_vmdb: Loading visual meteor observations from the data base

Description

Loads the data of visual meteor observations from a data base created with imo-vmdb.

Usage

load_vmdb_rates(
  dbcon,
  shower = NULL,
  period = NULL,
  sl = NULL,
  lim.magn = NULL,
  sun.alt.max = NULL,
  moon.alt.max = NULL,
  session.id = NULL,
  rate.id = NULL,
  withSessions = FALSE,
  withMagnitudes = FALSE
)

load_vmdb_magnitudes( dbcon, shower = NULL, period = NULL, sl = NULL, lim.magn = NULL, session.id = NULL, magn.id = NULL, withSessions = FALSE, withMagnitudes = TRUE )

Value

Both functions return a list, with

observationsdata frame, rate or magnitude observations,
sessionsdata frame; session data of observations,
magnitudestable; contingency table of meteor magnitude frequencies.

observations depends on the function call. load_vmdb_rates returns a data frame, with

rate.idunique identifier of the rate observation,
shower.codeIAU code of the shower. It is NA in case of sporadic meteors.
period.startstart of observation,
period.endend of observation,
sl.startsolarlong at start of observation,
sl.endsolarlong at start of observation,
session.idreference to the session,
freqcount of observed meteors,
lim.magnlimiting magnitude,
t.effnet observed time in hours,
fcorrection factor of cloud cover,
time.siderealsidereal time,
sun.altaltitude of the sun,
sun.azazimuth of the sun,
moon.altaltitude of the moon,
moon.azazimuth of the moon,
moon.illumillumination of the moon (0.0 .. 1.0),
field.altaltitude of the field of view (optional),
field.azazimuth of the field of view (optional),
radiant.altaltitude of the radiant (optional). The zenith attraction is already applied.
radiant.azazimuth of the radiant (optional),
magn.idreference to the magnitude observations (optional).

load_vmdb_magnitudes returns a observations data frame, with

magn.idunique identifier of the magnitude observation,
shower.codeIAU code of the shower. It is NA in case of sporadic meteors.
period.startstart of observation,
period.endend of observation,
sl.startsolarlong at start of observation,
sl.endsolarlong at start of observation,
session.idreference to the session,
freqcount of observed meteors,
magn.meanmean of magnitudes,
lim.magnlimiting magnitude (optional).

The sessions data frame contains

session.idunique identifier of the session,
longitudelocation’s longitude,
latitudelocation’s latitude,
elevationheight above mean sea level in km,
countrycountry name,
location.namelocation name,
observer.idobserver id (optional),
observer.nameobserver name (optional).

magnitudes is a contingency table of meteor magnitude frequencies. The row names refer to the id of magnitude observations. The column names refer to the magnitude.

Arguments

dbcon

database connection.

shower

character; selects by meteor shower codes. NA loads sporadic meteors.

period

time; selects a time range by minimum/maximum.

sl

numeric; selects a range of solar longitudes by minimum/maximum.

lim.magn

numeric; selects a range of limiting magnitudes by minimum/maximum.

sun.alt.max

numeric; selects the maximum altitude of the sun.

moon.alt.max

numeric; selects the maximum altitude of the moon.

session.id

integer; selects by session ids.

rate.id

integer; selects rate observations by ids.

withSessions

logical; if TRUE, also load the corresponding session data.

withMagnitudes

logical; if TRUE, also load the corresponding magnitude observations.

magn.id

integer; selects magnitude observations by ids.

Details

sl, period and lim.magn expect a vector with successive minimum and maximum values. sun.alt.max and moon.alt.max are expected to be scalar values.

References

https://pypi.org/project/imo-vmdb/

Examples

Run this code
if (FALSE) {
# create a connection to the data base
con <- dbConnect(
    PostgreSQL(),
    dbname = "vmdb",
    host = "localhost",
    user = "vmdb"
)

# load rate observations including
# session data and magnitude observations
data <- load_vmdb_rates(
    con,
    shower = 'PER',
    sl = c(135.5, 145.5),
    period = c('2015-08-01', '2015-08-31'),
    lim.magn = c(5.3, 6.7),
    withMagnitudes = TRUE,
    withSessions = TRUE
)

# load magnitude observations including
# session data and magnitude observations
data <- load_vmdb_magnitudes(
    con,
    shower = 'PER',
    sl = c(135.5, 145.5),
    period = c('2015-08-01', '2015-08-31'),
    lim.magn = c(5.3, 6.7),
    withMagnitudes = TRUE,
    withSessions = TRUE
)
}

Run the code above in your browser using DataLab