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

Prefer 'livetime' field from GRL for the total livetime calculation. #217

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

tomaskontrimas
Copy link
Collaborator

In case the 'livetime' field exists in GRL definition, use it to calculate the total livetime. Fall back to 'stop' - 'start' calculation in case it does not exist.

This makes the GRL handling identical to csky: https://github.com/icecube/csky/blob/7bc9169f9df868c4ef8105bc51820c85986f8cec/csky/selections.py#L261-L267

For datasets with 'length' field we define renaming dictionary

dsc.set_dataset_prop('grl_field_name_renaming_dict', {
    'length': 'livetime'
})

in the dataset definition.

@tomaskontrimas tomaskontrimas added the enhancement New feature or request label Feb 20, 2024
@tomaskontrimas tomaskontrimas self-assigned this Feb 20, 2024
@tomaskontrimas tomaskontrimas merged commit 6343341 into master Feb 20, 2024
4 checks passed
@tomaskontrimas tomaskontrimas deleted the livetime_update branch February 20, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants