Support #2195

ctselect radius filtering / ctlike data fitting

Added by Malyshev Denys over 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:09/17/2017
Priority:NormalDue date:
Assigned To:-% Done:

0%

Category:-
Target version:-
Duration:

Description

Filtering the observations with ctselect via distance to a given point seems to produce incorrect event selection, due to incorrect cfitsio expression. In example below this expression should be
ANGSEP ⇐ 15.0
instead of
ANGSEP ⇐ 2.520216
Please see lines below and attached .tgz . All 15 files in the archive correspond to “rad=15” selection, all "*UN*” – to “rad=UNDEF” selection with ctselect.

Using rad different than “UNDEF” with ctselect seems also to lead to incorrect results with the ctlike fit of the model (checked for “rad=4”, “rad=10”, rad=“15”).
If “rad != UNDEF”, the best-fit index for the cetral source, LSI is 2.8 +/ 0.026 (incorrect)
If “rad = UNDEF”, the best-fit index is 2.43 +/ 0.028 (correct ; -2.4 is given in 1DC source models)

Minimal command set to reproduce this behaviour:

csobsselect inobs=${CTADATA}/obs/obs_gps_baseline.xml outobs=obs.xml pntselect=CIRCLE coordsys=CEL ra=40.13 dec=61.23 rad=3
ctselect inobs=obs.xml outobs=selected.xml prefix=Data15/ ra=40.13 dec=61.23 emin=0.1 emax=200.0 tmin=UNDEF tmax=UNDEF rad=15
ctlike inobs=selected.xml inmodel=src.xmlI outmodel=src.xmlI.fitted15

Partial output of ctselect.log15

2017-09-17T10:39:49: === Events selection ===
2017-09-17T10:39:49: Selected energy range .....: 0.1 - 50 TeV
2017-09-17T10:39:49: Requested RoI .............: Centre(RA,DEC)=(40.13, 61.23) deg, Radius=15 deg
2017-09-17T10:39:49: RoI of data ...............: Centre(RA,DEC)=(37.0184, 59.2885) deg, Radius=5 deg
2017-09-17T10:39:49: Selected RoI ..............: Centre(RA,DEC)=(40.13, 61.23) deg, Radius=2.52021552238553 deg
2017-09-17T10:39:49: cfitsio selection .........: ENERGY >= 0.10000000 && ENERGY ⇐ 50.00000000 && ANGSEP ⇐ 2.520216
2017-09-17T10:39:49: FITS filename .............: /tmp/fileEX9FaL[EVENTS][ENERGY >= 0.10000000 && ENERGY ⇐ 50.00000000 && ANGSEP ⇐ 2.520216]

lsi.tgz (355 KB) Malyshev Denys, 09/17/2017 03:39 PM


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 6 years ago

  • Tracker changed from Bug to Support

I think everything is working as expected.

The log file says:

2017-09-17T10:39:49: Requested RoI .............: Centre(RA,DEC)=(40.13, 61.23) deg, Radius=15 deg
2017-09-17T10:39:49: RoI of data ...............: Centre(RA,DEC)=(37.0184, 59.2885) deg, Radius=5 deg
2017-09-17T10:39:49: Selected RoI ..............: Centre(RA,DEC)=(40.13, 61.23) deg, Radius=2.52021552238553 deg

So it does recognise the 15 deg radius, but the data have already been selected before with a 5 deg radius around RA=37.0184, Dec=59.2885. Since any new selection can only be more constraining, ctselect adjusts the radius to the maximum possible. The distance between the requested RoI centre (RA=40.13, Dec=61.23) and the RoI centre of the previous selection (RA=37.0184, Dec=59.2885) is 2.48 deg, hence only a circle of 5 - 2.48 = 2.52 deg can be inscribed in the original selection.

#2 Updated by Knödlseder Jürgen almost 6 years ago

  • Status changed from New to Closed

A change in the logic was implemented by Luigi, see #2500.

I guess this issue is thus closed.

Also available in: Atom PDF