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_timeastropy.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.

seedint, optional

The random seed for creating the random nights of unscheduled downtime. Default 1516231120.

start_of_night_offsetfloat, 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_lengthint, optional

The number of nights in the total survey. Default 3650*2.

Attributes Summary

CATASTROPHIC_EVENT

INTERMEDIATE_EVENT

MAJOR_EVENT

MINOR_EVENT

Methods Summary

__call__()

Return the array of unscheduled downtimes.

make_data()

Configure the set of unscheduled downtimes.

total_downtime()

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:
timeastropy.time.Time

Time in the simulation for which to find the current downtime.

Returns:
downtimenp.ndarray

The array of all unscheduled downtimes, with keys for ‘start’, ‘end’, ‘activity’, corresponding to astropy.time.Time, astropy.time.Time, and str.

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

total_downtime()

Return total downtime (in days).

Returns:
totalint

Total number of downtime days.