Page 1 of 2
how to use srctool
Posted: Tue Feb 22, 2022 9:25 am
by lidawei
Hello everyone
I use eSASS by docker in macOS. When I used srctool, I got a problem. Below is my code:
idies@352892ede8b2:~/workspace$ ls
eRO_MPE_RP_EDR_300007-1.pdf eRO_MPE_RP_EDR_300010-1.pdf fm00_300009_020_EventList_c001.fits point2.fits
eRO_MPE_RP_EDR_300008-1.pdf fm00_300007_020_EventList_c001.fits fm00_300010_020_EventList_c001.fits
eRO_MPE_RP_EDR_300009-1.pdf fm00_300008_020_EventList_c001.fits point.fits
idies@352892ede8b2:~/workspace$ srctool eventfiles="point.fits" exttype="POINT" srccoord="fk5;9.09239,+0.0209" todo="SPEC"
/home/idies/sw/eSASS4EDR/bin/src/srctool: Initialising data structures
/home/idies/sw/eSASS4EDR/bin/src: eSASS4EDR Sep 02 09:43:31 2021
/home/idies/sw/eSASS4EDR/bin/src/srctool: Interpreting input parameters
/home/idies/sw/eSASS4EDR/bin/src/srctool: Reading in eventfile(s)
/home/idies/sw/eSASS4EDR/bin/src/srctool_evtlist_read_from_file: **ERROR3** FITSIO error (status=301): illegal HDU number
/home/idies/sw/eSASS4EDR/bin/src/srctool_evtlist_read_evtlists_f: **ERROR3** Problem reading evtlist from file: point.fits
/home/idies/sw/eSASS4EDR/bin/src/srctool: **STOP** Error reading input events tables: point.fits
/home/idies/sw/eSASS4EDR/bin/src: FAILED
If you know how to solve it please teach me. Thank you!
Best regards
Dawei
Re: how to use srctool
Posted: Tue Feb 22, 2022 9:32 am
by JeremySanders
Dear Dawei
Could you please tell us how point.fits was generated from the initial event file?
Thanks
Jeremy
PS I would generate an ARF with the SPEC to ensure the exposure times and backscal are correct.
Re: how to use srctool
Posted: Tue Feb 22, 2022 10:06 am
by lidawei
Dear Jeremy
Thanks for your reply.
The initial event file is "eFEDS_C001_Main_PointSources_CTP_redshift_V17.fits". I just changed its name to "point.fits".
Regards
Dawei
Re: how to use srctool
Posted: Tue Feb 22, 2022 11:16 am
by JeremySanders
Dawei - Can you explain how this file was generated from the supplied EDR event files, please? Thanks, Jeremy
Re: how to use srctool
Posted: Tue Feb 22, 2022 11:26 am
by lidawei
Dear Jeremy
Sorry I don't understand what you mean. This file is a point source catalogue, and the galaxie I need is in this catalogue.
I don't know if this answer will help you. Thank you.
Regards
Dawei
Re: how to use srctool
Posted: Tue Feb 22, 2022 12:03 pm
by JeremySanders
The parameter eventfiles= gives the event files to extract the spectra from, not the catalogue of point sources. The catalogue of sources is given in the srccoord= parameter (in eSASS format). Please read the documentation for more information.
Re: how to use srctool
Posted: Wed Feb 23, 2022 9:17 am
by lidawei
Thanks! I understand what you mean. I found the correct event file and its name is: fm00_300009_020_EventList_c001.fits.
I need to extract the spectrum of the galaxy I need from this file within a circle of 50′′ in diameter, and the name of this galaxy is eFEDS J090923.9+000209. But I haven't been able to successfully get the result I want. It display: syntax error near unexpected token `)', I don't understand why?
Below is the code I use:
srctool eventfiles="fm00_300009_020_EventList_c001.fits" srccoord="icrs; circle(9.09239,+0.02090,50")" exttype="POINT" todo="SPEC"
bash: syntax error near unexpected token `)'
Please how should I improve my code?
Re: how to use srctool
Posted: Wed Feb 23, 2022 1:32 pm
by JeremySanders
Firstly, the double quote (") character preserves what's inside, but you can't put a double quote in quotes without escaping it. You can try a backslash, or put your double quotes inside single quotes. This is a function of the unix shell - have a look at a unix shell reference guide.
Secondly, the srccoord parameter is for coordinates, not region specifications. Have a look at the examples in the srctool documentation.
Probably you want something like
Code: Select all
srctool eventfiles="fm00_300009_020_EventList_c001.fits" srccoord="icrs;9.09239,+0.02090" exttype="POINT" todo="ALL" srcreg='icrs;circle * * 50s' backreg='icrs;annulus * * 90s 120s'
The "*" are filled in with the source coordinates (they can be given explicitly instead). s means arcsec ("*). The brackets in regions are optional for srctool.
Re: how to use srctool
Posted: Thu Feb 24, 2022 5:45 am
by lidawei
Thanks for your advice. I have modified the code according to your suggestion and got eight fit files for source spectra. But I can't open these fit files with ds9, I don't understand where is the problem? And I don't know why I got 8 files rather than 1.
Re: how to use srctool
Posted: Thu Feb 24, 2022 10:02 am
by JeremySanders
You get products from srctool from each telescope module on eROSITA and a combined one (TM0).
If you're trying to view spectra in ds9, it shows that you really need to understand the basics of X-ray spectral fitting before going any further. I recommend reading a book on the basics of X-ray astronomy (see e.g. Handbook of X-ray Astronomy, Arnaud et al.). There are also various tutorials you can find available online for spectral fitting software (e.g. Xspec) you can follow and understand first before using eSASS.
This forum is intended to get help using eSASS if you already have some X-ray astronomy experience.