libTheSky
Routines to compute sky positions of Sun, Moon, planets and more
Loading...
Searching...
No Matches
Functions/Subroutines
thesky_visibility Module Reference

Procedures to determine the visibility of objects. More...

Functions/Subroutines

subroutine best_planet_xsmag (jdin, plid, jdout, xsmag, rscwarn)
 Find the moment (JD) of optimal excess magnitude for a planet, i.e. the lowest mag - lim.mag.
 
real(double) function best_planet_visibility (jd, pl)
 Find a rough indication for the best moment (JD) to observe a planet on a given day (jd). Start out by demanding that Sun alt < -6deg, but relax this if problematic. This often results in the moment where Sun alt is indeed -6deg.
 
subroutine planet_visibility_tonight (jd, pl, sunalt, plalt, comp, plvis, plazs, rts, tts, sts, ras, tas, sas, rscwarn)
 Compute when a given planet is visible in a given night.
 
logical function comet_invisible (jd, cometid, mlim, minalt)
 Cheap function to determine whether a comet is invisible at a given time, based on a magnitude and altitude limit.
 
real(double) function transitalt (lat, dec)
 Compute the transit altitude of an object with given declination for an observer with a given geographic latitude.
 
subroutine best_obs_date_ra (year, ra, accuracy, mon, dy)
 Compute the best date in the year to observe an object with a given right ascension.
 
real(double) function get_dra_obj (jd)
 Compute the difference between a given right ascension and the RA of the Sun, used privately by best_obs_date_ra()
 
real(double) function airmass (alt)
 Compute the airmass for a celestial object with a given TRUE altitude.
 
real(double) function airmass_la (alt)
 Compute the airmass for a celestial object with a given apparent altitude; low-accuracy alternative for airmass()
 
real(double) function extinction_magpam (ele)
 Compute the extinction in magnitdes per unit airmass for an observer with given elevation.
 
real(double) function extinction_mag (alt, ele)
 Compute the extinction in magnitdes for an observer with given elevation and an object with given TRUE altitude.
 
real(double) function extinction_fac (alt, ele)
 Compute the extinction factor for an observer with given elevation and an object with given altitude.
 
real(double) function limmag_full (year, month, obselev, obslat, sunalt, sunelon, moonphase, moonalt, moonelon, objalt, humid, airtemp, snrat, verbosity)
 Calculate limiting magnitude based on Sun and Moon positions and phase, and on the altitude of the observed object.
 
subroutine limmag_extinction (month, obslat, obselev, objalt, relhum, temp, band1, band2, extcoef, extmag)
 Calculate limiting magnitude based on Sun altitude and Moon phase.
 
subroutine limmag_skybrightness (year, sunalt, sunelon, moonphase, moonalt, moonelon, objalt, band1, band2, extcoef, skybr)
 Calculate sky brightness based on Sun altitude and Moon phase.
 
real(double) function limmag_jd (jd, objra, objdec, objalt, lat, height)
 Calculate limiting magnitude based on JD and object altitude, wrapper for limmag_full()
 
real(double) function limmag_zenith_jd (jd, lat, lon, height)
 Calculate limiting magnitude for the local zenith, based on JD and observer's location.
 
real(double) function limmag_jd_pl (jd, pl)
 Calculate limiting magnitude based on JD and planet ID, wrapper for limmag_jd()
 
real(double) function limmag_sun_airmass (month, sunalt, sunaz, objalt, objaz, lat, height)
 Calculate limiting magnitude based on Sun altitude and object altitude (airmass). Assumes New Moon.
 
real(double) function limmag_sun (sunalt)
 Calculate limiting magnitude, based on the altitude of the Sun. Simplified version of limmag_full()
 
real(double) function pl_xsmag (jd, pl)
 Compute the excess magnitude for planet pl at JD, considering Sun, Moon and airmass.
 
real(double) function pl_xsmag_pl (jd)
 Compute the excess magnitude at JD, wrapper for pl_xsmag() for solvers. The planet ID pl0 is passed through module planetdata.
 
real(double) function pl_xsmag_la (jd, pl)
 Compute the excess magnitude for planet pl at JD, considering airmass and Sun alt - low-accuracy version of pl_xsmag()
 
real(double) function pl_xsmag_la_pl (jd)
 Compute the excess magnitude at JD, wrapper for pl_xsmag_la() for solvers. The planet ID pl0 is passed through module planetdata.
 
real(double) function aperture (xsmag, pupil, tc)
 Aperture diameter in centimetres needed to observe an object with given excess magnitude (0: no instrument needed)
 
real(double) function skybrightness_mas2_from_mlim (mlim)
 Convert naked-eye visual limiting magnitude (V) to sky surface brightness in (B) magnitudes per square arcsecond.
 
real(double) function skybrightness_mlim_from_mas2 (skybright)
 Convert sky surface brightness in (B) magnitudes per square arcsecond to naked-eye visual limiting magnitude (V)
 
elemental real(double) function skybrightness_mlim_from_cdm2 (cdm2)
 Convert sky brightness in candela per square meter to naked-eye visual limiting magnitude (V)
 
elemental real(double) function skybrightness_cdm2_from_mlim (mlim)
 Convert limiting visual magnitude to sky brightness in candela per square meter.
 
elemental real(double) function skybrightness_cdm2_from_nl (nl)
 Convert sky brightness in nanolambert to candela per square meter.
 
elemental real(double) function skybrightness_nl_from_cdm2 (cdm2)
 Convert sky brightness in candela per square meter to nanolambert.
 

Detailed Description

Procedures to determine the visibility of objects.

Function/Subroutine Documentation

◆ airmass()

real(double) function thesky_visibility::airmass ( real(double), intent(in)  alt)

Compute the airmass for a celestial object with a given TRUE altitude.

Parameters
altTRUE altitude of object (radians)
Note
  • Results are 1 <= airmass <~ 38.35; return ~1000 for h<-34'
  • Maximum supposed error (at the horizon) of 0.0037 air mass
See also
Young (1994); https://en.wikipedia.org/wiki/Air_mass_%28astronomy%29#Interpolative_formulas

Definition at line 510 of file visibility.f90.

References airmass().

Referenced by airmass(), extinction_mag(), thesky_daylight::extinction_sun(), and pl_xsmag_la().

Here is the call graph for this function:

◆ airmass_la()

real(double) function thesky_visibility::airmass_la ( real(double), intent(in)  alt)

Compute the airmass for a celestial object with a given apparent altitude; low-accuracy alternative for airmass()

Parameters
altApparent altitude of object (radians)
Note
  • Results are 1 <= airmass <~ 37.92; return ~1000 for h<0
See also
Kasten and Young (1989); http://en.wikipedia.org/wiki/Airmass_%28astronomy%29#Interpolative_formulas

Definition at line 543 of file visibility.f90.

References airmass_la().

Referenced by airmass_la().

Here is the call graph for this function:

◆ aperture()

real(double) function thesky_visibility::aperture ( real(double), intent(in)  xsmag,
real(double), intent(in), optional  pupil,
real(double), intent(in), optional  tc 
)

Aperture diameter in centimetres needed to observe an object with given excess magnitude (0: no instrument needed)

Parameters
xsmagExcess magnitude: magnitude of an object MINUS limiting magnitude (>0: too weak for naked eye)
pupilPupil diameter (mm, default: 6)
tcTransmission coefficient of the instrument (default: 0.8 = 80%)
Note
This routine should be used as an indication only - no hard facts...
See also

Definition at line 1300 of file visibility.f90.

References aperture().

Referenced by aperture().

Here is the call graph for this function:

◆ best_obs_date_ra()

subroutine thesky_visibility::best_obs_date_ra ( integer, intent(in)  year,
real(double), intent(in)  ra,
integer, intent(in)  accuracy,
integer, intent(out)  mon,
integer, intent(out)  dy 
)

Compute the best date in the year to observe an object with a given right ascension.

Parameters
yearYear (CE)
RARight ascension of the object
accuracyGet an accurate (but more expensive) result: 0-no, 1-yes
monMonth of year (output)
dyDay of month (output)

Definition at line 435 of file visibility.f90.

References get_dra_obj().

Here is the call graph for this function:

◆ best_planet_visibility()

real(double) function thesky_visibility::best_planet_visibility ( real(double), intent(in)  jd,
integer, intent(in)  pl 
)

Find a rough indication for the best moment (JD) to observe a planet on a given day (jd). Start out by demanding that Sun alt < -6deg, but relax this if problematic. This often results in the moment where Sun alt is indeed -6deg.

Parameters
jdJulian day to compute best moment for
plPlanet to compute visibility for (0-Moon, 1-Mercury, etc.)
Return values
best_planet_visibilityBest moment to observe the planet (JD)

Definition at line 126 of file visibility.f90.

References best_planet_visibility(), thesky_planetdata::nplanpos, thesky_planets::planet_position(), thesky_planetdata::planpos, thesky_riset::riset(), and thesky_local::tz.

Referenced by best_planet_visibility().

Here is the call graph for this function:

◆ best_planet_xsmag()

subroutine thesky_visibility::best_planet_xsmag ( real(double), intent(in)  jdin,
integer, intent(in)  plid,
real(double), intent(out)  jdout,
real(double), intent(out), optional  xsmag,
logical, intent(in), optional  rscwarn 
)

Find the moment (JD) of optimal excess magnitude for a planet, i.e. the lowest mag - lim.mag.

Parameters
jdinJulian day to compute best moment for
plIDPlanet to compute visibility for (0-Moon, 1-Mercury, etc.)
jdoutMoment of best excess magnitude (output)
xsmagExcess magnitude at that moment (magnitude - limiting magnitude; <0: ~visible to the naked eye) (output)
rsCWarnPrint convergence warnings in riset() (optional; default = true)

Definition at line 77 of file visibility.f90.

References thesky_datetime::gettz(), thesky_planetdata::pl0, pl_xsmag_pl(), and planet_visibility_tonight().

Here is the call graph for this function:

◆ comet_invisible()

logical function thesky_visibility::comet_invisible ( real(double), intent(in)  jd,
integer, intent(in)  cometid,
real(double), intent(in)  mlim,
real(double), intent(in)  minalt 
)

Cheap function to determine whether a comet is invisible at a given time, based on a magnitude and altitude limit.

Parameters
jdJulian day for calculation
cometIDComet ID
mlimMaximum magnitude, below which the comet is defined as visible (deg)
minaltMinimum transit altitude, above which the comet is defined as visible (deg)
Note
The comet may still be invisible if comet_invisible=.false., e.g. when it's too close to the Sun

Definition at line 366 of file visibility.f90.

References comet_invisible(), thesky_cometdata::cometdiedatp, thesky_cometdata::cometelems, thesky_comets::cometgc(), thesky_coordinates::ecl_2_eq(), thesky_local::lat0, thesky_planetdata::planpos, and transitalt().

Referenced by comet_invisible().

Here is the call graph for this function:

◆ extinction_fac()

real(double) function thesky_visibility::extinction_fac ( real(double), intent(in)  alt,
real(double), intent(in), optional  ele 
)

Compute the extinction factor for an observer with given elevation and an object with given altitude.

Parameters
altAltitude of object (radians)
eleEvelation of the observer above sea level (metres; optional)
Note
- extinction_fac = 1: no extinction, extinction_fac > 1 extinction.
  • Hence, the flux, corrected for extinction, should be f' = f / extinction_fac(alt,ele)
  • Assumed is the response of the rods in the human retina, hence night vision
See also
function extinction_mag()

Definition at line 638 of file visibility.f90.

References extinction_fac(), and extinction_mag().

Referenced by extinction_fac().

Here is the call graph for this function:

◆ extinction_mag()

real(double) function thesky_visibility::extinction_mag ( real(double), intent(in)  alt,
real(double), intent(in), optional  ele 
)

Compute the extinction in magnitdes for an observer with given elevation and an object with given TRUE altitude.

Parameters
altAltitude of object (radians)
eleEvelation of the observer above sea level (metres; optional)
Note
- The magnitude of an object corrected for airmass should be m' = m + extinction_mag(alt,ele)
  • Assumed is the response of the rods in the human retina, hence night vision
See also
Functions extinction_magPam() and airmass()

Definition at line 608 of file visibility.f90.

References airmass(), extinction_mag(), and extinction_magpam().

Referenced by extinction_fac(), and extinction_mag().

Here is the call graph for this function:

◆ extinction_magpam()

real(double) function thesky_visibility::extinction_magpam ( real(double), intent(in)  ele)

Compute the extinction in magnitdes per unit airmass for an observer with given elevation.

Parameters
eleEvelation of the observer above sea level (metres)
Note

  • The magnitude of an object corrected for airmass should be m' = m + extinction_magPam(ele) * airmass(alt) (see function extinction_mag())
  • This assumes night vision, using the rods in the human eye's retina. Hence, this will not hold for the Sun! (There is some correspondence when only considering ~420-580 nm, which is roughly the sensitivity band of the rods.)
See also
Green, ICQ 14, 55 (1992), http://www.icq.eps.harvard.edu/ICQExtinct.html, (for lambda=510 nm!), based on Hayes & Latham, ApJ 197, 593 (1975): http://esoads.eso.org/abs/1975ApJ...197..593H (wavelength dependent, for Wega)

Definition at line 579 of file visibility.f90.

References extinction_magpam().

Referenced by extinction_mag(), extinction_magpam(), and pl_xsmag_la().

Here is the call graph for this function:

◆ get_dra_obj()

real(double) function thesky_visibility::get_dra_obj ( real(double), intent(in)  jd)

Compute the difference between a given right ascension and the RA of the Sun, used privately by best_obs_date_ra()

Parameters
jdJulian day
Note
  • Get (RA_obj - RA_sun) for object with RA ra, passed via the common block best_obs_RA

Definition at line 479 of file visibility.f90.

References get_dra_obj(), thesky_planets::planet_position(), and thesky_planetdata::planpos.

Referenced by best_obs_date_ra(), and get_dra_obj().

Here is the call graph for this function:

◆ limmag_extinction()

subroutine thesky_visibility::limmag_extinction ( integer, intent(in)  month,
real(double), intent(in)  obslat,
real(double), intent(in)  obselev,
real(double), intent(in)  objalt,
real(double), intent(in)  relhum,
real(double), intent(in)  temp,
integer, intent(in)  band1,
integer, intent(in)  band2,
real(double), dimension(5), intent(out)  extcoef,
real(double), dimension(5), intent(out)  extmag 
)

Calculate limiting magnitude based on Sun altitude and Moon phase.

Parameters
monthMonth of observation (for approximate Sun RA)
obsLatLatitude of the observed (rad)
obsElevElevation of the observer (m)
objAltAltitude of the observed object (rad)
relHumRelative humidity
tempAir temperature
band1First of UBVRI bands to compute (1-5); compute band1-band2
band2Last of UBVRI bands to compute (1-5); compute band1-band2
extCoefAtmospheric extinction for UBVRI (output)
extMagDelta magnitude due to atmospheric extinction for UBVRI (output)
See also
BASIC program VISLIMIT.BAS by Bradley E. Schaefer, Sky and Telescope, May 1998, p.57, in turn based on Schaefer Sky&Tel 78, 522 (1989).

Definition at line 769 of file visibility.f90.

Referenced by limmag_full().

◆ limmag_full()

real(double) function thesky_visibility::limmag_full ( integer, intent(in)  year,
integer, intent(in)  month,
real(double), intent(in)  obselev,
real(double), intent(in)  obslat,
real(double), intent(in)  sunalt,
real(double), intent(in)  sunelon,
real(double), intent(in)  moonphase,
real(double), intent(in)  moonalt,
real(double), intent(in)  moonelon,
real(double), intent(in)  objalt,
real(double), intent(in), optional  humid,
real(double), intent(in), optional  airtemp,
real(double), intent(in), optional  snrat,
integer, intent(in), optional  verbosity 
)

Calculate limiting magnitude based on Sun and Moon positions and phase, and on the altitude of the observed object.

Parameters
yearYear of observation (for solar cycle)
monthMonth of observation (for approximate Sun RA)
obsElevElevation of the observer (m)
obsLatLatitude of the observer (rad)
sunAltAltitude of the Sun (rad)
sunElonElongation object-Sun (rad)
moonPhasePhase of the Moon (fraction)
moonAltAltitude of the Moon (rad)
moonElonElongation object-Moon (rad)
objAltAltitude of the observed object (rad)
humidRelative humidity (%; optional, default: 70)
airTempAir temperature (degrees Celsius; optional, default: 10)
snratSnellen ratio for vision (optional, default: 1)
verbosityVerbosity (optional, default: 0=quiet)
Return values
limmag_fullLimiting magnitude - return >= 99 if the object is below the horizon
See also
BASIC program VISLIMIT.BAS by Bradley E. Schaefer, Sky and Telescope, May 1998, p.57, in turn based on Schaefer Sky&Tel 78, 522 (1989).
See also
Knoll, Tousey and Hulburt, J.Opt.Soc.Am. 36, 480 (1946); Hecht J.Opt.Soc.Am. 37, 59 (1947), Eq.3; Schaefer PASP 102, 212 (1990), Eq.2

Definition at line 684 of file visibility.f90.

References limmag_extinction(), limmag_full(), and limmag_skybrightness().

Referenced by limmag_full(), limmag_jd(), and limmag_sun_airmass().

Here is the call graph for this function:

◆ limmag_jd()

real(double) function thesky_visibility::limmag_jd ( real(double), intent(in), value  jd,
real(double), intent(in), value  objra,
real(double), intent(in), value  objdec,
real(double), intent(in), value  objalt,
real(double), intent(in), optional  lat,
real(double), intent(in), optional  height 
)

Calculate limiting magnitude based on JD and object altitude, wrapper for limmag_full()

Parameters
jdJulian day
objRARight ascension of the observed object (rad)
objDecDeclination of the observed object (rad)
objAltAltitude of the observed object (rad)
latLatitude of the observer (optional; rad)
heightHeight/altitude of the observer above sea level (optional; metres)
Return values
limmag_jdLimiting magnitude
Note
Using observer's location from module TheSky_local; overruled by optional dummy variables lat and height

Definition at line 952 of file visibility.f90.

References thesky_local::day, thesky_local::height, thesky_local::lat0, limmag_full(), limmag_jd(), thesky_local::month, thesky_planetdata::nplanpos, thesky_planets::planet_position_la(), thesky_planetdata::planpos, and thesky_local::year.

Referenced by limmag_jd(), limmag_jd_pl(), limmag_zenith_jd(), and pl_xsmag().

Here is the call graph for this function:

◆ limmag_jd_pl()

real(double) function thesky_visibility::limmag_jd_pl ( real(double), intent(in)  jd,
integer, intent(in)  pl 
)

Calculate limiting magnitude based on JD and planet ID, wrapper for limmag_jd()

Parameters
jdJulian day
plPlanet ID
Return values
limmag_jd_plLimiting magnitude
Note
Using observer's location from module TheSky_local

Definition at line 1040 of file visibility.f90.

References limmag_jd(), limmag_jd_pl(), thesky_planetdata::nplanpos, thesky_planets::planet_position_la(), and thesky_planetdata::planpos.

Referenced by limmag_jd_pl().

Here is the call graph for this function:

◆ limmag_skybrightness()

subroutine thesky_visibility::limmag_skybrightness ( integer, intent(in)  year,
real(double), intent(in), value  sunalt,
real(double), intent(in), value  sunelon,
real(double), intent(in), value  moonphase,
real(double), intent(in), value  moonalt,
real(double), intent(in), value  moonelon,
real(double), intent(in), value  objalt,
integer, intent(in)  band1,
integer, intent(in)  band2,
real(double), dimension(5), intent(in)  extcoef,
real(double), dimension(5), intent(out)  skybr 
)

Calculate sky brightness based on Sun altitude and Moon phase.

Parameters
yearYear CE (for the solar cycle)
objAltAltitude of the observed object (rad)
moonAltMoon altitude (rad)
sunAltSun altitude (rad)
moonPhaseMoon illuminated fraction (0-1)
moonElonMoon elongation from observed object (rad)
sunElonSun elongation from observed object (rad)
band1First of UBVRI bands to compute (1-5); compute band1-band2
band2Last of UBVRI bands to compute (1-5); compute band1-band2
extCoefExtinction for UBVRI
skyBrSky brightness for UBVRI in nanoLambert (output)
See also
BASIC program VISLIMIT.BAS by Bradley E. Schaefer, Sky and Telescope, May 1998, p.57, in turn based on Schaefer Sky&Tel 78, 522 (1989).

Definition at line 840 of file visibility.f90.

References thesky_moon::moonmagn().

Referenced by limmag_full().

Here is the call graph for this function:

◆ limmag_sun()

real(double) function thesky_visibility::limmag_sun ( real(double), intent(in)  sunalt)

Calculate limiting magnitude, based on the altitude of the Sun. Simplified version of limmag_full()

Parameters
sunAltAltitude of the Sun (rad)
Return values
limmag_sunLimiting magnitude
Note
  • Mag depends only on sunAlt in rad
  • assume object in zenith, no moon (am=180), humidity 50%, T=10degC, lat=45deg, sn=1
See also
http://www.go.ednet.ns.ca/~larry/astro/vislimit.html, a JavaScript version of a BASIC program by Bradley E. Schaefer, Sky and Telescope, May 1998, p.57

Definition at line 1134 of file visibility.f90.

References limmag_sun().

Referenced by limmag_sun(), and pl_xsmag_la().

Here is the call graph for this function:

◆ limmag_sun_airmass()

real(double) function thesky_visibility::limmag_sun_airmass ( integer, intent(in)  month,
real(double), intent(in), value  sunalt,
real(double), intent(in), value  sunaz,
real(double), intent(in), value  objalt,
real(double), intent(in), value  objaz,
real(double), intent(in), optional  lat,
real(double), intent(in), optional  height 
)

Calculate limiting magnitude based on Sun altitude and object altitude (airmass). Assumes New Moon.

Parameters
monthMonth of the year
sunAltAltitude of the Sun (rad)
sunAzAzimuth of the Sun (rad)
objAltAltitude of the observed object (rad)
objAzAzimuth of the observed object (rad)
latLatitude of the observer (optional; rad)
heightHeight/altitude of the observer above sea level (optional; metres)
Return values
limmag_sun_airmassLimiting magnitude
Note
Using observer's location from module TheSky_local; overruled by optional dummy variables lat and height

Definition at line 1082 of file visibility.f90.

References thesky_local::height, thesky_local::lat0, limmag_full(), limmag_sun_airmass(), thesky_local::month, and thesky_local::year.

Referenced by limmag_sun_airmass().

Here is the call graph for this function:

◆ limmag_zenith_jd()

real(double) function thesky_visibility::limmag_zenith_jd ( real(double), intent(in)  jd,
real(double), intent(in)  lat,
real(double), intent(in)  lon,
real(double), intent(in)  height 
)

Calculate limiting magnitude for the local zenith, based on JD and observer's location.

Parameters
jdJulian day
latLatitude of the observer (rad)
lonLongitude of the observer (rad)
heightHeight/altitude of the observer above sea level (metres)
Return values
limmag_zenith_jdLimiting magnitude

Definition at line 1007 of file visibility.f90.

References thesky_datetime::calc_gmst(), thesky_coordinates::horiz2eq(), limmag_jd(), and limmag_zenith_jd().

Referenced by limmag_zenith_jd().

Here is the call graph for this function:

◆ pl_xsmag()

real(double) function thesky_visibility::pl_xsmag ( real(double), intent(in)  jd,
integer, intent(in)  pl 
)

Compute the excess magnitude for planet pl at JD, considering Sun, Moon and airmass.

Parameters
jdJulian day for moment of interest
plPlanet ID (0-Moon, 1-Mer, 8-Nep, >10-comet
Note
  • The excess magnitude is defined as the magnitude of an object MINUS the limiting magnitude
    • xsmag < 0 - object is visible (in theory!) with the naked eye
  • The magnitude is corrected for extinction due to airmass, but for sea level
  • The limiting magnitude here solely depends on the Sun's altitude, simplified expression (especially, no Moon!)
  • This routine should be used as an indication only - no hard facts...

Definition at line 1180 of file visibility.f90.

References limmag_jd(), pl_xsmag(), thesky_planets::planet_position_la(), and thesky_planetdata::planpos.

Referenced by pl_xsmag(), and pl_xsmag_pl().

Here is the call graph for this function:

◆ pl_xsmag_la()

real(double) function thesky_visibility::pl_xsmag_la ( real(double), intent(in)  jd,
integer, intent(in)  pl 
)

Compute the excess magnitude for planet pl at JD, considering airmass and Sun alt - low-accuracy version of pl_xsmag()

Parameters
jdJulian day for moment of interest
plPlanet ID (0-Moon, 1-Mer, 8-Nep, >10-comet
Note
  • The excess magnitude is defined as the magnitude of an object MINUS the limiting magnitude
    • xsmag < 0 - object is visible (in theory!) with the naked eye
  • The magnitude is corrected for extinction due to airmass, but for sea level
  • The limiting magnitude here solely depends on the Sun's altitude, simplified expression (especially, no Moon!)

Definition at line 1238 of file visibility.f90.

References airmass(), extinction_magpam(), limmag_sun(), pl_xsmag_la(), thesky_planets::planet_position_la(), and thesky_planetdata::planpos.

Referenced by pl_xsmag_la(), and pl_xsmag_la_pl().

Here is the call graph for this function:

◆ pl_xsmag_la_pl()

real(double) function thesky_visibility::pl_xsmag_la_pl ( real(double), intent(in)  jd)

Compute the excess magnitude at JD, wrapper for pl_xsmag_la() for solvers. The planet ID pl0 is passed through module planetdata.

Parameters
jdJulian day for moment of interest

Definition at line 1270 of file visibility.f90.

References thesky_planetdata::pl0, pl_xsmag_la(), and pl_xsmag_la_pl().

Referenced by pl_xsmag_la_pl().

Here is the call graph for this function:

◆ pl_xsmag_pl()

real(double) function thesky_visibility::pl_xsmag_pl ( real(double), intent(in)  jd)

Compute the excess magnitude at JD, wrapper for pl_xsmag() for solvers. The planet ID pl0 is passed through module planetdata.

Parameters
jdJulian day for moment of interest

Definition at line 1212 of file visibility.f90.

References thesky_planetdata::pl0, pl_xsmag(), and pl_xsmag_pl().

Referenced by best_planet_xsmag(), and pl_xsmag_pl().

Here is the call graph for this function:

◆ planet_visibility_tonight()

subroutine thesky_visibility::planet_visibility_tonight ( real(double), intent(in)  jd,
integer, intent(in)  pl,
real(double), intent(in)  sunalt,
real(double), intent(in)  plalt,
integer, intent(in)  comp,
real(double), dimension(2), intent(out)  plvis,
real(double), dimension(2), intent(out), optional  plazs,
real(double), dimension(5), intent(out), optional  rts,
real(double), dimension(5), intent(out), optional  tts,
real(double), dimension(5), intent(out), optional  sts,
real(double), dimension(5), intent(out), optional  ras,
real(double), dimension(5), intent(out), optional  tas,
real(double), dimension(5), intent(out), optional  sas,
logical, intent(in), optional  rscwarn 
)

Compute when a given planet is visible in a given night.

Parameters
jdJulian day for calculation
plPlanet ID (1-2, 4-8 for Mer-Ven, Mar-Nep)
sunAltSun altitude below which planet is visible (deg; e.g. -6.d0)
plaltPlanet altitude above which planet is visible (deg; e.g. 5.d0)
compCompute: 1-compute twilight/planet at plalt events only (1,4), 2-include actual rise/set times (2,5) 11, 12 = 1, 2 + compute only for today, not tomorrow
plvisPlanet visibility times (hours): 1-begin, 2-end; plvis(1)*plvis(2) = 0 when invisible (output)
plazsPlanet visibility azimuths (rad): 1-begin of visibility, 2-end of visibility (output)
rts"Rise times": 1-twilight (Sun at sunAlt), 2-Sun rise/set, 4-planet at plalt, 5-planet rise/set (output)
ttsTransit times: 1-2, of Sun, 4-5 of planet (output)
sts"Set times": 1-twilight (Sun at sunAlt), 2-Sun rise/set, 4-planet at plalt, 5-planet rise/set (output)
rasRise azimuths: 1-2, of Sun, 4-5 of planet (output)
tasTransit altitudes: 1-2, of Sun, 4-5 of planet (output)
sasSet azimuths: 1-2, of Sun, 4-5 of planet (output)
rsCWarnPrint convergence warnings in riset() (optional; default = true)

Definition at line 216 of file visibility.f90.

References thesky_riset::riset().

Referenced by best_planet_xsmag().

Here is the call graph for this function:

◆ skybrightness_cdm2_from_mlim()

elemental real(double) function thesky_visibility::skybrightness_cdm2_from_mlim ( real(double), intent(in)  mlim)

Convert limiting visual magnitude to sky brightness in candela per square meter.

Parameters
mlimNaked-eye visual limiting magnitude (V)
Return values
Skybrightness in cd/m^2
Note
Inverse of skybrightness_mlim_from_cdm2()

Definition at line 1409 of file visibility.f90.

References skybrightness_cdm2_from_mlim(), and skybrightness_cdm2_from_nl().

Referenced by skybrightness_cdm2_from_mlim().

Here is the call graph for this function:

◆ skybrightness_cdm2_from_nl()

elemental real(double) function thesky_visibility::skybrightness_cdm2_from_nl ( real(double), intent(in)  nl)

Convert sky brightness in nanolambert to candela per square meter.

Parameters
nLSky brightness in nanolambert (nL)
Return values
Skybrightness in candela per square meter (cd/m^2)

Definition at line 1432 of file visibility.f90.

References skybrightness_cdm2_from_nl().

Referenced by skybrightness_cdm2_from_mlim(), and skybrightness_cdm2_from_nl().

Here is the call graph for this function:

◆ skybrightness_mas2_from_mlim()

real(double) function thesky_visibility::skybrightness_mas2_from_mlim ( real(double), intent(in)  mlim)

Convert naked-eye visual limiting magnitude (V) to sky surface brightness in (B) magnitudes per square arcsecond.

Parameters
MlimNaked-eye visual limiting magnitude (V)
Return values
skybrightness_mas2_from_mlimSky surface brightness in (B) magnitudes per square arcsecond
See also
http://adsabs.harvard.edu/abs/1990PASP..102..212S
Note
Sky surface brightness is sometimes referred to as sqm (which is in fact a device to measure it)

Definition at line 1336 of file visibility.f90.

References skybrightness_mas2_from_mlim().

Referenced by skybrightness_mas2_from_mlim().

Here is the call graph for this function:

◆ skybrightness_mlim_from_cdm2()

elemental real(double) function thesky_visibility::skybrightness_mlim_from_cdm2 ( real(double), intent(in)  cdm2)

Convert sky brightness in candela per square meter to naked-eye visual limiting magnitude (V)

Parameters
cdm2Sky brightness in cd/m^2
Return values
Naked-eyevisual limiting magnitude (V)
Note
Adapted from Weaver (1947) and Garsteng (1986):
  • shift to match data by Weaver (1947): 7.930 -> 7.706; 4.305 -> 4.115;
  • use candela per square meter instead of nanolambert.

Definition at line 1385 of file visibility.f90.

References skybrightness_mlim_from_cdm2(), and skybrightness_nl_from_cdm2().

Referenced by skybrightness_mlim_from_cdm2().

Here is the call graph for this function:

◆ skybrightness_mlim_from_mas2()

real(double) function thesky_visibility::skybrightness_mlim_from_mas2 ( real(double), intent(in)  skybright)

Convert sky surface brightness in (B) magnitudes per square arcsecond to naked-eye visual limiting magnitude (V)

Parameters
skyBrightSky surface brightness in (B) magnitudes per square arcsecond
Return values
skybrightness_mlim_from_mas2Naked-eye visual limiting magnitude (V)
See also
http://adsabs.harvard.edu/abs/1990PASP..102..212S
Note
Sky surface brightness is sometimes referred to as sqm (which is in fact a device to measure it)

Definition at line 1362 of file visibility.f90.

References skybrightness_mlim_from_mas2().

Referenced by skybrightness_mlim_from_mas2().

Here is the call graph for this function:

◆ skybrightness_nl_from_cdm2()

elemental real(double) function thesky_visibility::skybrightness_nl_from_cdm2 ( real(double), intent(in)  cdm2)

Convert sky brightness in candela per square meter to nanolambert.

Parameters
cdm2Sky brightness in candela per square meter (cd/m^2)
Return values
Skybrightness in nanolambert (nL)

Definition at line 1450 of file visibility.f90.

References skybrightness_nl_from_cdm2().

Referenced by skybrightness_mlim_from_cdm2(), and skybrightness_nl_from_cdm2().

Here is the call graph for this function:

◆ transitalt()

real(double) function thesky_visibility::transitalt ( real(double), intent(in)  lat,
real(double), intent(in)  dec 
)

Compute the transit altitude of an object with given declination for an observer with a given geographic latitude.

Parameters
latGeographic latitude of the observer (-pi/2 - pi/2; rad)
decDeclination of the object (-pi/2 - pi/2; rad)

Definition at line 414 of file visibility.f90.

References transitalt().

Referenced by comet_invisible(), and transitalt().

Here is the call graph for this function: