Evtool failing when using GTI files produced by flaregti

manipulate event files (pattern and flag selection, good time intervals application) and create images for survey or pointed observations of one or several eROSITA telescopes and energy bands.
Post Reply
jessicapilling
Posts: 4
Joined: Wed Jul 19, 2023 10:46 am

Evtool failing when using GTI files produced by flaregti

Post by jessicapilling »

Hello,

I'm encountering an issue with evtool where it is failing when I try and filter events with a gti file that has been produced by the flaregti task.

I made the gti file with the command:

flaregti $evt gtifile=flaregti.fits (where $evt is just the path to the raw data)

This ran without trouble and the file flaregti.fits was created.
Then I ran evtool:

evtool eventfiles="$evt" gti=flaregti.fits outfile="evt_filtered.fits"

And this produced the following error:
evtool: eSASS4EDR Apr 06 16:05:20 2023
evtool/read_tBinTable: **ERROR2** illegal HDU number- extension STDGTI
evtool/sanityCheck_tGTI: **STOP** External GTI: You must first allocate both columns.
evtool: FAILED

Any suggestions on how to apply the gti file from flaregti correctly?

Thanks a lot for the help!
Best,
Jessica
IanStewart
Posts: 4
Joined: Fri Jul 28, 2023 9:05 am

Re: Evtool failing when using GTI files produced by flaregti

Post by IanStewart »

Hi Jessica, I have in mind some workarounds to suggest, but I'd like to understand the problem a bit better first. FYI I am the present maintainer of evtool, and I kind of know what is going on with it, but I am much less familiar with flaregti and what to expect from it. Can I confirm that you used the EDR versions of both evtool and flaregti?

Cheers Ian
jessicapilling
Posts: 4
Joined: Wed Jul 19, 2023 10:46 am

Re: Evtool failing when using GTI files produced by flaregti

Post by jessicapilling »

Hi Ian,

I have been using the eSASS4EDR installed from the public website. In the file: eSASS4EDR/erosita/TASKS it says that I have got evtool v2.10.1, and flaregti flaregti v1.20.

Thanks for the help!
Let me know if you need anymore info from me.

Best,
Jessica
IanStewart
Posts: 4
Joined: Fri Jul 28, 2023 9:05 am

Re: Evtool failing when using GTI files produced by flaregti

Post by IanStewart »

Hi Jessica, sorry for the delay in getting back to you. I need to configure my profile in this forum so it sends me a mail when a new post appears... Anyway, I checked the doco for these old versions of flaregti and evtool. (BTW the numbers in TASKS are misleading - sorry about that!) It seems that flaregti of that vintage could output to a separate file (which I had not realized), apparently writing extensions STDGTIn, where n is 1 to 7, one for each of the cameras. evtool on the other hand can accept external GTI files, but alas requires a single extension (which it applies to all cameras) of name STDGTI. I was going to suggest you hack the output file of flaregti to be acceptable by evtool, but filtering all events with the flare from a single camera is probably not what you want to do.

A better idea seems to me to re-run flaregti, but leave its parameter 'gtifile' unset. According to the flaregti documentation, this should cause the task to write its output to extensions FLAREGTIn inside the event list itself. If you then apply evtool to the modified event list with its parameter 'gti' set to 'FLAREGTI', then evtool should do the correct thing.
IanStewart
Posts: 4
Joined: Fri Jul 28, 2023 9:05 am

Re: Evtool failing when using GTI files produced by flaregti

Post by IanStewart »

Hmm, seems TASKS is accurate after all.
Post Reply