CloudData¶
- class rubin_sim.site_models.CloudData(start_time, cloud_db=None, offset_year=0, scale=1000000.0)¶
Bases:
object
Handle the cloud information.
This class deals with the cloud information that was previously produced for OpSim version 3.
- 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.
- cloud_dbstr, optional
The full path name for the cloud database. Default None, which will use the database stored in the module (site_models/clouds_ctio_1975_2022.db).
- offset_yearfloat, optional
Offset into the cloud database by ‘offset_year’ years. Default 0.
- scalefloat (1e6)
Enforce machine precision for cross-platform repeatability by scaling and rounding date values.
Methods Summary
__call__
(time)Get the cloud for the specified time.
Read the cloud data from disk.
Methods Documentation
- __call__(time)¶
Get the cloud for the specified time.
- Parameters:
- timeastropy.time.Time
Time in the simulation for which to find the current cloud coverage. The difference between this time and the start_time, plus the offset, will be used to query the cloud database for the ‘current’ conditions.
- Returns:
- float
The fraction of the sky that is cloudy (measured in steps of 8ths) closest to the specified time.
- read_data()¶
Read the cloud data from disk.
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 Cloud with the following columns:
- cloudId
int : A unique index for each cloud entry.
- c_date
int : The time (units=seconds) since the start of the simulation for the cloud observation.
- cloud
float : The cloud coverage (in steps of 8ths) of the sky.