lsst.sims.ocs.observatory.main_observatory module¶
-
class
lsst.sims.ocs.observatory.main_observatory.
MainObservatory
(obs_site_config)[source]¶ Bases:
future.types.newobject.newobject
Class for the Main Observatory.
This class is designed to look like the real observatory. In the default case, the observatory configuration is the main LSST obesrvatory. It uses the observatory model from the LSST Scheduler as its base information. There is an option to add variations onto the parameters and values that the model calculates to simulate real world behaviors.
-
log
¶ logging.Logger – The logging instance.
-
model
¶ lsst.ts.scheduler.observatory_model.ObservatoryModel – The instance of the Observatory model from the LSST Scheduler.
-
param_dict
¶ dict – The configuration parameters for the Observatory model.
Initialize the class.
Parameters: obs_site_config ( ObservingSite
) – The instance of the observing site configuration.-
__getattr__
(name)[source]¶ Find attributes in lsst.ts.scheduler.observator_model.ObservatorModel as well as MainObservatory.
-
calculate_visit_time
(target, th)[source]¶ Calculate the visit time from the target and camera information.
This function calculates the visit time from the current camera configuration parameters and the list of effective exposure times from the target. The visit time is calculated as:
shutter_time = 2.0 * (0.5 * camera shutter time) visit_time = sum over number of exposures (shutter_time + effective exposure time) visit_time += (number of exposures - 1) * camera readout time
Parameters: target (SALPY_scheduler.targetC) – The Scheduler topic instance holding the target information. Returns: (float, str) – The calculated visit time and a unit string (default it seconds).
-
configure
(obs_config)[source]¶ Configure the ObservatoryModel parameters.
Parameters: obs_config ( Observatory
) – The instance of the observatory configuration.
-
get_slew_activities
()[source]¶ Get the slew activities for the given slew.
This function retrieved the list of slew activities from the model after lsst.ts.scheduler.observatory_model.ObservatoryModel::slew is called. The activites are stored in an internal structure so parameters nor returns are necessary.
-
get_slew_state
(slew_state_info)[source]¶ Get the slew state from the current state instance.
This function takes a given slew state instance and copies the information to the namedtuple that will allow it to be transferred to the database.
Parameters: slew_state_info (lsst.ts.scheduler.observatory_model.ObservatoryState) – The current slew state instance. Returns: SlewState
– The copied slew state information.
-
observe
(time_handler, target, observation)[source]¶ Perform the observation of the given target.
Parameters: - time_handler (
TimeHandler
) – An instance of the simulation’s TimeHandler. - target (SALPY_scheduler.targetC) – The Scheduler topic instance holding the target information.
- observation (SALPY_scheduler.observationC) – The Scheduler topic instance for recording the observation information.
Returns: - dict(
SlewHistory
,SlewState
,SlewState
, list[SlewActivity
]) – A dictionanry of all the slew information from the visit. - dict(list[
TargetExposure
], list[ObsExposure
]) – A dictionary of all the exposure information from the visit.
- time_handler (
-
slew
(target)[source]¶ Perform the slewing operation for the observatory to the given target.
Parameters: target (SALPY_scheduler.targetC) – The Scheduler topic instance holding the target information. Returns: float – The time to slew the telescope from its current position to the target position.
-
start_night
(night, duration)[source]¶ Perform start of night functions.
Parameters: - night (int) – The current survey observing night.
- duration (int) – The survey duration in days.
-
swap_filter
(filter_to_unmount)[source]¶ Perform a filter swap.
This function takes a requested filter to unmount and checks it against the list of removable filters. If it is not on the list, no filter swap is performed. If it is on the list, a filter swap is performed.
Parameters: filter_to_unmount (str) – The filter requested for unmounting.
-