panoptes.pocs.scheduler package¶
Subpackages¶
- panoptes.pocs.scheduler.observation package
- Submodules
- panoptes.pocs.scheduler.observation.base module
Exposure
Observation
Observation.add_to_exposure_list()
Observation.current_exp_num
Observation.directory
Observation.exptime
Observation.exptimes
Observation.first_exposure
Observation.from_dict()
Observation.get_exposure()
Observation.last_exposure
Observation.minimum_duration
Observation.name
Observation.pointing_image
Observation.reset()
Observation.seq_time
Observation.set_duration
Observation.set_is_finished
Observation.status
Observation.to_dict()
- panoptes.pocs.scheduler.observation.bias module
- panoptes.pocs.scheduler.observation.compound module
- panoptes.pocs.scheduler.observation.dark module
- Module contents
Submodules¶
panoptes.pocs.scheduler.constraint module¶
- class panoptes.pocs.scheduler.constraint.AlreadyVisited(*args, **kwargs)[source]¶
Bases:
BaseConstraint
Simple Already Visited Constraint
A simple already visited constraint that determines if the given observation has already been visited before. If given observation has already been visited then it will not be considered for a call to become the current observation.
- class panoptes.pocs.scheduler.constraint.Altitude(horizon=None, obstructions=None, *args, **kwargs)[source]¶
Bases:
BaseConstraint
Implements altitude constraints for a horizon
- class panoptes.pocs.scheduler.constraint.BaseConstraint(weight=1.0, default_score=0.0, *args, **kwargs)[source]¶
Bases:
PanBase
- class panoptes.pocs.scheduler.constraint.Duration(horizon=None, *args, **kwargs)[source]¶
Bases:
BaseConstraint
- class panoptes.pocs.scheduler.constraint.MoonAvoidance(separation=<Quantity 15. deg>, *args, **kwargs)[source]¶
Bases:
BaseConstraint
panoptes.pocs.scheduler.dispatch module¶
- class panoptes.pocs.scheduler.dispatch.Scheduler(*args, **kwargs)[source]¶
Bases:
BaseScheduler
- get_observation(time=None, show_all=False, constraints=None, read_file=False)[source]¶
Get a valid observation.
- Parameters:
time (astropy.time.Time, optional) – Time at which scheduler applies, defaults to time called
constraints (list of panoptes.pocs.scheduler.constraint.Constraint, optional) – The constraints to check. If None (the default), use the scheduler.constraints.
show_all (bool, optional) – Return all valid observations along with merit value, defaults to False to only get top value
constraints – The constraints to check. If None (the default), use the scheduler.constraints
read_file (bool, optional) – If the fields file should be reread before scheduling occurs, defaults to False.
- Returns:
A tuple (or list of tuples) with name and score of ranked observations
- Return type:
panoptes.pocs.scheduler.field module¶
panoptes.pocs.scheduler.scheduler module¶
- class panoptes.pocs.scheduler.scheduler.BaseScheduler(observer, fields_list=None, fields_file=None, constraints=None, *args, **kwargs)[source]¶
Bases:
PanBase
- add_observation(observation_config, **kwargs)[source]¶
Adds an Observation to the scheduler.
- Parameters:
observation_config (dict) – Configuration dict for Field and Observation.
- property current_observation¶
The observation that is currently selected by the scheduler
Upon setting a new observation the seq_time is set to the current time and added to the observed_list. An old observation is reset (so that it can be used again - see ~pocs.scheduelr.observation.reset). If the new observation is the same as the old observation, nothing is done. The new observation can also be set to None to specify there is no current observation.
- property fields_file¶
Field configuration file
A YAML list of config items, specifying a minimum of name and position for the ~pocs.scheduler.field.Field. `Observation`s will be built from the list of fields.
A file will be read by ~pocs.scheduler.priority.read_field_list upon being set.
Note
Setting a new fields_file will clear all existing fields
- property fields_list¶
List of field configuration items
A YAML list of config items, specifying a minimum of name and position for the ~pocs.scheduler.field.Field. `Observation`s will be built from the list of fields.
A file will be read by ~pocs.scheduler.priority.read_field_list upon being set.
Note
Setting a new fields_list will clear all existing fields
- property has_valid_observations¶
- observation_available(observation, time)[source]¶
Check if observation is available at given time
- Parameters:
observation (pocs.scheduler.observation) – An Observation object
time (astropy.time.Time) – The time at which to check observation
- property observations¶
Returns a dict of ~pocs.scheduler.observation.Observation objects with ~pocs.scheduler.observation.Observation.field.field_name as the key
Note
read_field_list is called if list is None
- remove_observation(field_name)[source]¶
Removes an Observation from the scheduler
- Parameters:
field_name (str) – Field name corresponding to entry key in observations
- set_common_properties(time)[source]¶
Sets some properties common to all observations, such as end of night, moon, etc.
- property status¶
Module contents¶
- panoptes.pocs.scheduler.create_constraints_from_config(config=None) List[BaseConstraint] [source]¶
- panoptes.pocs.scheduler.create_scheduler_from_config(config=None, observer=None, iers_url=None, *args, **kwargs) BaseScheduler | None [source]¶
Sets up the scheduler that will be used by the observatory