Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time and pointing info not available for recent runs in merged run summary #1296

Open
Tracked by #320
morcuended opened this issue Sep 26, 2024 · 2 comments
Open
Tracked by #320
Assignees
Labels
invalid This doesn't seem right

Comments

@morcuended
Copy link
Member

morcuended commented Sep 26, 2024

Since 2023-12-05 the time start and pointing information that the merge run summary script produces.

2023-12-05 15821 DRS4 22 1969-12-31T23:59:52.000 nan nan nan nan

after moving to EVBv6 run start field in the run summary files is not available, so we need to take this info from the TCU database (as lstosa does, see snippet below):

def get_run_tstart_from_TCU(run_id: int, tcu_server: str):
    """Get start timestamps in ISOT format for a given run ID.

    Parameters
    ----------
    run_id : int
    tcu_server : str
        Host of the TCU database

    Returns
    -------
    run_id : int
    tstart : datetime.datetime

    Notes
    -----
    TCU Monitoring database can be accessed at 'lst101-int' server
    from lstanalyzer@tcs06 and cp's
    """

    client = MongoClient(tcu_server)
    collection = client["lst1_obs_summary"]["camera"]
    summary = collection.find_one({"run_number": run_id})

    if summary is not None:
        tstart = datetime.fromtimestamp(summary["tstart"])
   
    return tstart
@moralejo
Copy link
Collaborator

moralejo commented Oct 7, 2024

Was the info used in the pipeline? (and if so, why wasn't this spotted earlier?)

@morcuended
Copy link
Member Author

Not used in the analysis other than for bookkeeping of all the runs taken. However, this was revived to use this information for the dl2 to dl3 stage (name/main target coordinates) instead of accessing multiple times TCU database.

This is why it went unnoticed.

@morcuended morcuended added the invalid This doesn't seem right label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants