deeplycloudy / xlma-python

A future, Python-based version of xlma?
MIT License
6 stars 6 forks source link

lma_read sort by time means that "event_id" and "number_of_events" are no longer identical #43

Open wx4stg opened 2 days ago

wx4stg commented 2 days ago

In d16e2e7 and subsequent PR #23, events in a multi-file lma dataset are now sorted by time by default. This occurs one line after the number_of_events variable is copied to event_id.

This means that before d16e2e7, number_of_events (xarray dimension) and event_id (xarray data var with dimensionnumber_of_events) were always identical, and after d16e2e7, this is no longer necessarily true (it could still be true, say if the user sorts the files before passing to pyxlma.lmalib.io.read.dataset(), but it isn't always true)

I'm not sure if these were ever guaranteed to be the same in the first place. If they were, it feels kind of redundant(?). I had always assumed this variable was there to represent the IDL xlma's event ID, but I had never bothered to check this... and the rename means that this hypothesis was a bad assumption.