caracal-pipeline / MosaicQueen

A package with mosaicking commands from montage, that also does primary-beam correction for both 2D and 3D images.
GNU General Public License v3.0
4 stars 1 forks source link

KeyError: 'NAXIS3' #39

Closed francescaLoi closed 1 year ago

francescaLoi commented 1 year ago

I am using mosaic-queen with this command: mosaic-queen -i input_cubes -t images.fits -o output_cubes -n S1_tot_i -r -j 50 on cubes with a header like this:

SIMPLE  =                    T / conforms to FITS standard                      
BITPIX  =                  -32 / array data type                                
NAXIS   =                    4 / number of array dimensions                     
NAXIS1  =                 4096                                                  
NAXIS2  =                 4096                                                  
NAXIS3  =                    6                                                  
NAXIS4  =                    1                                                  
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H 
BUNIT   = 'JY/BEAM '           / Units are in Jansky per beam                   
BMAJ    =  0.00239178976487413                                                  
BMIN    =  0.00229104487382307                                                  
BPA     =     114.952522182553                                                  
EQUINOX =                2000. / J2000                                          
BTYPE   = 'Intensity'                                                           
TELESCOP= 'MeerKAT '                                                            
OBSERVER= 'Paolo Serra'                                                         
OBJECT  = 'mfs05   '                                                            
ORIGIN  = 'WSClean '           / W-stacking imager written by Andre Offringa    
CTYPE1  = 'RA---SIN'           / Right ascension angle cosine                   
CRPIX1  =                2049.                                                  
CRVAL1  =              56.7975                                                  
CDELT1  = -0.000694444444444444                                                 
CUNIT1  = 'deg     '                                                            
CTYPE2  = 'DEC--SIN'           / Declination angle cosine                       
CRPIX2  =                2049.                                                  
CRVAL2  =    -35.7244722222222                                                  
CDELT2  = 0.000694444444444444                                                  
CUNIT2  = 'deg     '                                                            
CTYPE3  = 'FREQ    '           / Central frequency                              
CRPIX3  =                    1                                                  
CRVAL3  =          949625000.0                                                  
CDELT3  =           100312500.                                                  
CUNIT3  = 'Hz    

The entire log is here.

francescaLoi commented 1 year ago

This issue is related to two aspect that are not related to MosaicQueen:

  1. the input images where cubes with names different from *image.fits which is something that the code requires to deal with the regridded images (R.fits). I fixed it but the code crashed again.
  2. the input cubes do not have the same CDELT3; it was not my intention to use cubes with different resolution in frequency (there was an error in another code I used to make the cubes) but I think that this is why the code crashed since after correcting it everything went smooth. I will close the issue now but maybe it could be worth to add a check on the resolution and report this specific error in the log...?
paoloserra commented 1 year ago

2. worth to add a check on the resolution and report this specific error in the log

Definitely! Do you mind opening a new issue with this suggestion?