SNEWS2 / snewpdag

SNEWS2 alert calculations
BSD 3-Clause "New" or "Revised" License
2 stars 13 forks source link

Fix time series #61

Closed dallaval5u closed 2 years ago

dallaval5u commented 2 years ago

Same thing as previous pull request, just added some comments

tsengj10 commented 2 years ago

This has puzzled me.

tuple += (dict, )

should be a valid operation. The error message seems to indicate that data['gen'] is a dictionary at this point, whereas it should be an array (list or tuple, but preferably a tuple) of dictionaries.

It's an easy mistake to make - I suspect we've stored some truth information such as the supernova position in data['gen'] as a dictionary (I know I've done that before). But I think the fix is to store the truth information somewhere else, e.g. data['truth'], and leave data['gen'] with its original purpose of accumulating different types of event which are then combined into a time series by Combine.