lsst.sims.ocs.database.tables.base_tbls module¶
-
lsst.sims.ocs.database.tables.base_tbls.
create_config
(metadata)[source]¶ Create the Config table.
This function creates the Config table containing the values for all the configuration parameters of the simulation. This table will be created after differences are applied to the configuration.
Table Description:
This table contains the configuration information for the given simulation.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The Config table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_field
(metadata)[source]¶ Create Field table.
This function creates the Field table from the sky tessellation.
Table Description:
This table contains all the coordinate information for the “visiting” fields. The field centers are determined from a tessellation (or tiling) of the celestial sphere which results in a closest-packed set of 5280 hexagons and 12 pentagons inscribed in circular fields having a 3.5-degree diameter (R. H. Hardin, N. J. A. Sloane and W. D. Smith, Tables of spherical codes with icosahedral symmetry, published electronically at http://NeilSloane.com/icosahedral.codes/).
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The Field table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_observation_exposures
(metadata)[source]¶ Create ObsExposures table.
This function creates the ObsExposures table from the observation exposures.
Table Description:
This table contains all of the individual exposure information for each visit in the ObsHistory table. The number of exposures in a visit is determined by the visit target’s exposure cadence.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The ObsExposure table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_observation_history
(metadata)[source]¶ Create ObsHistory table.
This function creates the ObsHistory table for tracking all the observations performed by the Sequencer in the simulation run.
Table Description:
This table keeps a record of each visit made by the observatory during a simulated survey. Multiple proposals can be associated with a single visit leading to duplicate entries in this table.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The ObsHistory table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_observation_proposal_history
(metadata)[source]¶ Create the ObsProposalHistory table.
This function creates the ObsProposalHistory table for listing all proposals that are assigned to a given observation.
Table Description:
This table records all of the proposals and proposal information for a given observation.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The ObsProposalHistory table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_proposal_field
(metadata)[source]¶ Create the ProposalField table.
This function creates the ProposalField table for listing the fields for each science proposal.
Table Description:
This table lists all of the field Ids associated with a given science proposal.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The ProposalField table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_proposal
(metadata)[source]¶ Create the Proposal table.
This function creates the Proposal table for listing the active proposals.
Table Description:
This table records all of the active science proposals.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The Proposal table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_scheduled_downtime
(metadata)[source]¶ Create the ScheduledDowntime table.
This function creates the ScheduledDowntime table for listing the scheduled downtime during the survey.
Table Description:
This table records all of the scheduled downtime for the entire survey (plus an extra 10 years). The actual downtime used in the simulation maybe different depending on the length of the simulation.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The ScheduledDowntime table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_session
(metadata, autoincrement=True, session_id_start=1000)[source]¶ Create Session table.
This function creates the Session table for tracking the various simulations run. For MySQL, it adds a post-create command to set the lower limit of the auto increment value.
Table Description:
This table contains the log of all simulations (MySQL) or a single simulation (SQLite). Simulation runs are identified by the combination of the hostname and session Id: sessionHost_sessionId.
Parameters: - metadata (sqlalchemy.MetaData) – The database object that collects the tables.
- autoincrement (bool) – A flag to set auto incrementing on the sessionID column.
- session_id_start (int) – A new starting session Id for counting new simulations.
Returns: sqlalchemy.Table – The Session table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_slew_activities
(metadata)[source]¶ Create the SlewActivities table.
This function creates the SlewActivities table for tracking the activities during a slew.
Table Description:
This table contains all the activities for a given visit’s slew. The SlewHistory_slewCount column points to a given slew in the SlewHistory table.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The SlewActivities table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_slew_final_state
(metadata)[source]¶ Create the SlewFinalState tables.
This function creates the SlewFinalState table for tracking the state of the observatory after slewing.
Table Description:
This table contains all of the final state information from a given visit’s slew. The state information is collected after the slew has completed, but before the visit activity has started. The SlewHistory_slewCount column points to a given slew in the SlewHistory table.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The SlewFinalState table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_slew_history
(metadata)[source]¶ Create SlewHistory table.
This function creates the SlewHistory table for tracking all the general slew information performed by the observatory.
Table Description:
This table contains the basic slew information for each visit.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The SlewHistory table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_slew_initial_state
(metadata)[source]¶ Create the SlewInitialState tables.
This function creates the SlewInitialState table for tracking the state of the observatory before slewing.
Table Description:
This table contains all of the initial state information from a given visit’s slew. The state information is collected before the slew to the given target has started. The SlewHistory_slewCount column points to a given slew in the SlewHistory table.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The SlewInitialState table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_slew_maxspeeds
(metadata)[source]¶ Create the SlewMaxSpeeds table.
This function creates the SlewMaxSpeeds table for tracking the maximum speeds of observatory achieved during a slew.
Table Description:
This table contains all of the maximum speeds obtained by the telescope, dome and rotator during a given visit’s slew. The SlewHistory_slewCount column points to a given slew in the SlewHistory table.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The SlewMaxSpeeds table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_target_exposures
(metadata)[source]¶ Create TargetExposures table.
This function creates the TargetExposures table from the target exposures.
Table Description:
This table contains all of the individual exposure information for each target in the TargetHistory table. The number of exposures for a target is determined by the requesting proposal’s exposure cadence.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The Target Exposure table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_target_history
(metadata)[source]¶ Create TargetHistory table.
This function creates the TargetHistory table for tracking all the requested targets from the Scheduler in the simulation run.
Table Description:
This table keeps a record of the information from the requested targets during a simulated survey.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The TargetHistory table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_target_proposal_history
(metadata)[source]¶ Create the TargetProposalHistory table.
This function creates the TargetProposalHistory table for listing all proposals that are assigned to a given target.
Table Description:
This table records all of the proposals and proposal information for a given target.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The TargetProposalHistory table object.
-
lsst.sims.ocs.database.tables.base_tbls.
create_unscheduled_downtime
(metadata)[source]¶ Create the UnscheduledDowntime table.
This function creates the UnscheduledDowntime table for list the unscheduled downtime during the survey.
Table Description:
This table records all of the unscheduled downtime for the entire survey (plus an extra 10 years). The actual downtime used in the simulation maybe different depending on the length of the simulation.
Parameters: metadata (sqlalchemy.MetaData) – The database object that collects the tables. Returns: sqlalchemy.Table – The UnscheduledDowntime table object.