Skip to content

EventList.read does not read additional columns or allow for the selection of a time column #938

@gabrielb09

Description

@gabrielb09

Description of the Bug

The Stingray API docs suggest that EventList.read can take keyword arguments that will be passed to "load_events_and_gtis" but in practice this does not appear to be happening, or at least in my case seems to have no effect. The EventList object has no place to store additional data that might be specified with the "additional_columns" kwarg and seems to exclusively read the "TIME" column for time values.

Steps/Code to Replicate the Bug

Starting with an OGIP event list I create a new barycentered, event list with the HEASOFT command "barycorr", i also produce a 3rd event list which contains both the telescope time arrival times and the barycentered times with "barytime=yes". I can confirm that all 3 event lists have the data I want.

Next I load each event list into Stingray using EventList.read, the first two are simply
EventList.read('file_name', 'hea')
and the 3rd is read in using:
EventList.read('file_name', 'hea', column='BARYTIME', additional_columns=['TIME'])

Expected Results

I would expect to have 3 EventLists.
1: an EventList with the telescope time event arrival times in the "EventList.time" attribute
2: an EventList with the barycetnered event arrival times in the "EventList.time" attribute
3: an EventList with the barycetnered event arrival times in the "EventList.time" attribute and an "additional_columns" attribute which contained the telescope time arrival times

As an additional check I also ran
EventList.read('file_name', 'hea', additional_columns=['BARYTIME'])
wich i would expect to produce an EventList with the telescope time event arrival times in the "EventList.time" attribute and an "additional_columns" attribute with the barycetnered times

Actual Results

I can confirm that the times stored in the first two event lists are different, as one would expect. The 3rd event list, however, is identical to the first. That is, the event list with "column='BARYTIME'" and the telescope time event list are the same. The EventList still read the "TIME" column from my event file instead of the requested "BARYTIME". Moreover, there is no attribute in the EventList class that stores the "additional_columns" attribute so it seems that either the additional columns are never read in or they are inaccessible to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt's a bug! Unexpected or unwanted behavior.help wantedWe need additional help with these issues!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions