Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

FITS file exif data explanation?

  • Please log in to reply
5 replies to this topic

#1 alightner

alightner

    Lift Off

  • -----
  • topic starter
  • Posts: 6
  • Joined: 02 Jan 2019

Posted 09 March 2019 - 11:14 AM

All, I'm new to astrophotography and just started working with FITS files.  There's a tool I use to help read in exif data and use that to organize my photos for long term archiving called exiftool.  Exiftool didn't have support for fits files... until I asked their developer about it this week, and Phil was awesome and implemented support to get me back up and running immediately... talk about awesome support!  

 

Phil has been digging deeper into fits data and was wondering about some of the other variables in the exif data to expand exiftool's support for fits data:

 http://u88.n24.queen...5.html#msg51735

 

 

I was trying to figure out how some of the FITS parameters related to the usual tags extracted for images.  It seems that NAXIS1 (or ZNAXIS1) is typically the image width, and NAXIS2 (or ZNAXIS2) is the height.  What would you think about me changing the names of these to ImageWidth and ImageHeight?  These are tags that are universal across most image formats, and it could be useful to have these available for FITS images.

- Phil 

 

However, while the NAXIS1 appears to be the width in my tests, the FITS definitions indicate that might not always be true.

 

But this wording in the specification worries me:

NAXIS1 keyword. The value field shall contain a non-negative integer, giving the number of ASCII characters in each row of the table. This includes all the characters in the defined fields plus any characters that are not included in any field.

NAXIS2 keyword. The value field shall contain a non-negative integer, giving the number of rows in the table.

So NAXIS1 is probably not the image width if the table is ASCII (how many ASCII characters does it take to specify a pixel?).  But NAXIS2 is likely the height.

- Phil 

 

Can anyone with more FITS experience help explain this in greater detail, or provide samples where NAXIS1 is used differently?

Thanks!


Edited by alightner, 09 March 2019 - 01:31 PM.


#2 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 22909
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 09 March 2019 - 12:18 PM

Is your keyword NXAXIS1, or NAXIS1? 


  • alightner likes this

#3 Mark326

Mark326

    Messenger

  • -----
  • Posts: 435
  • Joined: 26 Jul 2017
  • Loc: Florida

Posted 09 March 2019 - 12:29 PM

Here is what i found regarding standards for FITS keyword usage.

https://fits.gsfc.na...dictionary.html

NASA standard Keyword and meaning. Hope its useful.

#4 Jon Rista

Jon Rista

    ISS

  • *****
  • Posts: 22909
  • Joined: 10 Jan 2014
  • Loc: Colorado

Posted 09 March 2019 - 12:33 PM

It needs to be noted that FITS is a container, and each data block can contain ASCII or binary data. The verbiage Phil shared refers to ASCII blocks, however for astronomical image data, it should be binary data (int or real), and in those cases, I am pretty sure that NAXIS1 is the column count and NAXIS2 is the row count. Fields shouldn't apply to binary image data, so I don't think you would have to worry about field vs. non-field data. 

 

I am curious though if you have  NXASIXm keywords...or if it is indeed the NAXISm and was just typoed.



#5 alightner

alightner

    Lift Off

  • -----
  • topic starter
  • Posts: 6
  • Joined: 02 Jan 2019

Posted 09 March 2019 - 01:31 PM

Is your keyword NXAXIS1, or NAXIS1? 

Sorry - muscle memory reflex typo.  NAXIS1 is the keyword in question.

Thanks!



#6 pfile

pfile

    Aurora

  • -----
  • Posts: 4878
  • Joined: 14 Jun 2009

Posted 09 March 2019 - 02:31 PM

possibly adding to the confusion, many years ago SBIG proposed a bunch of FITS header keywords that you probably find today even in files not generated by SBIG software (cyanogen, which developed MaximDL, now owns SBIG, which is why this info lives on their server. however MaximDL may have implemented these things before Cyanogen bought SBIG)...

 

https://diffractionl...Definitions.htm

 

rob




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics