Error al abrir la imagen FITS contiene más de 3 canales (1)

Hi, I’m writing a Python script to convert XISF files to FITS, based on the Python module “xisf”. Usually the conversion is done fine and Siril doesn’t give me any errors, but this time I get this error:

00:05:57: Running command: clear
20:06:04: The FITS image contains more than 3 channels (1). Opening only the three first.
20:06:04: Fitsio error reading data, file: /Users/xisf/src/Salida.fits.
20:06:04: FITS error: Attempt to read past end of array:
20:06:04: FITS error:   Image has  26091648 elements;
20:06:04: FITS error:   Tried to read 78274944 elements starting at element 1.
20:06:04: Opening /Users/xisf/src/Salida.fits failed.

SIRIL v1.2.3, installed from MacOS Packages

This is the HEADER of the FITS that when I open it with Siril gives me an error:

Image dimensions:: (1, 4176, 6248)

Header:

COMMENT PixInsight image preprocessing pipeline                                 
COMMENT Master frame generated with Weighted Batch Preprocessing Script v2.5.9  
COMMENT Integration with PixInsight 1.8.9-1                                     
COMMENT Astrometric solution by PixInsight 1.8.9-1                              
IMAGETYP= 'Master Light'       / Type of image                                  
XBINNING= '1       '           / Binning factor, horizontal axis                
YBINNING= '1       '           / Binning factor, vertical axis                  
FILTER  = 'O       '           / Filter used when taking image                  
EXPTIME = '120.00  '           / Exposure time in seconds                       
INSTRUME= 'ZWO ASI2600MM Pro'  / Name of instrument                             
XPIXSZ  = '3.76    '           / Pixel size including binning, X-axis (um)      
YPIXSZ  = '3.76    '           / Pixel size including binning, Y-axis (um)      
EGAIN   = '0.182122'           / Camera gain in electrons per data number       
TELESCOP= 'ioptron gen28'      / Name of telescope                              
FOCALLEN= '342.58169'          / Focal length (mm)                              
OBJECT  = 'NGC 3324'           / Name of observed object                        
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
RA      = '159.5855140535311'  / Right ascension of the center of the image (deg
DEC     = '-59.22061700545007' / Declination of the center of the image (deg)   
DATE-OBS= '2023-04-12T00:49:42.590' / Start date/time of observation (UTC)      
DATE-END= '2023-04-12T00:51:42.590' / End date/time of observation (UTC)        
OBSGEO-L= '-70.923889'         / Geodetic longitude of observation location (deg
OBSGEO-B= '-53.162778'         / Geodetic latitude of observation location (deg)
OBSGEO-H= '0       '           / Geodetic height of observation location (m)    
HISTORY Integration with ImageIntegration module version 1.5.1                  
HISTORY Integration with ImageIntegration process                               
HISTORY ImageIntegration.pixelCombination: Average                              
HISTORY ImageIntegration.outputNormalization: Additive + scaling                
HISTORY ImageIntegration.weightMode: PSF Signal Weight                          
HISTORY ImageIntegration.scaleEstimator: Biweight midvariance                   
HISTORY ImageIntegration.rangeRejection: range_low=0.000000                     
HISTORY ImageIntegration.pixelRejection: Generalized extreme Studentized deviate
HISTORY ImageIntegration.rejectionNormalization: Scale + zero offset            
HISTORY ImageIntegration.rejectionClippings: low=yes high=yes                   
HISTORY ImageIntegration.rejectionParameters: esd_outliers=0.30 esd_alpha=0.05 eHISTORY sd_low=1                                                                
HISTORY ImageIntegration.numberOfImages: 240                                    
HISTORY ImageIntegration.totalPixels: 1967028224                                
HISTORY ImageIntegration.outputRangeLow: 1.10983686e-03                         
HISTORY ImageIntegration.outputRangeHigh: 9.86241758e-01                        
HISTORY ImageIntegration.totalRejectedLow: 30383369(0.485%)                     
HISTORY ImageIntegration.totalRejectedHigh: 5388109(0.086%)                     
.
.
.
HISTORY ImageIntegration.imageWeights_239: 8.18221e-01                          
HISTORY ImageIntegration.scaleFactors_239: 9.285044e-01                         
HISTORY ImageIntegration.zeroOffsets_239: -5.787178e-04                         
HISTORY ImageIntegration.rejectedLow_239: 138432                                
HISTORY ImageIntegration.rejectedHigh_239: 27485                                
PSFFLX00= '2.6255e+03'         / Sum of PSF flux estimates, channel #0          
PSFFLP00= '1.2784e+04'         / Sum of squared PSF flux estimates, channel #0  
PSFMFL00= '4.1021e+01'         / Sum of mean PSF flux estimates, channel #0     
PSFMFP00= '5.2117e-02'         / Sum of mean squared PSF flux estimates, channel
PSFMST00= '2.5006e-05'         / M* mean background estimate, channel #0        
PSFNST00= '3.8171e-05'         / N* noise estimate, channel #0                  
PSFSGN00= '46752   '           / Number of valid PSF flux estimates, channel #0 
NOISE00 = '2.3464e-05'         / Noise estimate, channel #0                     
NOISEL00= '2.546531e-05'       / Noise scaling factor, low pixels, channel #0   
NOISEH00= '6.437296e-04'       / Noise scaling factor, high pixels, channel #0  
NOISEA00= 'MRS     '           / Noise evaluation algorithm, channel #0         
PSFSGTYP= 'Moffat4 '           / PSF type used for signal estimation            
TIMESYS = 'UTC     '           / Time scale: Universal Time, Coordinated        
LONG-OBS= '-70.923889'         / Geodetic longitude (deg) (compatibility)       
LAT-OBS = '-53.162778'         / Geodetic latitude (deg) (compatibility)        
ALT-OBS = '0       '           / Geodetic height (m) (compatibility)            
OBJCTRA = '10 38 20.523'       / Right ascension (hours) (compatibility)        
OBJCTDEC= '-59 13 14.22'       / Declination (deg) (compatibility)              
RADESYS = 'ICRS    '           / Coordinates referred to ICRS / J2000.0         
CTYPE1  = 'RA---TAN'           / Axis1 projection: Gnomonic                     
CTYPE2  = 'DEC--TAN'           / Axis2 projection: Gnomonic                     
CRPIX1  = '3124.65450432'      / Axis1 reference pixel                          
CRPIX2  = '2088.84720891'      / Axis2 reference pixel                          
CRVAL1  = '159.5855263998806'  / Axis1 reference value                          
CRVAL2  = '-59.22061703523206' / Axis2 reference value                          
PV1_1   = '0       '           / Native longitude of the reference point (deg)  
PV1_2   = '0       '           / Native latitude of the reference point (deg)   
CD1_1   = '-3.9540842139e-05'  / Scale matrix (1,1)                             
CD1_2   = '0.0006277373807202' / Scale matrix (1,2)                             
CD2_1   = '0.0006274749261454' / Scale matrix (2,1)                             
CD2_2   = '3.94906035985e-05'  / Scale matrix (2,2)                             
REFSPLIN= 'T       '           / Thin plate spline astrometric solution availabl
CDELT1  = '0.0006287174428274216' / Axis1 scale                                 
CDELT2  = '-0.0006289804171109365' / Axis2 scale                                
CROTA1  = '93.60273683022901'  / Axis1 rotation angle (deg)                     
CROTA2  = '93.60273683022901'  / Axis2 rotation angle (deg)

This is a HEADER of a FITS that when I open it with Siril, it does NOT give me an error:

Image dimensions: (3, 813, 1216)

Header:

INSTRUME= 'QHY5III178M'        / Name of instrument                             
IMAGETYP= 'LIGHT   '           / Type of integrated image                       
XPIXSZ  = '4.8     '           / Pixel size including binning, X-axis (um)      
YPIXSZ  = '4.8     '           / Pixel size including binning, Y-axis (um)      
XBINNING= '2       '           / Pixel binning factor, X-axis                   
YBINNING= '2       '           / Pixel binning factor, Y-axis                   
TELESCOP= 'Orion 10"'          / Name of telescope                              
FOCALLEN= '1000    '           / Effective focal length (mm)                    
OBJECT  = 'NGC 7317'           / Name of observed object                        
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
RA      = '341.059508263754'   / Right ascension of the center of the image (deg
OBJCTRA = '22 44 14.282'       / Right ascension (hours) (compatibility)        
DEC     = '34.3826728723404'   / Declination of the center of the image (deg)   
OBJCTDEC= '+34 22 57.62'       / Declination (deg) (compatibility)              
DATE-OBS= '2024-08-17T21:17:22.597' / Date/time of start of observation (UTC)   
DATE-END= '2024-08-18T01:54:15.964' / Date/time of end of observation (UTC)     
OBSGEO-L= '-3.35   '           / Geodetic longitude of observation location (deg
LONG-OBS= '-3.35   '           / Geodetic longitude (deg) (compatibility)       
OBSGEO-B= '39.48333333'        / Geodetic latitude of observation location (deg)
LAT-OBS = '39.48333333'        / Geodetic latitude (deg) (compatibility)        
OBSGEO-H= '644     '           / Geodetic height of observation location (m)    
ALT-OBS = '644     '           / Geodetic height (m) (compatibility) 

Any idea if I should filter out some KEYWORDS from the XISF file from being written to the FITS?

Sorry to ask this here, maybe I need to ask the author of the “xisf” library.

Thanks

What I can say is that you should use the dev version of Siril because it natively reads XISF files.

1 Like

Es una excelente noticia!!!

Tnks.