Opened 10 years ago

Last modified 10 years ago

#230 assigned defect

Duchamp can not read my fits file

Reported by: udaraabeysekara@… Owned by: MatthewWhiting
Priority: normal Milestone:
Component: FITS reader Version: 1.6.1
Severity: major Keywords: FITS, Duchamp
Cc:

Description (last modified by MatthewWhiting)

We installed Duchamp 1.61 successfully and confirmed that my installation is good by running VerifyDuchamp?.sh. However, when we give our FITS file it give us the following error.

$Duchamp -p input1
WARNING <Reading parameters> : PGPlot has not been enabled, so setting flagXOutput, flagMaps, flagPlotSpectra and flagPlotIndividualSpectra to false.                                                                                                                                   
Opening image: allsky.fits                                                                                                                  
Dimensions of FITS file: 214125051624                                                                                                       
WARNING <Cube Reader> : 0x7fff37db0c08                                                                                                      
ERROR <Duchamp> : Unable to open image file allsky.fits                                                                                     

Duchamp failed with the following error:
Unable to open image file allsky.fits   

We made sure our FITS file is not damaged by opening the file in a different FITS file viewer.

Is there any special formatting we should do for the FITS files before use in Duchamp?

It would be really great if you could give a hint about the possible mistake.

We also installed the cfitsio and wcslib. We think we linked them correctly, because the Verification script ran successfully.

Thanks

Change History (4)

comment:1 Changed 10 years ago by MatthewWhiting

Description: modified (diff)
Status: newassigned

Thanks. The dimensions of the FITS file (as reported) seem to be strange, and judging by the 2nd WARNING message (which is garbled due to a bug, but I can see where it is coming from), there is something strange about the WCS in the FITS file.

I'm happy to take a look at it in more detail if you are able to make the FITS file available. How big is it? You can email me download details if you are able to make it available on a website or similar.

If you're not able to do that, are you able to show the FITS header here so I can see what we are working with?

comment:2 in reply to:  1 ; Changed 10 years ago by anonymous

Thank you very much for your reply. Following is the FITS header

SIMPLE = T / file does conform to FITS standard BITPIX = 8 / number of bits per data pixel NAXIS = 0 / number of data axes EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H DATE = '2014-02-01T19:49:30' / file creation date (YYYY-MM-DDThh:mm:ss UT) COMMENT Contents: Significance Map in sigma STARTMJD= 56456.8877510747 / MJD of first event STOPMJD = 56664.8946265869 / MJD of last event NEVENTS = 30017541980. / Number of events in map SUMWGTS = 30017541980. / Summed weights of events in map NBKG = 30017541982.1229 / Summed weight of background in map MAXDEC = 70. / Max declination [degrees] MINDEC = -30. / Min declination [degrees] DURATION= 1.9846184804113 / Avg integration time [hours] TOTDUR = 974.357038778026 / Total integration time [hours] MAXDUR = 2. / Max integration time [hours] MINDUR = 0. / Min integration time [hours] MAPTYPE = 'Sky ' / e.g. Skymap, Moonmap END XTENSION= 'BINTABLE' / binary table extension BITPIX = 8 / 8-bit bytes NAXIS = 2 / 2-dimensional binary table NAXIS1 = 8192 / width of table in bytes NAXIS2 = 12288 / number of rows in table PCOUNT = 0 / size of special data area GCOUNT = 1 / one data group (required keyword) TFIELDS = 1 / number of fields in each row TTYPE1 = 'significance map (Li/Ma? Eqn 17)' / label for field 1 TFORM1 = '1024D ' / data format of field: 8-byte DOUBLE TUNIT1 = 'unknown ' / physical unit of field EXTNAME = 'xtension' / name of this binary table extension PIXTYPE = 'HEALPIX ' / HEALPIX pixelisation ORDERING= 'RING ' / Pixel ordering scheme, either RING or NESTED NSIDE = 1024 / Resolution parameter for HEALPIX FIRSTPIX= 0 / First pixel # (0 based) LASTPIX = 12582911 / Last pixel # (0 based) INDXSCHM= 'IMPLICIT' / Indexing: IMPLICIT or EXPLICIT END

comment:3 in reply to:  2 ; Changed 10 years ago by MatthewWhiting

Thanks.

Reposting the header here for clarity (getting the wiki formatting right...):

SIMPLE  =                    T / file does conform to FITS standard             
BITPIX  =                    8 / number of bits per data pixel                  
NAXIS   =                    0 / number of data axes                            
EXTEND  =                    T / FITS dataset may contain extensions            COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H 
DATE    = '2014-02-01T19:49:30' / file creation date (YYYY-MM-DDThh:mm:ss UT)   COMMENT   Contents:   Significance Map in sigma                                 STARTMJD=     56456.8877510747 / MJD of first event                             
STOPMJD =     56664.8946265869 / MJD of last event                              
NEVENTS =         30017541980. / Number of events in map                        
SUMWGTS =         30017541980. / Summed weights of events in map                
NBKG    =     30017541982.1229 / Summed weight of background in map             
MAXDEC  =                  70. / Max declination [degrees]                      
MINDEC  =                 -30. / Min declination [degrees]                      
DURATION=      1.9846184804113 / Avg integration time [hours]                   
TOTDUR  =     974.357038778026 / Total integration time [hours]                 
MAXDUR  =                   2. / Max integration time [hours]                   
MINDUR  =                   0. / Min integration time [hours]                   
MAPTYPE = 'Sky     '           / e.g. Skymap, Moonmap                           END                                                                                                                                                                               
XTENSION= 'BINTABLE'           / binary table extension                         
BITPIX  =                    8 / 8-bit bytes                                    
NAXIS   =                    2 / 2-dimensional binary table                     
NAXIS1  =                 8192 / width of table in bytes                        
NAXIS2  =                12288 / number of rows in table                        
PCOUNT  =                    0 / size of special data area                      
GCOUNT  =                    1 / one data group (required keyword)              
TFIELDS =                    1 / number of fields in each row                   
TTYPE1  = 'significance map (Li/Ma Eqn 17)' / label for field   1               
TFORM1  = '1024D   '           / data format of field: 8-byte DOUBLE            
TUNIT1  = 'unknown '           / physical unit of field                         
EXTNAME = 'xtension'           / name of this binary table extension            
PIXTYPE = 'HEALPIX '           / HEALPIX pixelisation                           
ORDERING= 'RING    '           / Pixel ordering scheme, either RING or NESTED   
NSIDE   =                 1024 / Resolution parameter for HEALPIX               
FIRSTPIX=                    0 / First pixel # (0 based)                        
LASTPIX =             12582911 / Last pixel # (0 based)                         
INDXSCHM= 'IMPLICIT'           / Indexing: IMPLICIT or EXPLICIT                 
END 

So it appears the data you are trying to load is in HEALpix format, correct?

I'm afraid this won't be compatible with Duchamp's cfitsio interface: this assumes a standard FITS image (ie. rectangular pixels/voxels, using the IMAGE extension). I haven't looked into HEALpix in detail before, but just checking it out now implies that it would need a different interface and possibly different underlying data structures to support it.

Are you able to make a flat image of your data that could be read by Duchamp? (I'm not *that* familiar with HEALpix, so how easy it is to transform your data to such a format is not clear to me...)

comment:4 in reply to:  3 Changed 10 years ago by anonymous

Thank you very much for identifying the issue. Yes my map is in HEALpix format. I will try to make changes to my map maker to make a flat FITS file.

Thanks Again Udara

Note: See TracTickets for help on using tickets.