ScheduledDowntimeData¶
- class rubin_sim.site_models.ScheduledDowntimeData(start_time, scheduled_downtime_db=None, start_of_night_offset=-0.34)¶
Bases:
object
Read the scheduled downtime data.
This class deals with the scheduled downtime information that was previously produced for OpSim version 3.
- Parameters:
- start_time
astropy.time.Time
The time of the start of the simulation. The cloud database will be assumed to start on Jan 01 of the same year.
- cloud_db
str
, optional The full path name for the cloud database. Default None, which will use the database stored in the module ($SIMS_CLOUDMODEL_DIR/data/cloud.db).
- start_of_night_offset
float
, optional The fraction of a day to offset from MJD.0 to reach the defined start of a night (‘noon’ works). Default 0.16 (UTC midnight in Chile) - 0.5 (minus half a day) = -0.34
- start_time
Methods Summary
__call__
()Return the current (if any) and any future scheduled downtimes.
Read the scheduled downtime information from disk and translate to astropy.time.Times.
Return total downtime (in days).
Methods Documentation
- __call__()¶
Return the current (if any) and any future scheduled downtimes.
- Parameters:
- time
astropy.time.Time
Time in the simulation for which to find the current downtime.
- time
- Returns:
- downtime
np.ndarray
The array of all unscheduled downtimes, with keys for ‘start’, ‘end’, ‘activity’, corresponding to astropy.time.Time, astropy.time.Time, and str.
- downtime
- read_data()¶
Read the scheduled downtime information from disk and translate to astropy.time.Times.
This function gets the appropriate database file and creates the set of scheduled downtimes from it. The default behavior is to use the module stored database. However, an alternate database file can be provided. The alternate database file needs to have a table called Downtime with the following columns: