ScriptedSurvey

class rubin_sim.scheduler.surveys.ScriptedSurvey(basis_functions, reward=1000000.0, ignore_obs='dummy', nside=None, detailers=None, id_start=1, return_n_limit=100, survey_name='')

Bases: BaseSurvey

Take a set of scheduled observations and serve them up.

Parameters:
id_startint (1)

The integer to start the “scripted id” field with. Bad things could happen if you have multiple scripted survey objects with the same scripted IDs.

return_n_limitint (100)

The maximum number of observations to return.

Methods Summary

add_observation(observation[, indx])

Check if observation matches a scripted observation

add_observations_array(...)

Add an array of observations rather than one at a time

calc_reward_function(conditions)

If there is an observation ready to go, execute it, otherwise, -inf

clear_script()

set an empty list to serve up

generate_observations_rough(conditions)

Returns:

set_script(obs_wanted)

Parameters:

Methods Documentation

add_observation(observation, indx=None, **kwargs)

Check if observation matches a scripted observation

add_observations_array(observations_array_in, observations_hpid_in)

Add an array of observations rather than one at a time

Parameters:
observations_array_innp.array

An array of completed observations (with columns like rubin_sim.scheduler.utils.empty_observation).

observations_hpid_innp.array

Same as observations_array_in, but larger and with an additional column for HEALpix id. Each observation is listed mulitple times, once for every HEALpix it overlaps.

calc_reward_function(conditions)

If there is an observation ready to go, execute it, otherwise, -inf

clear_script()

set an empty list to serve up

generate_observations_rough(conditions)
Returns:
one of:
  1. None

  2. A list of observations

set_script(obs_wanted)
Parameters:
obs_wantednp.array

The observations that should be executed. Needs to have columns with dtype names: Should be from lsst.sim.scheduler.utils.scheduled_observation

mjdsnp.array

The MJDs for the observaitons, should be same length as obs_list

mjd_tolfloat (15.)

The tolerance to consider an observation as still good to observe (min)