StingraySoftware / stingray

Anything can happen in the next half hour (including spectral timing made easy)!
https://stingray.science/stingray
MIT License
166 stars 137 forks source link

Error opening NICER event files #826

Closed matteolucchini1 closed 1 month ago

matteolucchini1 commented 1 month ago

Description of the Bug

When trying to open an event file produced by nicerl2, stingray returns the warning: UserWarning: Column energy not found

Strangely, this seems to also depend on obsid and/or whether one uses "ogip" or "hea" to read the event file

Steps/Code to Replicate the Bug

fname = "ni1200120199_0mpu7_cl.evt"

fname = "ni1200120156_0mpu7_cl.evt"

events = EventList.read(fname, "ogip") events.fname = fname energy_band = [0.3,12.] events_filtered = events.filter_energy_range(energy_band)

Expected Results

With older distributions I could use the code above to filter my event file and then produce spectral timing products like in the documentation

Actual Results

The code raises the warning above, and then causes the notebook to crash. Changing from "hea" to "ogip" works for obsid 156, but not 199, which I suspect is due to just running out of ram (out of the 16gb my laptop has).

Both obsids I'm looking at were reduced using my code, which essentially just calls nicerl2 with autoscreen turned on and ignoring detectors 14 and 34 (https://github.com/matteolucchini1/Chromie/tree/master).

matteolucchini1 commented 1 month ago

Apologies for the confusion, I think it's a memory issue on my end.