How to barycenter eROSITA data

Data analysis
Post Reply
MattImbr
Posts: 6
Joined: Mon Feb 27, 2023 3:25 pm

How to barycenter eROSITA data

Post by MattImbr »

Hello everyone,

I recently installed eSASS and was getting familiar with eSASS tasks and eROSITA data analysis. I was looking at how to barycenter eROSITA data for timing analysis: how do you barycenter eROSITA data? Is there an eSASS task/option to barycenter the data? Should I use barycen from HEASoft instead?

Matteo
MiriamRamos
Posts: 23
Joined: Wed Jun 23, 2021 11:46 am

Re: How to barycenter eROSITA data

Post by MiriamRamos »

Hello Matteo,

eSASS, for the time being, does not offer a task or option to barycenter the data. You can use HEASoft instead. Here is how you can do it:

- You need an orbit file, which you can download from here: https://erosita.mpe.mpg.de/edr/eROSITAO ... rbitFiles/

- You need to split your event list into individual telescope modules, i.e., from the EDR page you obtain an event list that contains the seven TMs of eROSITA. Using the evtool task, you need to split it into seven event files, i.e., one per TM.

- Also, the headers of the event files need to be corrected:

keyword RADECSYS="ICRS"

keyword TIMEREF="LOCAL"

keyword TIMESYS="TT"

- Since barycen only recognizes the extension name "GTI", the name of the GTI extension needs to change to "GTI" before calling barycen and then changing back to its original name.

- The barycen task must be called with the following command line:

barycen infile=src_events_tm2.fits \
outfile=src_events_tm2_bary_icrs.fits \
orbfile=orbit_october_2019_scc.fits \
ra=104.9507468 \
dec=14.23963084 \
orbext="ORBIT" \
orbform="COMPONENTS" \
orbcol="X,Y,Z,VX,VY,VZ" \
startcol="START" \
stopcol="STOP" \
refframe="ICRS" \
orbinterp="WEIGHTED" \
timecol="TIME" \
chatter=3 \
clobber=yes \
debug=yes

- Once you perform this in every event file, you can again merge the seven corrected event files with evtool.

Let us know if this works.

Best wishes,

Miriam
MattImbr
Posts: 6
Joined: Mon Feb 27, 2023 3:25 pm

Re: How to barycenter eROSITA data

Post by MattImbr »

Hello,

Thank you for your suggestion, but I wasn't able to complete all the steps without errors.

First of all, to change the name of the keywords I followed the instructions reported here. However, once I split the original data from the EDR in the 7 modules I obtain less than 16 tables in the file. It is not clear to me where should I change the EXTNAME keyword and how to deal with the fact that the number of tables within a file (I tried this procedure with different observations) seems to change from one observation to another.

Even if I ignore all of this and try to barycenter the events once I merge the 7 files, let's say with the following command:

Code: Select all

evtool eventfiles="psrJ0537_tm1_bary.fits psrJ0537_tm2_bary.fits psrJ0537_tm3_bary.fits psrJ0537_tm4_bary.fits psrJ0537_tm5_bary.fits psrJ0537_tm6_bary.fits psrJ0537_tm7_bary.fits" outfile="psrJ0537_merge_bary.fits" clobber=yes
I obtain the following error and a corrupted fits is generated:

Code: Select all

evtool: eSASS4EDR mar 02 14:30:21 2023
 evtool/evtool_main: memset==.false., so memory setting for large files is used.
 evtool/evtool_main: Merging infiles.
 evtool/merge_extensions: Merging 7 files.
 evtool/merge_extensions: Infiles will be read 1 extension at a time.
 evtool/read_tBinTable: **ERROR2** illegal HDU number- extension CORRATT2
 evtool/read_extensions: **WARNING1** Extension CORRATT2 was expected but could not be read.
 evtool/merge_extensions: **WARNING1** Extension type 'CORRATT' is not present in all files: can't merge these extensions.
 evtool/read_tBinTable: **ERROR2** illegal HDU number- extension DEADCOR2
 evtool/read_extensions: **WARNING1** Extension DEADCOR2 was expected but could not be read.
 evtool/merge_extensions: **WARNING1** Extension type 'DEADCOR' is not present in all files: can't merge these extensions.
 evtool/read_tBinTable: **ERROR2** illegal HDU number- extension BADPIX2
 evtool/read_extensions: **WARNING1** Extension BADPIX2 was expected but could not be read.
 evtool/merge_extensions: **WARNING1** Extension type 'BADPIX' is not present in all files: can't merge these extensions.
 evtool/read_tBinTable: **ERROR2** illegal HDU number- extension HK21
 evtool/read_hks: **WARNING1** Extension HK21 was expected but could not be read.
 evtool/merge_extensions: **WARNING1** Extension type 'HKx1' is not present in all files: can't merge these extensions.
 evtool/read_tBinTable: **ERROR2** illegal HDU number- extension HK22
 evtool/read_hks: **WARNING1** Extension HK22 was expected but could not be read.
 evtool/merge_extensions: **WARNING1** Extension type 'HKx2' is not present in all files: can't merge these extensions.
 evtool/read_tBinTable: **ERROR2** illegal HDU number- extension HK23
 evtool/read_hks: **WARNING1** Extension HK23 was expected but could not be read.
 evtool/merge_extensions: **WARNING1** Extension type 'HKx3' is not present in all files: can't merge these extensions.
 evtool/read_tBinTable: **ERROR2** illegal HDU number- extension HK25
 evtool/read_hks: **WARNING1** Extension HK25 was expected but could not be read.
 evtool/merge_extensions: **WARNING1** Extension type 'HKx5' is not present in all files: can't merge these extensions.
 evtool/merge_extensions: **WARNING1** Extension type 'FLAREGTI' is not present in all files: can't merge these extensions.
 evtool/evtool_main: Applying filters.
 evtool/evtool_main: Writing outfile.
 evtool/write_tEventFile: Writing events.
 evtool/write_tEventFile: Writing events-extension extras.
 evtool/write_tBinTable: **STOP** Column TIME is not allocated.
 evtool: FAILED
How should I merge the files?

Matteo
Post Reply