Fermitools-conda icon indicating copy to clipboard operation
Fermitools-conda copied to clipboard

Incorrect CAR projection in gtobssim/gtbin

Open anatolii-zenin opened this issue 4 years ago • 12 comments

I have encountered an issue when trying to simulate observation of an extended source with its morphology defined in a .fits file. The problem can be easily seen in this screenshot. The right part shows the input .fits file I provide to gtobssim, and the left part shows the output from gtbin. Unexpectedly, the shapes look different despite the fact their WCS values are the same, as can be seen in the lower part of the screenshot. The distorted image shown on the left changes if the source is moved to another position.

Is it a bug or do I do something wrong?

I use: fermitools 1.2.1 fermitools-data 0.17

$ uname -a Darwin zenin.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64

All the input and output files can be found here. The set of commands to reproduce the issue:

(fermi) $ gtobssim WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41). File of flux-style source definitions[ring_source_def.xml] File containing list of source names[ring_source_list.txt] Pointing history file[none] Prefix for output files[test_ring] Simulation time (seconds)[86400] Simulation start time (seconds wrt MET 0)[INDEF] Apply acceptance cone?[no] Response functions[P8R3_SOURCE_V2] Random number seed[293049] added source "test_source" Generating events for a simulation time of 86400 seconds....

(fermi) $ gtbin
WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41). This is gtbin version HEAD Type of output file (CCUBE|CMAP|LC|PHA1|PHA2|HEALPIX) [CMAP] Event data file name[test_ring_events_0000.fits] Output file name[ring_binned_cmap.fits] Spacecraft data file name[NONE] Size of the X axis in pixels[150] Size of the Y axis in pixels[150] Image scale (in degrees/pixel)[0.2] Coordinate system (CEL - celestial, GAL -galactic) (CEL|GAL) [CEL] First coordinate of image center in degrees (RA or galactic l)[270] Second coordinate of image center in degrees (DEC or galactic b)[30] Rotation angle of image axis, in degrees[0] Projection method e.g. AIT|ARC|CAR|GLS|MER|NCP|SIN|STG|TAN:[CAR] gtbin: WARNING: No spacecraft file: EXPOSURE keyword will be set equal to ontime.

anatolii-zenin avatar Jan 12 '20 16:01 anatolii-zenin