CoreScheduler

class rubin_sim.scheduler.schedulers.CoreScheduler(surveys, nside=None, camera='LSST', rotator_limits=[85.0, 275.0], log=None)

Bases: object

Core scheduler that takes completed observations and observatory status and requests observations

Parameters:
surveyslist (or list of lists) of rubin_sim.scheduler.survey objects

A list of surveys to consider. If multiple surveys return the same highest reward value, the survey at the earliest position in the list will be selected. Can also be a list of lists to make heirarchical priorities.

nsideint

A HEALpix nside value.

camerastr (‘LSST’)

Which camera to use for computing overlapping HEALpixels for an observation. Can be ‘LSST’ or ‘comcam’

conditionsa rubin_sim.scheduler.features.Conditions object (None)

An object that hold the current conditions and derived values (e.g., 5-sigma depth). Will generate a default if set to None.

Methods Summary

add_observation(observation)

Record a completed observation and update features accordingly.

add_observations_array(obs)

Like add_observation, but for passing many observations at once.

flush_queue()

Like it sounds, clear any currently queued desired observations.

get_basis_functions([survey_index, conditions])

Get the basis functions for a specific survey, in provided conditions.

get_healpix_maps([survey_index, conditions])

Get the healpix maps for a specific survey, in provided conditions.

make_reward_df(conditions)

Create a pandas.DataFrame describing rewards from contained surveys.

request_observation([mjd])

Ask the scheduler what it wants to observe next

surveys_df(tier)

Create a pandas.DataFrame describing rewards from surveys in one list.

update_conditions(conditions_in)

Parameters:

Methods Documentation

add_observation(observation)

Record a completed observation and update features accordingly.

Parameters:
observationdict-like

An object that contains the relevant information about a completed observation (e.g., mjd, ra, dec, filter, rotation angle, etc)

add_observations_array(obs)

Like add_observation, but for passing many observations at once.

Assigns overlapping HEALpix IDs to each observation, then passes the observation array and constructed observations + healpix id to each survey.

flush_queue()

Like it sounds, clear any currently queued desired observations.

get_basis_functions(survey_index=None, conditions=None)

Get the basis functions for a specific survey, in provided conditions.

Parameters:
survey_indexList [int], optional

A list with two elements: the survey list and the element within that survey list for which the basis function should be retrieved. If None, use the latest survey to make an addition to the queue.

conditionsrubin_sim.scheduler.features.conditions.Conditions, optional

The conditions for which to return the basis functions. If None, use the conditions associated with this sceduler. By default None.

Returns:
basis_funcsOrderedDict [‘str`, rubin_sim.scheduler.basis_functions.basis_functions.Base_basis_function]

A dictionary of the basis functions, where the keys are names for the basis functions and the values are the functions themselves.

get_healpix_maps(survey_index=None, conditions=None)

Get the healpix maps for a specific survey, in provided conditions.

Parameters:
survey_indexList [int], optional

A list with two elements: the survey list and the element within that survey list for which the maps that should be retrieved. If None, use the latest survey to make an addition to the queue.

conditionsrubin_sim.scheduler.features.conditions.Conditions, optional

The conditions for the maps to be returned. If None, use the conditions associated with this sceduler. By default None.

Returns:
basis_funcsOrderedDict [‘str`, numpy.ndarray]

A dictionary of the maps, where the keys are names for the maps and values are the numpy arrays as used by healpy.

make_reward_df(conditions)

Create a pandas.DataFrame describing rewards from contained surveys.

Parameters:
conditionsrubin_sim.scheduler.features.Conditions

Conditions for which rewards are to be returned

Returns:
reward_dfpandas.DataFrame

A table of surveys listing the rewards.

request_observation(mjd=None)

Ask the scheduler what it wants to observe next

Parameters:
mjdfloat (None)

The Modified Julian Date. If None, it uses the MJD from the conditions from the last conditions update.

Returns:
observation object (ra,dec,filter,rotangle)
Returns None if the queue fails to fill
surveys_df(tier)

Create a pandas.DataFrame describing rewards from surveys in one list.

Parameters:
conditionsrubin_sim.scheduler.features.Conditions

Conditions for which rewards are to be returned.

tierint

The level of the list of survey lists for which to return values.

Returns:
reward_dfpandas.DataFrame

A table of surveys listing the rewards.

update_conditions(conditions_in)
Parameters:
conditionsdict-like

The current conditions of the telescope (pointing position, loaded filters, cloud-mask, etc)