UnscheduledDowntimeData¶
- class rubin_sim.site_models.UnscheduledDowntimeData(start_time, seed=1516231120, start_of_night_offset=-0.34, survey_length=7300)¶
Bases:
object
Handle (and create) the unscheduled downtime information.
- 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.
- seed
int
, optional The random seed for creating the random nights of unscheduled downtime. Default 1516231120.
- 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
- survey_length
int
, optional The number of nights in the total survey. Default 3650*2.
- start_time
Attributes Summary
Methods Summary
__call__
()Return the array of unscheduled downtimes.
Configure the set of unscheduled downtimes.
Return total downtime (in days).
Attributes Documentation
- CATASTROPHIC_EVENT = {'P': 0.000274, 'length': 14, 'level': 'catastrophic event'}¶
- INTERMEDIATE_EVENT = {'P': 0.00548, 'length': 3, 'level': 'intermediate event'}¶
- MAJOR_EVENT = {'P': 0.00137, 'length': 7, 'level': 'major event'}¶
- MINOR_EVENT = {'P': 0.0137, 'length': 1, 'level': 'minor event'}¶
Methods Documentation
- __call__()¶
Return the array of unscheduled 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
, andstr
.
- downtime
- make_data()¶
Configure the set of unscheduled downtimes.
This function creates the unscheduled downtimes based on a set of probabilities of the downtime type occurance.
The random downtime is calculated using the following probabilities:
minor event : remainder of night and next day = 5/365 days e.g. power supply failure intermediate : 3 nights = 2/365 days e.g. repair filter mechanism, rotator, hexapod, or shutter major event : 7 nights = 1/2*365 days catastrophic event : 14 nights = 1/3650 days e.g. replace a raft