icecube / skyllh

https://icecube.github.io/skyllh/
GNU General Public License v3.0
11 stars 5 forks source link

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

Closed tomaskontrimas closed 9 months ago

tomaskontrimas commented 9 months ago

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.