Calculate the illuminated fraction of the Moon

Description

Determine how much of the lunar disc is illuminated at the time of an observation or proposed lunar event.

Usage

moonphase(time, timezone, calendar)

Arguments

time

One or more UT Julian dates, or local date-time strings in the form YYYY/MM/DD HH:MM:SS.

timezone

Timezone for civil timestamps. Use UTC or a fixed offset for dates before 1900. See time2jd for named zones and offsets.

calendar

Calendar for civil dates. Use "G" for Gregorian or "J" for Julian.

Details

Lunar illumination can be used to screen events for a nearly full Moon. The routine converts calendar input to UT Julian dates when needed and obtains the illuminated fraction from the lunar phenomena calculation in Swiss Ephemeris. Values near zero indicate a nearly new Moon and values near one a nearly full Moon; the fraction alone cannot distinguish waxing from waning.

Astronomical positions require Swiss Ephemeris files covering the epoch. We recommend installing swephRdata; see skyscapeR-package for setup.

Value

Numeric illuminated fraction of the lunar disc, one value per input time. At full illumination the fraction is 1.

Validation

In A02, all 108 illuminated fractions agreed with the direct Swiss Ephemeris calculation across 54 epochs and two file generations. This checks the R interface. Observed lunar photometry was outside the study. See the A02 study in the skyscapeR technical manual.

Scientific validation

A07 examines independent crossover selection and sensitivity to the illumination cutoff. A07 scientific validation.

Scientific checks

See Also

swe_pheno_ut, EFM

Examples

if (requireNamespace("swephRdata", quietly = TRUE)) {
  # Moonphase at noon GMT on Christmas day 2018:
  moonphase('2018/12/25 12:00:00', 'GMT')
}