Observing Hour Angle Assignments

This notebook generates plots for DESI-doc-3060: "Observing Hour Angle Assignments for the DESI Survey".

In [1]:
%pylab inline

Populating the interactive namespace from numpy and matplotlib

In [2]:
import astropy.table
import astropy.units as u

In [3]:
import desisurvey.config
import desisurvey.optimize
import desisurvey.old.schedule
import desisurvey.plots

Initialize a configuration object for finding files in $DESISURVEY:

In [4]:
config = desisurvey.config.Configuration()

Load scheduler with tabulated data needed to create an optimizer below. Assumes that $DESISURVEY is set and contains the necessary file.

In [5]:
scheduler = desisurvey.old.schedule.Scheduler()

Load optimized HA assignments calculated with flat initialization using:

surveyinit --init flat --save flat.fits
surveyinit --init flat --save flat0.fits --max-cycles 0

The first command takes ~25 minutes to run. The second command is much faster and just saves the initial HA assignments for plotting below.

In [6]:
flat = astropy.table.Table.read(config.get_path('flat.fits'))
flat0 = astropy.table.Table.read(config.get_path('flat0.fits'))

Load optimized HA assignments calculated with HA=0 initialization using:

surveyinit --init zero --save zero.fits
surveyinit --init zero --save zero0.fits --max-cycles 0

In [7]:
zero = astropy.table.Table.read(config.get_path('zero.fits'))
zero0 = astropy.table.Table.read(config.get_path('zero0.fits'))

Sky Plots of HA Assignments

In [8]:
def HA_plot(what, save=None):
    desisurvey.plots.plot_sky_passes(what['RA'], what['DEC'], what['PASS'], what['HA'],
                                 clip_lo=-35, clip_hi=+35, cmap='seismic',
                                 label='Hour Angle [deg]', save=save);

In [9]:
HA_plot(flat0) #, save='../tex/note3060/HA_flat0.png');

In [10]:
HA_plot(flat) #, save='../tex/note3060/HA_flat.png');