Detailers¶
- 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:
List of observations.
- 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.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 nightnnights (
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_locationsdec_a (
float
) – Positions for the two field centers. Default None will load the positions from rubin_scheduler.utils.ddf_locationsra_b (
float
) – Positions for the two field centers. Default None will load the positions from rubin_scheduler.utils.ddf_locationsdec_b (
float
) – Positions for the two field centers. Default None will load the positions from rubin_scheduler.utils.ddf_locationsnnights (
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 throughfallback_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=60796.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 yearnight_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.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.
- 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 usetarget_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.
- 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
offloat