SKYCALC module¶
Introduction¶
skycalc is a module that mostly provides an interface to the astroplan package for observations planning. It has a table() routine that emulates the hour angle listing of John Thorstensen’s skycalc program. It also contains a simple routine for returning airmass from an image header (allowing for different ways of storing it), as well as a routine for returning parallactic angle
Module functions¶
- pyvista.skycalc.airmass(header, obs=None)[source]¶
Get airmass from header cards
Tries AIRMASS, AIRMAS, and SECZ (in that order) first otherwise computes from DATE-OBS, RA, DEC if obs= is given
- pyvista.skycalc.calendar(obs='apo', tz='US/Mountain', year=2023, plot=False, sun_dt=10.0)[source]¶
Get LST at midnight and moon phase and position for every night of a calendar year”
- Parameters
obs (str, default='apo') – observatory to compute for
tz (str, default='US/Mountain') – timezone
year (float, default=2023) – year to calculate for
plot (bool, default=False) – if True, plot LST midnight for year
- pyvista.skycalc.object(ras=[], decs=[], names=[], file=None, obs='apo', date=None, plot=False, tz='US/Mountain')[source]¶
Get airmass table for specified object position, observatory, date
- Parameters
ras (float, str, or array-like) – input RA(s) of objects (sexagesimal hh:mm:ss or degrees)
decs (float, str, or array-like) – input DEC(s) of objects (sexagesimal dd:mm:ss or degrees)
names (str, or array-like) – name(s) of objects
file (str) – filename to read name, ra, dec from
obs (str) – observatory for site
plot (bool) – show plots of airmass and parallactic angle?
tz (str) – timezone
- pyvista.skycalc.parang(h, dec, site='APO')[source]¶
Calculate parallactic angle from HA, DEC, site
- Parameters
ha (hour angle, hrs) –
dec (declination, degrees) –
site (str, site name, default='APO') –
- Return type
parallactic angle in degrees
- pyvista.skycalc.parang_header(hd, obs='apo', tz='US/Mountain')[source]¶
Calculates parallactic angle given header information DATE-OBS, RA, DEC, plus observatory
- pyvista.skycalc.readtui(file)[source]¶
Opens and parses TUI-type file and returns columns 1, 2, and 3 as lists (e.g. names, ras, decs)