lstautorta.Auto_Calib
This script monitors the LST1 MongoDB database for new "calib_drs4" and "calib_ped_run" runs, and launches the appropriate calibration pipelines when new runs are detected.
Dependencies: - pymongo
Functions:
| Name | Description |
|---|---|
get_last_specific_run |
Query the LST1 MongoDB database for the most recent run of a specific type. |
get_night_timestamp |
Get current timestamp (YYYYMMDD) with respect to the night. |
main |
Main function of the script. Monitors the LST1 MongoDB database for new "calib_drs4" and "calib_ped_run" runs, and |
get_last_specific_run
Query the LST1 MongoDB database for the most recent run of a specific type.
:param kind_of_run: str The type of run to search for (e.g. "calib_drs4", "calib_ped_run")
:return: int The run number of the most recent run of the specified type, or -1 if an error occurs or no runs of that type are found.
Source code in src/lstautorta/Auto_Calib.py
get_night_timestamp
Get current timestamp (YYYYMMDD) with respect to the night. It will consider a same night everything run between 08h00 until 07h59 of the next day.
Ex: An observation launched at 04h00 (local time) will refer to the previous day.
:param today: datetime object datetime object with current local time
:return: timestamp: str
Source code in src/lstautorta/Auto_Calib.py
main
Main function of the script. Monitors the LST1 MongoDB database for new "calib_drs4" and "calib_ped_run" runs, and launches the appropriate calibration pipelines when new runs are detected.