Detailers

class rubin_scheduler.scheduler.detailers.AltAz2RaDecDetailer(nside=32)[source]

Bases: BaseDetailer

Set RA,dec for an observation that only has alt,az

class rubin_scheduler.scheduler.detailers.BaseDetailer(nside=32)[source]

Bases: object

A Detailer is an object that takes a list of proposed observations and adds “details” to them. The primary purpose is that the Markov Decision Process does an excelent job selecting RA,Dec,filter combinations, but we may want to add additional logic such as what to set the camera rotation angle to, or what to use for an exposure time. We could also modify the order of the proposed observations. For Deep Drilling Fields, a detailer could be useful for computing dither positions and modifying the exact RA,Dec positions.

__call__(observation_list, conditions)[source]
Parameters:
  • observation_list (list of observations) – The observations to detail.

  • conditions (rubin_scheduler.scheduler.conditions object)

Return type:

ObservationArray

add_observation(observation, indx=None)[source]
Parameters:
  • observation (np.array) – An array with information about the input observation

  • indx (np.array) – The indices of the healpix map that the observation overlaps with

add_observations_array(observations_array, observations_hpid)[source]

Like add_observation, but for loading a whole array of observations at a time

class rubin_scheduler.scheduler.detailers.CameraRotDetailer(max_rot=90.0, min_rot=-90.0, per_night=True, seed=42, nnights=7305, telescope='rubin')[source]

Bases: BaseDetailer

Randomly set the camera rotation, either for each exposure, or per night.

Parameters:
  • max_rot (float (90.)) – The maximum amount to offset the camera (degrees)

  • min_rot (float (90)) – The minimum to offset the camera (degrees)

  • per_night (bool (True)) – If True, only set a new offset per night. If False, randomly rotates every observation.

  • telescope (str) – Telescope name. Options of “rubin” or “auxtel”. Default “rubin”.

class rubin_scheduler.scheduler.detailers.CameraSmallRotPerObservationListDetailer(max_rot=85.0, min_rot=-85.0, seed=42, per_visit_rot=0.0, telescope='rubin')[source]

Bases: BaseDetailer

Randomly set the camera rotation for each observation list.

Generates a small sequential offset for sequential visits in the same filter; adds a random offset for each filter change.

Parameters:
  • max_rot (float, optional) – The maximum amount to offset the camera (degrees). Default of 85 allows some padding for camera rotator.

  • min_rot (float, optional) – The minimum to offset the camera (degrees) Default of -85 allows some padding for camera rotator.

  • seed (int, optional) – Seed for random number generation (per night).

  • per_visit_rot (float, optional) – Sequential rotation to add per visit.

  • telescope (str, optional) – Telescope name. Options of “rubin” or “auxtel”. Default “rubin”. This is used to determine conversions between rotSkyPos and rotTelPos.

class rubin_scheduler.scheduler.detailers.CloseAltDetailer(alt_band=10.0)[source]

Bases: BaseDetailer

re-order a list of observations so that the closest in altitude to the current pointing is first.

Parameters:

alt_band (float (10)) – The altitude band to try and stay in (degrees)

class rubin_scheduler.scheduler.detailers.ComCamGridDitherDetailer(rotTelPosDesired=0.0, scale=0.355, dither=0.05, telescope='comcam')[source]

Bases: BaseDetailer

Generate an offset pattern to synthesize a 2x2 grid of ComCam pointings.

Parameters:
  • rotTelPosDesired (float, (0.)) – The physical rotation angle of the camera rotator (degrees)

  • scale (float (0.355)) – Half of the offset between grid pointing centers. (degrees)

  • dither (float (0.05)) – Dither offsets within grid to fill chip gaps. (degrees)

  • telescope (str, (“comcam”)) – Telescope name. Default “comcam”. This is used to determine conversions between rotSkyPos and rotTelPos.

class rubin_scheduler.scheduler.detailers.Comcam90rotDetailer(telescope='rubin', nside=32)[source]

Bases: BaseDetailer

Detailer to set the camera rotation so rotSkyPos is 0, 90, 180, or 270 degrees. Whatever is closest to rotTelPos of zero.

class rubin_scheduler.scheduler.detailers.DitherDetailer(max_dither=0.7, seed=42, per_night=True, nnights=7305)[source]

Bases: BaseDetailer

make a uniform dither pattern. Offset by a maximum radius in a random direction. Mostly intended for DDF pointings, the BaseMarkovDF_survey class includes dithering for large areas.

Parameters:
  • max_dither (float (0.7)) – The maximum dither size to use (degrees).

  • per_night (bool (True)) – If true, us the same dither offset for an entire night

  • nnights (int (7305)) – The number of nights to pre-generate random dithers for

class rubin_scheduler.scheduler.detailers.EuclidDitherDetailer(dither_bearing_dir=[-0.25, 1], dither_bearing_perp=[-0.25, 0.25], seed=42, per_night=True, ra_a=None, dec_a=None, ra_b=None, dec_b=None, nnights=7305)[source]

Bases: BaseDetailer

Directional dithering for Euclid DDFs

Parameters:
  • dither_bearing_dir (list) – A list with the dither amplitude in along the axis connecting the two positions. Default [-0.25, 1] in degrees.

  • dither_bearing_perp (list) – A list with the dither amplitude perpendicular to the axis connecting the two positions. Default [-0.25, 1] in degrees.

  • seed (float) – Random number seed to use (42).

  • per_night (bool) – If dither shifts should be per night (default True), or if dithers should be every pointing (False).

  • ra_a (float) – Positions for the two field centers. Default None will load the positions from rubin_scheduler.utils.ddf_locations

  • dec_a (float) – Positions for the two field centers. Default None will load the positions from rubin_scheduler.utils.ddf_locations

  • ra_b (float) – Positions for the two field centers. Default None will load the positions from rubin_scheduler.utils.ddf_locations

  • dec_b (float) – Positions for the two field centers. Default None will load the positions from rubin_scheduler.utils.ddf_locations

  • nnights (int) – Number of nights to generate dither positions for. Default 7305 (20 years).

class rubin_scheduler.scheduler.detailers.FilterNexp(filtername='u', nexp=1, exptime=None)[source]

Bases: BaseDetailer

Demand one filter always be taken as a certain number of exposures

class rubin_scheduler.scheduler.detailers.FixedSkyAngleDetailer(sky_angle=0.0, nside=32)[source]

Bases: BaseDetailer

Detailer to force a specific sky angle.

Parameters:

sky_angle (float, optional) – Desired sky angle (default = 0, in degrees).

class rubin_scheduler.scheduler.detailers.FlushByDetailer(flush_time=60, nside=32)[source]

Bases: BaseDetailer

Set the MJD an observation should be flushed from the scheduler queue if not yet completed.

Parameters:

flush_time (float) – The time to flush after the current MJD. Default 60 minutes

class rubin_scheduler.scheduler.detailers.FlushForSchedDetailer(tol=2.5)[source]

Bases: BaseDetailer

Update the flush-by MJD to be before any scheduled observations

Parameters:

tol (float) – How much before to flush (minutes)

class rubin_scheduler.scheduler.detailers.ParallacticRotationDetailer(telescope='rubin')[source]

Bases: BaseDetailer

Set the rotator to near the parallactic angle

class rubin_scheduler.scheduler.detailers.RandomFilterDetailer(filters='riz', nights_to_prep=10000, seed=42, fallback_order='rizgyu')[source]

Bases: BaseDetailer

Pick a random filter for the observations

Parameters:
  • filters (str) – The filters to randomize. Default ‘riz’

  • nights_to_prep (int) – The number of nights to generate random filters for. Default 10000.

  • seed (number) – Seed for RNG. Defaut 42

  • fallback_order (str) – If the desired filter is not mounted, goes through fallback_order and uses the first filter that is available

class rubin_scheduler.scheduler.detailers.Rottep2RotspDesiredDetailer(telescope='rubin')[source]

Bases: BaseDetailer

Convert all the rotTelPos values to rotSkyPos_desired

class rubin_scheduler.scheduler.detailers.ShortExptDetailer(exp_time=1.0, filtername='r', nside=32, footprint=None, nobs=2, mjd0=60980.0, survey_name='short', read_approx=2.0, night_max=None, n_repeat=1, time_scale=False)[source]

Bases: BaseDetailer

Check if the area has been observed with a short exposure time this year. If not, add some short exposures.

Parameters:
  • exp_time (float (1.)) – The short exposure time to use.

  • nobs (float (2)) – The number of observations to try and take per year

  • night_max (float (None)) – Do not apply any changes to the observation list if the current night is greater than night_max.

  • n_repeat (int (1)) – How many short observations to do in a row.

  • time_scale (bool (False)) – Should the short observations be scaled throughout the year (True), or taken as fast as possible (False).

class rubin_scheduler.scheduler.detailers.StartFieldSequenceDetailer(sequence_obs, ang_distance_match=3.5, time_match_hours=5, science_program=None, scheduler_note='starting_sequence', ra=0, dec=0)[source]

Bases: BaseDetailer

Prepend a sequence of observations to the start of an array

Parameters:
  • sequence_obs (ObservationArray) – ObservationArray object. The observations should have “scheduler_note” and/or “science_program” set.

  • ang_distance_match (float) – How close should an observation be on the sky to be considered matching (degrees).

  • time_match_hours (float) – How close in time to demand an observation be matching (hours).

  • science_program (str or None) – The science_program to match against. Default None.

  • scheduler_note (str or None) – The scheduler_note to match observations against. Default “starting_sequence”.

  • ra (float) – RA to match against. Default 0 (degrees). Ignored if ang_distance_match is None.

  • dec (float) – Dec to match observations against. Default 0 (degrees). Ignored if ang_distance_match is None.

class rubin_scheduler.scheduler.detailers.TakeAsPairsDetailer(filtername='r', exptime=None, nexp_dict=None)[source]

Bases: BaseDetailer

class rubin_scheduler.scheduler.detailers.TrackingInfoDetailer(target_name=None, science_program=None, observation_reason=None)[source]

Bases: BaseDetailer

Fill in lots of the different tracking strings for an observation. Does not clobber information that has already been set

class rubin_scheduler.scheduler.detailers.TwilightTripleDetailer(slew_estimate=5.0, n_repeat=3, update_note=True)[source]

Bases: BaseDetailer

class rubin_scheduler.scheduler.detailers.VaryExptDetailer(nside=32, min_expt=20.0, max_expt=100.0, target_m5=None)[source]

Bases: BaseDetailer

Vary the exposure time on observations to try and keep each observation at uniform depth.

Parameters:
  • min_expt (float (20.)) – The minimum exposure time to use (seconds).

  • max_expt (float (100.)) – The maximum exposure time to use

  • target_m5 (dict (None)) – Dictionary with keys of filternames as str and target 5-sigma depth values as floats. If none, the target_m5s are set to a min_expt exposure at X=1.1 in dark time.

__call__(obs_array, conditions)[source]
Parameters:
  • observation_list (list of observations) – The observations to detail.

  • conditions (rubin_scheduler.scheduler.conditions object)

Return type:

List of observations.

class rubin_scheduler.scheduler.detailers.ZeroRotDetailer(telescope='rubin', nside=32)[source]

Bases: BaseDetailer

Detailer to set the camera rotation to be apporximately zero in rotTelPos.

Parameters:

telescope (str) – Which telescope convention to use for setting the conversion between rotTelPos and rotSkyPos. Default “rubin”.

rubin_scheduler.scheduler.detailers.calc_target_m5s(alt=65.0, fiducial_seeing=0.9, exptime=20.0)[source]

Use the skybrightness model to find some good target m5s.

Parameters:
  • alt (float, opt) – Altitude for the target, degrees. Default 65.

  • fiducial_seeing (float, opt) – Fiducial FWHMeff seeing, arcseconds. Default 0.9.

  • exptime (float, opt) – Exposure time for the comparison, seconds. Default 20.

Returns:

goal_m5 – dictionary of expected m5 values keyed by filtername

Return type:

dict of float