Armilla

Observer

Observer is a Python package for computing nightly almanacs and plotting airmass charts for astronomical targets.

Features

  • Computes sunset and sunrise times, 12 and 18 degree twilights for a given date and site (observatory)
  • Computes moon rise, set and percentage of illumination

Dependencies

How do I use it?

  1. Download Observer.
  2. Unzip it.
  3. Rename the directory/folder to observer.
  4. Move the observer directory to somewhere in your Python path.
  5. import observer

Example Usage

>>> import observer
>>> obs = observer.Observer('keck')
>>> hudf = obs.target('HUDF', '3 32 39.0', '-27 47 29.1')
>>> ms1054 = obs.target('MS1054', '10 56 59.99', '-03 37 36.0')
>>> cl1256 = obs.target('CL1256', '12 55 33.76', '01 04 3.72')
>>> obs.almanac('2010/01/12')
>>> obs.almanac_data
Almanac for the night of 2010/1/12

Evening
______________________________
Sunset: 18:12
12d: 18:53
18d: 19:20

Morning
______________________________
18d: 05:40
12d: 06:07
Sunrise: 06:48
>>> obs.airmass(hudf, ms1054, cl1256)
>>> obs.airmass_data
Date       Local  UTC    LMST   HA     PA     AM    Moon 
__________________________________________________________
12Jan2010  17:55  03:55  1:03   -2:29  -41.4  1.98       
12Jan2010  18:00  04:00  1:08   -2:24  -40.4  1.94       
12Jan2010  18:05  04:05  1:13   -2:19  -39.3  1.9        
12Jan2010  18:10  04:10  1:18   -2:14  -38.1  1.87       
12Jan2010  18:15  04:15  1:23   -2:09  -37.0  1.83       
12Jan2010  18:20  04:20  1:28   -2:04  -35.8  1.8        
12Jan2010  18:25  04:25  1:33   -1:59  -34.6  1.77       
12Jan2010  18:30  04:30  1:38   -1:54  -33.4  1.74       
12Jan2010  18:35  04:35  1:43   -1:49  -32.2  1.72       
12Jan2010  18:40  04:40  1:48   -1:44  -30.9  1.69       
12Jan2010  18:45  04:45  1:53   -1:39  -29.6  1.67       
12Jan2010  18:50  04:50  1:58   -1:34  -28.3  1.65       
12Jan2010  18:55  04:55  2:03   -1:29  -27.0  1.63       
...
>>> observer.plots.plot_airmass(obs, '12Jan10_keck.png')