Change request #2501

Change handling of spatial ROI selection in ctselect

Added by Tibaldo Luigi almost 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:06/08/2018
Priority:NormalDue date:
Assigned To:Tibaldo Luigi% Done:

100%

Category:-
Target version:1.6.0
Duration:

Description

Currently ctselect by default has usepnt set to False, meaning that the user has to provide the center and radius of the desired ROI. If the requested ROIs center is outside the original ROI the observation is dropped. Otherwise, if the requested ROI is not completely contained in the original ROI the resulting ROI has a radius reduced such that it is completely contained within the original one.
This sometimes produces unexpected results. Note that the internal logic of the tools, notably for unbinned likelihood analysis, requires to have circular ROIs.
After discussion with Jürgen we propose to change this as follows:
  • make usepnt True by default, so that the user normally trims the tail of the FoV using the rad parameter
  • if the requested ROI center and original ROI are the same keep the smaller radius between original ROI and requested one
  • if the centers do not coincide and the requested ROI is not within the original ROI throw an error
  • add a hidden parameter forcesel, that enables the user to bypass the exception above; in this case the events will be kept if they lie in the intersection between original and requested ROI, the ROI in the file will be left as the original one, and the log file will contain a warning saying that the files may produce wrong results if passed to other ctools/cscripts.

Recurrence

No recurrence.

History

#1 Updated by Tibaldo Luigi almost 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 40

Coded. Need to test and update documentation.

#2 Updated by Tibaldo Luigi almost 6 years ago

  • % Done changed from 40 to 80

Testing done, and ctools test unit modified according to changes.
Need to work on documentation.

#3 Updated by Tibaldo Luigi almost 6 years ago

  • Status changed from In Progress to Pull request
  • % Done changed from 80 to 100

Updated reference manual and quickstart tutorial on ctselect.
Ready for integration from my side.

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

  • Status changed from Pull request to Closed

Code merged into devel.

Also available in: Atom PDF