lsst.sims.ocs.environment.cloud_model module

class lsst.sims.ocs.environment.cloud_model.CloudModel(time_handler)[source]

Bases: future.types.newobject.newobject

Handle the cloud information.

This class deals with the cloud information that was previously produced for OpSim version 3.

Initialize the class.

Parameters:time_handler (TimeHandler) – The instance of the simulation time handler.
get_cloud(delta_time)[source]

Get the cloud for the specified time.

Parameters:delta_time (int) – The time (seconds) from the start of the simulation.
Returns:float – The cloud (fraction of sky in 8ths) closest to the specified time.
initialize(cloud_file='')[source]

Configure the cloud information.

This function gets the appropriate database file and creates the cloud information 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 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 8ths of the sky.
Parameters:cloud_file (str, optional) – The full path to an alternate cloud database.
set_topic(th, topic)[source]

Set the cloud information into the topic.

Parameters:
  • th (TimeHandler) – A time handling instance.
  • topic (SALPY_scheduler.scheduler_cloudC) – An instance of the cloud topic.
CLOUD_DB = 'cloud.db'

Filename of the internal cloud observation database.