Example Scheduler¶
- rubin_scheduler.scheduler.example.example_scheduler(nside=32, mjd_start=60796.0, no_too=False)[source]¶
Provide an example baseline survey-strategy scheduler.
- Parameters:
nside (
int
) – Nside for the scheduler maps and basis functions.mjd_start (
float
) – Start date for the survey (MJD).no_too (
bool
) – Turn off ToO simulation. Default False.
- Returns:
scheduler – A scheduler set up as the baseline survey strategy.
- Return type:
rubin_scheduler.scheduler.CoreScheduler
- rubin_scheduler.scheduler.example.gen_greedy_surveys(nside=32, nexp=2, exptime=29.2, filters=['r', 'i', 'z', 'y'], camera_rot_limits=[-80.0, 80.0], shadow_minutes=0.0, max_alt=76.0, moon_distance=30.0, ignore_obs=['DD', 'twilight_near_sun'], m5_weight=3.0, footprint_weight=0.75, slewtime_weight=3.0, stayfilter_weight=100.0, repeat_weight=-1.0, footprints=None)[source]¶
Make a quick set of greedy surveys
This is a convenience function to generate a list of survey objects that can be used with rubin_scheduler.scheduler.schedulers.Core_scheduler. To ensure we are robust against changes in the sims_featureScheduler codebase, all kwargs are explicitly set.
- Parameters:
nside (
int
) – The HEALpix nside to usenexp (
int
) – The number of exposures to use in a visit. Default 1.exptime (
float
) – The exposure time to use per visit (seconds). Default 29.2filters (
list
ofstr
) – Which filters to generate surveys for. Default [‘r’, ‘i’, ‘z’, ‘y’].camera_rot_limits (
list
offloat
) – The limits to impose when rotationally dithering the camera (degrees). Default [-80., 80.].shadow_minutes (
float
) – Used to mask regions around zenith (minutes). Default 60.max_alt (
float
) – The maximium altitude to use when masking zenith (degrees). Default 76moon_distance (
float
) – The mask radius to apply around the moon (degrees). Default 30.ignore_obs (
str
orlist
ofstr
) – Ignore observations by surveys that include the given substring(s). Default [“DD”, “twilight_near_sun”].m5_weight (
float
) – The weight for the 5-sigma depth difference basis function. Default 3 (unitless).footprint_weight (
float
) – The weight on the survey footprint basis function. Default 0.3 (uniteless).slewtime_weight (
float
) – The weight on the slewtime basis function. Default 3.0 (uniteless).stayfilter_weight (
float
) – The weight on basis function that tries to stay avoid filter changes. Default 3.0 (uniteless).
- rubin_scheduler.scheduler.example.gen_long_gaps_survey(footprints, nside=32, night_pattern=[True, True], gap_range=[2, 7], HA_min=12, HA_max=20.5, time_after_twi=120, u_template_weight=50.0, g_template_weight=50.0, u_exptime=38.0, nexp=2)[source]¶
Paramterers¶
- footprints
rubin_scheduler.scheduler.utils.footprints.Footprints
The footprints to be used.
- night_pattern
list
[bool
] Which nights to let the survey execute. Default of [True, True] executes every night.
- gap_range
list
offloat
Range of times to attempt to to gather pairs (hours). Default [2, 7].
- HA_min
float
The hour angle limits passed to the initial blob scheduler. Default 12 (hours)
- HA_max
float
The hour angle limits passed to the initial blob scheduler. Default 20.5 (hours).
- time_after_twi
float
The time after evening twilight to attempt long gaps (minutes). Default 120.
- u_template_weight
float
The weight to place on getting image templates in u-band. Since there are so few u-visits, it can be helpful to turn this up a little higher than the standard template_weight kwarg. Default 50 (unitless.)
- g_template_weight
float
The weight to place on getting image templates in u-band. Since there are so few u-visits, it can be helpful to turn this up a little higher than the standard template_weight kwarg. Default 50 (unitless.)
- u_exptime
float
Exposure time to use for u-band visits (seconds). Default 38.
- nexp
int
Number of exposures per visit. Default 2.
- footprints
- rubin_scheduler.scheduler.example.generate_blobs(nside, nexp=2, exptime=29.2, filter1s=['u', 'u', 'g', 'r', 'i', 'z', 'y'], filter2s=['g', 'r', 'r', 'i', 'z', 'y', 'y'], pair_time=33.0, camera_rot_limits=[-80.0, 80.0], n_obs_template=None, season=300.0, season_start_hour=-4.0, season_end_hour=2.0, shadow_minutes=60.0, max_alt=76.0, moon_distance=30.0, ignore_obs=['DD', 'twilight_near_sun'], m5_weight=6.0, footprint_weight=1.5, slewtime_weight=3.0, stayfilter_weight=3.0, template_weight=12.0, u_template_weight=50.0, g_template_weight=50.0, footprints=None, u_nexp1=True, scheduled_respect=45.0, good_seeing={'g': 3, 'i': 3, 'r': 3}, good_seeing_weight=3.0, mjd_start=1, repeat_weight=-20, u_exptime=38.0)[source]¶
Generate surveys that take observations in blobs.
- Parameters:
nside (
int
) – The HEALpix nside to usenexp (int) – The number of exposures to use in a visit. Default 1.
exptime (
float
) – The exposure time to use per visit (seconds). Default 29.2filter1s (
list
[str
]) – The filternames for the first set. Default [“u”, “u”, “g”, “r”, “i”, “z”, “y”]filter2s (
list
ofstr
) – The filter names for the second in the pair (None if unpaired) Default [“g”, “r”, “r”, “i”, “z”, “y”, “y”].pair_time (
float
) – The ideal time between pairs (minutes). Default 33.camera_rot_limits (
list
offloat
) – The limits to impose when rotationally dithering the camera (degrees). Default [-80., 80.].n_obs_template (
dict
) – The number of observations to take every season in each filter. If None, sets to 3 each.season (
float
) – The length of season (i.e., how long before templates expire) (days). Default 300.season_start_hour (
float
) – Hour angle limits to use when gathering templates. Default -4 (hours)sesason_end_hour (
float
) – Hour angle limits to use when gathering templates. Default +2 (hours)shadow_minutes (
float
) – Used to mask regions around zenith (minutes). Default 60.max_alt (
float
) – The maximium altitude to use when masking zenith (degrees). Default 76.moon_distance (
float
) – The mask radius to apply around the moon (degrees). Default 30.ignore_obs (
str
orlist
ofstr
) – Ignore observations by surveys that include the given substring(s). Default [“DD”, “twilight_near_sun”].m5_weight (
float
) – The weight for the 5-sigma depth difference basis function. Default 3 (unitless).footprint_weight (
float
) – The weight on the survey footprint basis function. Default 0.3 (uniteless).slewtime_weight (
float
) – The weight on the slewtime basis function. Default 3.0 (uniteless).stayfilter_weight (
float
) – The weight on basis function that tries to stay avoid filter changes. Default 3.0 (uniteless).template_weight (
float
) – The weight to place on getting image templates every season. Default 12 (unitless).u_template_weight (
float
) – The weight to place on getting image templates in u-band. Since there are so few u-visits, it can be helpful to turn this up a little higher than the standard template_weight kwarg. Default 24 (unitless).u_nexp1 (
bool
) – Add a detailer to make sure the number of expossures in a visit is always 1 for u observations. Default True.scheduled_respect (
float
) – How much time to require there be before a pre-scheduled observation (minutes). Default 45.
- rubin_scheduler.scheduler.example.generate_twi_blobs(nside, nexp=2, exptime=29.2, filter1s=['r', 'i', 'z', 'y'], filter2s=['i', 'z', 'y', 'y'], pair_time=15.0, camera_rot_limits=[-80.0, 80.0], n_obs_template=None, season=300.0, season_start_hour=-4.0, season_end_hour=2.0, shadow_minutes=60.0, max_alt=76.0, moon_distance=30.0, ignore_obs=['DD', 'twilight_near_sun'], m5_weight=6.0, footprint_weight=1.5, slewtime_weight=3.0, stayfilter_weight=3.0, template_weight=12.0, footprints=None, repeat_night_weight=None, wfd_footprint=None, scheduled_respect=15.0, repeat_weight=-1.0, night_pattern=None)[source]¶
Generate surveys that take observations in blobs.
- Parameters:
nside (
int
) – The HEALpix nside to usenexp (
int
) – The number of exposures to use in a visit.exptime (
float
) – The exposure time to use per visit (seconds). Default 29.2filter1s (
list
ofstr
) – The filternames for the first set. Default [“r”, “i”, “z”, “y”].filter2s (
list
ofstr
) – The filter names for the second in the pair (None if unpaired). Default [“i”, “z”, “y”, “y”].pair_time (
float
) – The ideal time between pairs (minutes). Default 22.camera_rot_limits (
list
offloat
) – The limits to impose when rotationally dithering the camera (degrees). Default [-80., 80.].n_obs_template (
dict
) – The number of observations to take every season in each filter. If None, sets to 3 each. Default None.season (
float
) – The length of season (i.e., how long before templates expire) (days). Default 300.season_start_hour (
float
) – Hour angle limits to use when gathering templates. Default -4 (hours)sesason_end_hour (
float
) – Hour angle limits to use when gathering templates. Default +2 (hours)shadow_minutes (
float
) – Used to mask regions around zenith (minutes). Default 60.max_alt (
float
) – The maximium altitude to use when masking zenith (degrees). Default 76.moon_distance (
float
) – The mask radius to apply around the moon (degrees). Default 30.ignore_obs (
str
orlist
ofstr
) – Ignore observations by surveys that include the given substring(s). Default [“DD”, “twilight_near_sun”].m5_weight (
float
) – The weight for the 5-sigma depth difference basis function. Default 3 (unitless).footprint_weight (
float
) – The weight on the survey footprint basis function. Default 0.3 (uniteless).slewtime_weight (
float
) – The weight on the slewtime basis function. Default 3.0 (uniteless).stayfilter_weight (
float
) – The weight on basis function that tries to stay avoid filter changes. Default 3.0 (uniteless).template_weight (
float
) – The weight to place on getting image templates every season. Default 12 (unitless).u_template_weight (
float
) – The weight to place on getting image templates in u-band. Since there are so few u-visits, it can be helpful to turn this up a little higher than the standard template_weight kwarg. Default 24 (unitless).
- rubin_scheduler.scheduler.example.generate_twilight_near_sun(nside, night_pattern=None, nexp=1, exptime=15, ideal_pair_time=5.0, max_airmass=2.0, camera_rot_limits=[-80.0, 80.0], time_needed=10, footprint_mask=None, footprint_weight=0.1, slewtime_weight=3.0, stayfilter_weight=3.0, min_area=None, filters='riz', n_repeat=4, sun_alt_limit=-14.8, slew_estimate=4.5, moon_distance=30.0, shadow_minutes=0, min_alt=20.0, max_alt=76.0, max_elong=60.0, ignore_obs=['DD', 'pair', 'long', 'blob', 'greedy'], filter_dist_weight=0.3, time_to_12deg=25.0)[source]¶
Generate a survey for observing NEO objects in twilight
- Parameters:
night_pattern (
list
ofbool
) – A list of bools that set when the survey will be active. e.g., [True, False] for every-other night, [True, False, False] for every third night. Default None.nexp (
int
) – Number of snaps in a visit. Default 1.exptime (
float
) – Exposure time of visits. Default 15.ideal_pair_time (
float
) – Ideal time between repeat visits (minutes). Default 5max_airmass (
float
) – Maximum airmass to attempt (unitless). Default 2.camera_rot_limits (
list
offloat
) – The camera rotation limits to use (degrees). Default [-80, 80].time_needed (
float
) – How much time should be available (e.g., before twilight ends) (minutes). Default 10footprint_mask (
np.array
) – Mask to apply to the constructed ecliptic target mask (None). Default Nonefootprint_weight (
float
) – Weight for footprint basis function. Default 0.1 (uniteless).slewtime_weight (
float
) – Weight for slewtime basis function. Default 3 (unitless)stayfilter_weight (
float
) – Weight for staying in the same filter basis function. Default 3 (unitless)min_area (
float
) – The area that needs to be available before the survey will return observations (sq degrees?). Default None.filters (
str
) – The filters to use, default ‘riz’n_repeat (
int
) – The number of times a blob should be repeated, default 4.sun_alt_limit (
float
) – Do not start unless sun is higher than this limit (degrees). Default -14.8.slew_estimate (
float
) – An estimate of how long it takes to slew between neighboring fields (seconds). Default 4.5time_to_sunrise (
float
) – Do not execute if time to sunrise is greater than (minutes). Default 25.
- rubin_scheduler.scheduler.example.get_ideal_model_observatory(nside=32, dayobs='2024-09-09', fwhm_500=1.6, wind_speed=5.0, wind_direction=340, tma_percent=70, rotator_percent=100, survey_start=np.float64(60562.5))[source]¶
Set up a model observatory with constant seeing and wind speed, running on ‘dayobs’.
Track a constant ‘survey_start’ over different ‘dayobs’ so that the ‘night’ value in the simulation outputs is consistent, and any basis functions which might use ‘season’ values from the conditions have appropriate values.
- Parameters:
nside (
int
) – The nside for the model observatory.dayobs (
str
) – DAYOBS formatted str (YYYY-MM-DD) for the evening to start up the observatory.fwhm_500 (
float
, optional) –- The value to set for atmospheric component of seeing,
constant seeing throughout the night (arcseconds).
Ad-hoc value for start of comcam on-sky operations about 2.0”.
wind_speed (
float
, optional) – Set a (constant) wind speed for the night, (m/s). Default of 5.0 is minimal but noticeable.wind_direction (
float
, optional) – Set a (constant) wind direction for the night (deg). Default of 340 is midrange between typical wind directions for the site (see SITCOMTN-126).tma_percent (
float
, optional) – Set a percent of full-performance for the telescope TMA (0-100). Value of 10(%) is likely for start of comcam on-sky SV surveys.rotator_percent (
float
, optional) – Set a percent of full-performance for the rotator. Default of 100% is likely for the start of comcam on-sky SV surveys.survey_start (
float
, optional) – MJD of the day of the survey start of operations. This should be kept constant for a given set of simulations, so that the “night” value in the output is consistent. For surveys which use basis functions depending on season, this is also important to be constant.
- Returns:
observatory – A ModelObservatory set up to start operations in the evening of DAYOBS.
- Return type:
Notes
The time for the model observatory will be advanced to the time of
sunset_start_key
(default -12 degree sunset) in the model observatory. The filters may not be correct however; useupdate_model_observatory_sunset
to get filters in place.
- rubin_scheduler.scheduler.example.run_sched(scheduler, survey_length=365.25, nside=32, filename=None, verbose=False, extra_info=None, illum_limit=40.0, mjd_start=60796.0, event_table=None, sim_to_o=None)[source]¶
Run survey
- rubin_scheduler.scheduler.example.set_run_info(dbroot=None, file_end='v3.4_', out_dir='.')[source]¶
Gather versions of software used to record
- rubin_scheduler.scheduler.example.simple_field_survey(field_ra_deg, field_dec_deg, field_name, mask_basis_functions=None, reward_basis_functions=None, detailers=None, sequence='ugrizy', nvisits=None, exptimes=None, nexps=None, nside=32, science_program=None)[source]¶
Set up a simple field survey.
- Parameters:
field_ra_deg (
float
) – The RA (in degrees) of the field.field_dec_deg (
float
) – The Dec (in degrees) of the field.field_name (
str
) – The name of the field. This is used for the survey_name and transferred to the ‘target’ information in the output observation. Also used in ‘scheduler_note’, which is important for the FieldSurvey to know whether to count particular observations for the Survey.mask_basis_functions (
list
[BaseBasisFunction
] or None) – List of basis functions to use as masks (with implied weight 0). If None,standard_masks
is used with default parameters.reward_basis_functions (
list
[BaseBasisFunction
] or None) – List of basis functions to use as rewards. If None, a basic set of basis functions useful for long observations of a field within a night will be used (`getdetailers (
list
of [detailer
objects]) – Detailers for the survey. Detailers can add information to output observations, including specifying rotator or dither positions.sequence (
str
orlist
[str
]) – The filters (in order?) for the sequence of observations.nvisits (
dict
{str
:int
} | None) – Number of visits per filter to program in the sequence. Default of None uses nvisits = {“u”: 20, “g”: 20, “r”: 20, “i”: 20, “z”: 20, “y”: 20}exptimes (
dict
{str
:float
} | None) – Exposure times per filter to program in the sequence. Default of None uses exptimes = {“u”: 38, “g”: 30, “r”: 30, “i”: 30, “z”: 30, “y”: 30}nexps (
dict
{str
:int
} | None) – Number of exposures per filter to program in the sequence. Default of None uses nexps = {“u”: 1, “g”: 2, “r”: 2, “i”: 2, “z”: 2, “y”: 2}nside (
int
, optional) – Nside for the survey. Default DEFAULT_NSIDE.science_program (
str
| None) – The science_program key for the FieldSurvey. This maps to the BLOCK andscience_program
in the consDB.
- Returns:
field_survey – The configured FieldSurvey.
- Return type:
Notes
The sequences for a given field survey can be set via kwargs, not necessarily easily accessible here. Only portions of the sequence which correspond to mounted filters will be requested by the FieldSurvey.
field_survey.extra_features[‘ObsRecord’] tracks how many observations have been accepted by the Survey (and can be useful for diagnostics).
- rubin_scheduler.scheduler.example.simple_greedy_survey(nside=32, filtername='r', mask_basis_functions=None, reward_basis_functions=None, reward_basis_functions_weights=None, survey_start=60796.0, footprints_hp=None, camera_rot_limits=[-80.0, 80.0], exptime=30.0, nexp=1, science_program=None)[source]¶
Set up a simple greedy survey to just observe single visits.
- Parameters:
nside (
int
, optional) – Nside for the surveys.filtername (
str
, optional) – Filtername for the visits.mask_basis_functions (
list
[BaseBasisFunction
] or None) – List of basis functions to use as masks (with implied weight 0). If None,standard_masks
is used with default parameters.reward_basis_functions (
list
[BaseBasisFunction
] or None) – List of basis functions to use as rewards. If None, a basic set of basis functions will be used.reward_basis_functions_weights (
list
[float
] or None) – List of values to use as weights for the reward basis functions. If None, default values for the basic set will be used.survey_start (
float
or None) – The start of the survey, in MJD. If None,survey_start_mjd()
is used. This should be the start of the survey, not the current time.footprints_hp (
np.ndarray
(N,) or None) – An array of healpix maps with the target survey area, with dtype like [(filtername, ‘<f8’), (filtername2, ‘<f8’)]. If None,get_current_footprint()
will be used, which will cover the expected LSST survey footprint.camera_rot_limits (
list
[float
]) – The rotator limits to expect for the camera. These should be slightly padded from true limits, to allow for slight delays between requesting observations and acquiring them.exptime (
float
) – The on-sky exposure time per visit.nexp (
int
) – The number of exposures per visit (exptime * nexp = total on-sky time).science_program (
str
| None) – The science_program key for the FieldSurvey. This maps to the BLOCK andscience_program
in the consDB.
- Returns:
greedy_survey – A greedy survey configured to take the next best (single) visit in filtername.
- Return type:
GreedySurvey
- rubin_scheduler.scheduler.example.simple_pairs_survey(nside=32, filtername='g', filtername2=None, mask_basis_functions=None, reward_basis_functions=None, reward_basis_functions_weights=None, survey_start=60796.0, footprints_hp=None, camera_rot_limits=[-80.0, 80.0], pair_time=30.0, exptime=30.0, nexp=1, science_program=None)[source]¶
Set up a simple blob survey to acquire pairs of visits.
- Parameters:
nside (
int
, optional) – Nside for the surveys.filtername (
str
, optional) – Filtername for the first visit of the pair.filtername2 (
str
or None, optional) – Filtername for the second visit of the pair. If None, the first filter will be used for both visits.mask_basis_functions (
list
[BaseBasisFunction
] or None) – List of basis functions to use as masks (with implied weight 0). If None,standard_masks
is used with default parameters.reward_basis_functions (
list
[BaseBasisFunction
] or None) – List of basis functions to use as rewards. If None, a basic set of basis functions will be used.reward_basis_functions_weights (
list
[float
] or None) – List of values to use as weights for the reward basis functions. If None, default values for the basic set will be used.survey_start (
float
or None) – The start of the survey, in MJD. If None,survey_start_mjd()
is used. This should be the start of the survey, not the current time.footprints_hp (
np.ndarray
(N,) or None) – An array of healpix maps with the target survey area, with dtype like [(filtername, ‘<f8’), (filtername2, ‘<f8’)]. If None,get_current_footprint()
will be used, which will cover the expected LSST survey footprint.camera_rot_limits (
list
[float
]) – The rotator limits to expect for the camera. These should be slightly padded from true limits, to allow for slight delays between requesting observations and acquiring them.pair_time (
float
) – The ideal time between pairs of visits, in minutes.exptime (
float
) – The on-sky exposure time per visit.nexp (
int
) – The number of exposures per visit (exptime * nexp = total on-sky time).science_program (
str
| None) – The science_program key for the FieldSurvey. This maps to the BLOCK andscience_program
in the consDB.
- Returns:
pair_survey – A blob survey configured to take pairs at spacing of pair_time, in filtername + filtername2.
- Return type:
BlobSurvey
- rubin_scheduler.scheduler.example.simple_rewards(footprints, filtername, nside=32, m5_weight=6.0, footprint_weight=1.5, slewtime_weight=3.0, stayfilter_weight=3.0, repeat_weight=-20)[source]¶
A simple set of rewards for area-based surveys.
- Parameters:
footprints (
Footprint
) – A Footprint class, which takes a target map and adds a time-dependent weighting on top (such as seasonal weighting).filtername (
str
) – The filtername active for these rewards.nside (
int
, optional) – The nside for the rewards.m5_weight (
float
, optional) – The weight to give the M5Diff basis function.footprint_weight (
float
, optional) – The weight to give the footprint basis function.slewtime_weight (
float
, optional) – The weight to give the slewtime basis function.stayfilter_weight (
float
, optional) – The weight to give the FilterChange basis function.repeat_weight (
float
, optional) – The weight to give the VisitRepeat basis function. This is negative by default, to avoid revisiting the same part of the sky withingap_max
(3 hours) in any filter (except in the pairs survey itself).
- Returns:
reward_functions – List of tuples, each tuple is a reward function followed by its respective weight.
- Return type:
list
[(BaseBasisFunction
,float
)]
Notes
Increasing the m5_weight moves visits toward darker skies. Increasing the footprint weight distributes visits more evenly. Increasing the slewtime weight acquires visits with shorter slewtime. The balance in the defaults here has worked reasonably for pair surveys in simulations.
- rubin_scheduler.scheduler.example.simple_rewards_field_survey(scheduler_note, nside=32, sun_alt_limit=-12.0)[source]¶
Get some simple rewards to observe a field survey for a long period.
- Parameters:
scheduler_note (
str
) – The scheduler note for the field survey. Typically this will be the same as the field name.nside (
int
) – The nside value for the healpix grid.sun_alt_limit (
float
, optional) – Value for the sun’s altitude at which to allow observations to start (or finish).
- Returns:
bfs
- Return type:
list
ofBaseBasisFunction
- rubin_scheduler.scheduler.example.standard_bf(nside, filtername='g', filtername2='i', m5_weight=6.0, footprint_weight=1.5, slewtime_weight=3.0, stayfilter_weight=3.0, template_weight=12.0, u_template_weight=50.0, g_template_weight=50.0, footprints=None, n_obs_template=None, season=300.0, season_start_hour=-4.0, season_end_hour=2.0, moon_distance=30.0, strict=True, wind_speed_maximum=20.0)[source]¶
Generate the standard basis functions that are shared by blob surveys
- Parameters:
nside (
int
) – The HEALpix nside to use. Defaults to DEFAULT_NSIDEfiltername (
str
) – The filter name for the first observation. Default “g”.filtername2 (
str
) – The filter name for the second in the pair (None if unpaired). Default “i”.n_obs_template (
dict
) – The number of observations to take every season in each filter. Default None.season (
float
) – The length of season (i.e., how long before templates expire) (days). Default 300.season_start_hour (
float
) – Hour angle limits to use when gathering templates. Default -4 (hours)sesason_end_hour (
float
) – Hour angle limits to use when gathering templates. Default +2 (hours)moon_distance (
float
) – The mask radius to apply around the moon (degrees). Default 30.m5_weight (
float
) – The weight for the 5-sigma depth difference basis function. Default 6.0 (unitless)footprint_weight (
float
) – The weight on the survey footprint basis function. Default 0.3 (unitless)slewtime_weight (
float
) – The weight on the slewtime basis function. Default 3 (unitless).stayfilter_weight (
float
) – The weight on basis function that tries to stay avoid filter changes. Default 3 (unitless).template_weight (
float
) – The weight to place on getting image templates every season. Default 12 (unitless).u_template_weight (
float
) – The weight to place on getting image templates in u-band. Since there are so few u-visits, it can be helpful to turn this up a little higher than the standard template_weight kwarg. Default 24 (unitless)g_template_weight (
float
) – The weight to place on getting image templates in g-band. Since there are so few g-visits, it can be helpful to turn this up a little higher than the standard template_weight kwarg. Default 24 (unitless).
- Returns:
basis_functions_weights – list of tuple pairs (basis function, weight) that is (rubin_scheduler.scheduler.BasisFunction object, float)
- Return type:
list
- rubin_scheduler.scheduler.example.standard_masks(nside, moon_distance=30.0, wind_speed_maximum=20.0, min_alt=20, max_alt=86.5, min_az=0, max_az=360, shadow_minutes=30)[source]¶
A set of standard mask functions.
Avoids the moon, bright planets, high wind, and areas on the sky out of bounds, using the MoonAvoidanceBasisFunction, PlanetMaskBasisFunction, AvoidDirectWindBasisFunction, and the AltAzShadowMaskBasisFunction.
- Parameters:
nside (
int
or None) – The healpix nside to use. Default of None uses rubin_scheduler.utils.get_default_nside.moon_distance (
float
, optional) – Moon avoidance distance, in degrees.wind_speed_maximum (
float
, optional) – Wind speed maximum to apply to the wind avoidance basis function, in m/s.min_alt (
float
, optional) – Minimum altitude (in degrees) to observe.max_alt (
float
, optional) – Maximum altitude (in degrees) to observe.min_az (
float
, optional) – Minimum azimuth angle (in degrees) to observe.max_az (
float
, optional) – Maximum azimuth angle (in degrees) to observe.shadow_minutes (
float
, optional) – Avoid inaccessible alt/az regions, as well as parts of the sky which will move into those regions withinshadow_minutes
(minutes).
- Returns:
mask_basis_functions – Mask basis functions should always be used with a weight of 0. The masked (np.nan or -np.inf) regions will remain masked, but the basis function values won’t influence the reward.
- Return type:
list
[BaseBasisFunction
]
- rubin_scheduler.scheduler.example.update_model_observatory_sunset(observatory, filter_scheduler, twilight=-12)[source]¶
Ensure correct filters are in place according to the filter_scheduler.
- Parameters:
observatory (
ModelObservatory
) – The ModelObservatory simulating the observatory.filter_scheduler (
FilterScheduler
) – The filter scheduler providing appropriate information on the filters that should be in place on the current observatory day.twilight (
int
orfloat
) – If twilight is -12 or -18, the Almanac -12 or -18 degree twilight times are used to set the current observatory time. If any other value is provided, it is assumed to be a specific MJD to start operating the observatory. Filter choices are based on the time after advancing to twilight.
- Returns:
observatory – The ModelObservatory simulating the observatory, updated to the time of ‘twilight’ and with mounted_filters matching the filters chosen by the filter_scheduler for the current time at ‘twilight’.
- Return type: