the format of backreg

produce source-level products (spectra, light curves and corresponding instrumental correction vectors/matrices).
Post Reply
lidawei
Posts: 28
Joined: Thu Nov 25, 2021 5:30 am

the format of backreg

Post by lidawei »

Hello everyone

When I tried to extract the spectra of a source, I defined a region to extract background spectra. But the shell reported errors.

My commands are:
srctool eventfiles="fm00_300007_020_EventList_c001.fits" srccoord="icrs;129.70069,4.12628" exttype="POINT" todo="SPEC RMF ARF EVENTS" srcreg="ICRS;circle 129.700690354 4.126280429 1.50000E-02" backreg="ICRS;annulus 129.700690354 4.126280429 2.55556E-02 1.25112E-01; ICRS;-circle 129.739767282 4.240532302 2.63889E-02; ICRS;-circle 129.602831426 4.255991721 2.19444E-02" outsrcreg=srcAUTO.reg outbackreg=bkgAUTO.reg clobber=yes

And errors are:
srctool/srctool_regions_interpret_regco: **ERROR3** Valid size/angle units are: " or s - arcseconds
srctool/srctool_regions_interpret_regco: **ERROR3** : ' or m - arcminutes
srctool/srctool_regions_interpret_regco: **ERROR3** : d - degrees
srctool/srctool_regions_interpret_regco: **ERROR3** : r - radians
srctool/srctool_param_interpret_region_: **ERROR3** Problem interpretting region description
srctool/srctool_param_interpret_src_par: **ERROR3** Error when interpreting BACK region descriptions
srctool/srctool_param_interpret_pars: **STOP** Error interpreting source and/or region parameters

Please how should I solve this problem? Looking forward to everyone's reply!

Best regards
Dawei
JeremySanders
Posts: 32
Joined: Mon Jun 28, 2021 7:24 am

Re: the format of backreg

Post by JeremySanders »

Hi Dawei

The documentation says that srctool only accepts a single component on the command line for the region. You can use a region files to have more than one component, e.g.

Code: Select all

srctool eventfiles="fm00_300007_020_EventList_c001.fits" srccoord="icrs;129.70069,4.12628" exttype="POINT" todo="SPEC RMF ARF EVENTS" srcreg="ICRS;circle 129.700690354 4.126280429 1.50000E-02" backreg=back.reg outsrcreg=srcAUTO.reg outbackreg=bkgAUTO.reg clobber=yes
where back.reg contains

Code: Select all

annulus 129.700690354 4.126280429 2.55556E-02 1.25112E-01
-circle 129.739767282 4.240532302 2.63889E-02
-circle 129.602831426 4.255991721 2.19444E-02
Jeremy
lidawei
Posts: 28
Joined: Thu Nov 25, 2021 5:30 am

Re: the format of backreg

Post by lidawei »

Hi Jeremy

I have solved this problem.
Thanks for your guidance.

Regards
Dawei
Post Reply