<p>Using Fits <a href="http://heasarc.gsfc.nasa.gov/ftools/fv" rel="nofollow noreferrer">Fits View (FV)</a>View (FV), you can either modify the header by terminal commands, or using the GUI which makes you visualize all the keywords and values.</p>

CC BY-SA 3.0
2017-09-25T07:11:15.187Z
2017-09-25T07:11:15.187Z
Py-ser
<p>I'm working with some NEOWISE images that seem to have incomplete header tags. I've been advised by the SAO (because I'm using DS9 to view them) that I have</p>

<p>"a partial PC matrix defined, yet it does not conform to the FITS WCS standard. With a combo of CDELT and PC keywords, the CDELT keywords hold the scaling factor, the PC keywords, the rotation matrix, which should be normalized. If you want the rotation matrix to also contain the scale factor, use CD keywords".</p>

<p>Here's one of the headers I need to fix:</p>

<pre><code>SIMPLE  =                    T / conforms to FITS standard                      
BITPIX  =                  -32 / array data type                                
NAXIS   =                    2 / number of array dimensions                     
NAXIS1  =                 1459                                                  
NAXIS2  =                  903                                                  
WCSAXES =                    2 / Number of coordinate axes                      
CRPIX1  =                729.5 / Reference pixel for axis 1                     
CRPIX2  =                451.5 / Reference pixel for axis 2                     
PC1_1   =     -0.0333333333333 / Coordinate transformation matrix element       
PC2_2   =      0.0333333333333 / Coordinate transformation matrix element       
CDELT1  =                   1. / [deg] Coordinate increment at reference point  
CDELT2  =                   1. / [deg] Coordinate increment at reference point  
CUNIT1  = 'deg     '           / Units of coordinate increment and value        
CUNIT2  = 'deg     '           / Units of coordinate increment and value        
CTYPE1  = 'GLON-AIT'           / Projection for axis1                           
CTYPE2  = 'GLAT-AIT'           / Projection for axis1                           
CRVAL1  =                   0. / [deg] Coordinate value at reference point      
CRVAL2  =                   0. / [deg] Coordinate value at reference point      
LONPOLE =                   0. / [deg] Native longitude of celestial pole       
LATPOLE =                  90. / [deg] Native latitude of celestial pole        
RADESYS = 'ICRS    '           / Equatorial coordinate system                   
BAND    = 'W1      '           / Wise Band                                      
END
</code></pre>

<p>I've already managed to fix a couple of the invalid tags, but apart from these minor edits, this is unaltered from the file that my research supervisor gave me. The FITS standard <a href="https://heasarc.gsfc.nasa.gov/docs/fcg/standard_dict.html" rel="nofollow noreferrer">here</a> gives descriptions of each of the tags, but I'm not sure how to implement the SAO's advice. Can anyone help me fix the tags?</p>

CC BY-SA 3.0
2017-09-24T22:38:52.317Z
Do you have Fits View (FV)? https://heasarc.gsfc.nasa.gov/ftools/fv/
Py-ser
CC BY-SA 3.0
2017-09-24T22:44:55.067Z
Oh, I didn't know about that! I've downloaded it now, thank you. My main issue is that I'm not sure how to implement the SAO's suggestions. I've been using astropy to edit the headers, so that's not the problem, although FV looks like it will make that more convenient.
Jim421616
<data-analysis><python><fits-header>
Problems with FITS headers
Jim421616
# Problems with FITS headers

(Asked by: username_0 on 2017-09-24)

I'm working with some NEOWISE images that seem to have incomplete header tags. I've been advised by the SAO (because I'm using DS9 to view them) that I have
"a partial PC matrix defined, yet it does not conform to the FITS WCS standard. With a combo of CDELT and PC keywords, the CDELT keywords hold the scaling factor, the PC keywords, the rotation matrix, which should be normalized. If you want the rotation matrix to also contain the scale factor, use CD keywords".
Here's one of the headers I need to fix:
SIMPLE  =                    T / conforms to FITS standard                      
BITPIX  =                  -32 / array data type                                
NAXIS   =                    2 / number of array dimensions                     
NAXIS1  =                 1459                                                  
NAXIS2  =                  903                                                  
WCSAXES =                    2 / Number of coordinate axes                      
CRPIX1  =                729.5 / Reference pixel for axis 1                     
CRPIX2  =                451.5 / Reference pixel for axis 2                     
PC1_1   =     -0.0333333333333 / Coordinate transformation matrix element       
PC2_2   =      0.0333333333333 / Coordinate transformation matrix element       
CDELT1  =                   1. / [deg] Coordinate increment at reference point  
CDELT2  =                   1. / [deg] Coordinate increment at reference point  
CUNIT1  = 'deg     '           / Units of coordinate increment and value        
CUNIT2  = 'deg     '           / Units of coordinate increment and value        
CTYPE1  = 'GLON-AIT'           / Projection for axis1                           
CTYPE2  = 'GLAT-AIT'           / Projection for axis1                           
CRVAL1  =                   0. / [deg] Coordinate value at reference point      
CRVAL2  =                   0. / [deg] Coordinate value at reference point      
LONPOLE =                   0. / [deg] Native longitude of celestial pole       
LATPOLE =                  90. / [deg] Native latitude of celestial pole        
RADESYS = 'ICRS    '           / Equatorial coordinate system                   
BAND    = 'W1      '           / Wise Band                                      
END

I've already managed to fix a couple of the invalid tags, but apart from these minor edits, this is unaltered from the file that my research supervisor gave me. The FITS standard here gives descriptions of each of the tags, but I'm not sure how to implement the SAO's advice. Can anyone help me fix the tags?

**Tags:** data-analysis, python, fits-header

> **Comments:**
> **username_1**: Do you have Fits View (FV)? https://heasarc.gsfc.nasa.gov/ftools/fv/  
> **username_0**: Oh, I didn't know about that! I've downloaded it now, thank you. My main issue is that I'm not sure how to implement the SAO's suggestions. I've been using astropy to edit the headers, so that's not the problem, although FV looks like it will make that more convenient.  

---

## 1 answers

### Answer by username_1 on 2017-09-25. Score: 1

Using Fits [Fits View (FV)](http://heasarc.gsfc.nasa.gov/ftools/fv)View (FV), you can either modify the header by terminal commands, or using the GUI which makes you visualize all the keywords and values.


---

