I have images saved with RA and Dec in the OBJCTRA and OBJCTDEC keywords in the FITS header. Could a future release of ASTAP try to read these values if RA/Dec values have not been otherwise specified?
For example:
OBJCTRA '20 26 01' / Nominal Right Ascension of center of image
OBJCTDEC '+49 56 19' / Nominal Declination of center of image
-Ray
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
These keywords are already read. Maybe conflicting information? Could you upload a FITS example to nova.astrometry.net or an other place for investigation and provide the link so i can have a look?
Clear skies, Han
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The FITS header is not according the FITS standard. The RA, DEC string information in the header is too much to the right. The FITS standard states at chapter 4.2.1.1 that the first single-quote must start at position 11 but it starts much later. So ASTAP reads only spaces.
Now is the question is what to do. The image if from 2018. I could extra code to cope with the problem but the software could have been corrected to follow the FITS standard.
If it is a problem for you, I could compile a special ASTAP version with a correction code.
Han
Header:
OBJCTRA = '19 26 50' / Nominal Right Ascension of center of image
OBJCTDEC= '+49 57 42' / Nominal Declination of center of image
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The FITS header is not according the FITS standard. The RA, DEC string information in the
header is too much to the right. The FITS standard states at chapter 4.2.1.1 that the first
single-quote must start at position 11 but it starts much later. So ASTAP reads only spaces.
I finally have had a chance to get back to adding ASTAP as a plate solver to an application so I was researching some FITS format
details. I think the actual chapter seems to be 5.2.1 (instead of 4.2.1) at this link:
If I am reading this correctly, the requirement for the first-single quote at column 11 is only for fixed format character strings.
The next paragraph states:
"Free format character strings follow the same rules as fixed format character strings except that the starting and closing single
quote characters may occur anywhere within columns 11-80."
So, I guess it comes down to whether or not a keyword is "fixed format" or "free format". I don't think you need to change ASTAP to
account for this, but maybe keep it in mind.
Best regards,
-Ray
-----Original Message-----
From: han.k [mailto:han59@users.sourceforge.net]
Sent: Monday, January 11, 2021 1:26 AM
To: [astap-program:discussion]
Subject: [astap-program:discussion] Plate solver does not read FITS Header keywords for RA, DEC (OBJCTRA
and OBJCTDEC)
Hello Ray,
The FITS header is not according the FITS standard. The RA, DEC string information in the header is too much to
the right. The FITS standard states at chapter 4.2.1.1 that the first single-quote must start at position 11 but it starts
much later. So ASTAP reads only spaces.
Now is the question is what to do. The image if from 2018. I could extra code to cope with the problem but the
software could have been corrected to follow the FITS standard.
If it is a problem for you, I could compile a special ASTAP version with a correction code.
Han
Header:
OBJCTRA = '19 26 50' / Nominal Right Ascension of center of image
OBJCTDEC= '+49 57 42' / Nominal Declination of center of image
Okay, my mistake on that image. I have images going back from many years of testing and I chose a file randomly to compare accuracy and performance against other plate solvers. I am not sure how the format came to be right-justified instead of left-justified in images from that folder.
-Ray
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I checked and images from this year have proper formatting. Both the older image and images from this year were created using MaximDL, but I am guessing that one of my test utilities could have modified it. However it happened, I can easily fix the header format of any FITS files with this type of formatting error. There is no need for you to modify ASTAP, but thanks for offering!
In regards to plate solving using details in the FITS header, which FITS keywords can be used by ASTAP as plate solving hints? (e.g., for determining image scale)
-Ray
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can I assume that:
1. FITS RA pixel scale values affected by declination should be normalized for Declination=0.
2. ASTAP will also use the corresponding Declination FITS keywords?
-Ray
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The type" fixed format character" and "Free format character" you found in that document are not defined in the " Fits standard 4.0" The standard only talks about strings.
The type" fixed format character" and "Free format character" you found in that
document are not defined in the " Fits standard 4.0" The standard only talks about strings.
Correct me if I am wrong, but there is the paragraph defining free-format character strings in section 4.2.1 of Version 4.0 (13
August 2018).
"Free-format character strings follow the same rules as fixed format character strings except that the starting single-quote
character may occur after Byte 11. Any bytes preceding the starting quote character and after Byte 10 must contain the space
character."
-----Original Message-----
From: han.k [mailto:han59@users.sourceforge.net]
Sent: Sunday, May 16, 2021 2:33 PM
To: [astap-program:discussion]
Subject: [astap-program:discussion] Plate solver does not read FITS Header keywords for RA,DEC (OBJCTRA
and OBJCTDEC)
The type" fixed format character" and "Free format character" you found in that document are not defined in the "
Fits standard 4.0" The standard only talks about strings.
You absolute correct. "Free-format" is mentioned and not "free format". :)
One could say either, just like "fixed format" could be written as "fixed-format". The real issue is that the official FITS
specification does not always require a single quote in column 11 for strings. I looked this up because I have encountered a number
of recent FITS files with right-justified strings in single quotes.
The question to ask, if the RA and DEC keyword datatype is defined as real or string.
Is free-format string then allowed?
The spec does not specify. RA and Dec keywords are optional but recommended. And, as you say, can be either in real or string format
according to this link:
BTW, I looked back at the first FITS reader I made over 20 years ago, and it will accept free-format strings. It seems that since
some keyword values may have a free-format string value, rejecting a FITS file for not having a single quote in column 11 may be too
stringent?
-Ray
Last edit: han.k 2021-05-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This works for OBJCTRA and OBJCTDEC, It doesn't work for keywords RA and DEC. There the program reads only floats. I never came across an RA keyword with a string.
The Linux and Mac version will follow very soon.
Han
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have images saved with RA and Dec in the OBJCTRA and OBJCTDEC keywords in the FITS header. Could a future release of ASTAP try to read these values if RA/Dec values have not been otherwise specified?
For example:
OBJCTRA '20 26 01' / Nominal Right Ascension of center of image
OBJCTDEC '+49 56 19' / Nominal Declination of center of image
-Ray
Hello Ray,
These keywords are already read. Maybe conflicting information? Could you upload a FITS example to nova.astrometry.net or an other place for investigation and provide the link so i can have a look?
Clear skies, Han
Hi Han,
I've attached a zipped FITS file example. The approximate coordinates are in the filename and in the FITS Header.
I am using the GUI version, B0.9.469 64-bit, dates 2021-1-3.
I load this file through the File menu and the RA and Dec fields have a red background.
-Ray
Hello Ray,
The FITS header is not according the FITS standard. The RA, DEC string information in the header is too much to the right. The FITS standard states at chapter 4.2.1.1 that the first single-quote must start at position 11 but it starts much later. So ASTAP reads only spaces.
Now is the question is what to do. The image if from 2018. I could extra code to cope with the problem but the software could have been corrected to follow the FITS standard.
If it is a problem for you, I could compile a special ASTAP version with a correction code.
Han
Header:
OBJCTRA = '19 26 50' / Nominal Right Ascension of center of image
OBJCTDEC= '+49 57 42' / Nominal Declination of center of image
Hello Han,
I finally have had a chance to get back to adding ASTAP as a plate solver to an application so I was researching some FITS format
details. I think the actual chapter seems to be 5.2.1 (instead of 4.2.1) at this link:
https://archive.stsci.edu/fits/fits_standard/node31.html#SECTION00921000000000000000
If I am reading this correctly, the requirement for the first-single quote at column 11 is only for fixed format character strings.
The next paragraph states:
"Free format character strings follow the same rules as fixed format character strings except that the starting and closing single
quote characters may occur anywhere within columns 11-80."
So, I guess it comes down to whether or not a keyword is "fixed format" or "free format". I don't think you need to change ASTAP to
account for this, but maybe keep it in mind.
Best regards,
-Ray
Hi Han,
Okay, my mistake on that image. I have images going back from many years of testing and I chose a file randomly to compare accuracy and performance against other plate solvers. I am not sure how the format came to be right-justified instead of left-justified in images from that folder.
-Ray
If new images have the same problem, report it. Feedback is important.
Han
I checked and images from this year have proper formatting. Both the older image and images from this year were created using MaximDL, but I am guessing that one of my test utilities could have modified it. However it happened, I can easily fix the header format of any FITS files with this type of formatting error. There is no need for you to modify ASTAP, but thanks for offering!
In regards to plate solving using details in the FITS header, which FITS keywords can be used by ASTAP as plate solving hints? (e.g., for determining image scale)
-Ray
There are several backup keywords:
for the ra
OBJCTRA,
RA
CRVAL1
for the fov:
CDELT2,
secpix1/2
pixscale
xpixsz
focall
scale
cd1_1, cd1_2
If one is missing I just add it. So it has grown slowly.
Han
Okay, thanks Han.
Can I assume that:
1. FITS RA pixel scale values affected by declination should be normalized for Declination=0.
2. ASTAP will also use the corresponding Declination FITS keywords?
-Ray
Yes it should all work with many different FITS files. I keep here a collection of FITS samples for testing.
The type" fixed format character" and "Free format character" you found in that document are not defined in the " Fits standard 4.0" The standard only talks about strings.
FITS standard 4.0 is here:
https://fits.gsfc.nasa.gov/fits_standard.html
RA, DEC keyword are defined here:
https://heasarc.gsfc.nasa.gov/docs/fcg/common_dict.html
Han
Hi Han,
Correct me if I am wrong, but there is the paragraph defining free-format character strings in section 4.2.1 of Version 4.0 (13
August 2018).
"Free-format character strings follow the same rules as fixed format character strings except that the starting single-quote
character may occur after Byte 11. Any bytes preceding the starting quote character and after Byte 10 must contain the space
character."
Here's a screenshot and a link to the PDF:
https://fits.gsfc.nasa.gov/standard40/fits_standard40aa-le.pdf
-Ray
You absolute correct. "Free-format" is mentioned and not "free format". :)
If ASTAP doesn't find the single-quote character at 11, it will try to read a free format real. Then it gives up.
The question to ask, if the RA and DEC keyword datatype is defined as real or string. Is free-format string then allowed?
Hi Han,
One could say either, just like "fixed format" could be written as "fixed-format". The real issue is that the official FITS
specification does not always require a single quote in column 11 for strings. I looked this up because I have encountered a number
of recent FITS files with right-justified strings in single quotes.
The spec does not specify. RA and Dec keywords are optional but recommended. And, as you say, can be either in real or string format
according to this link:
https://heasarc.gsfc.nasa.gov/docs/fcg/common_dict.html
BTW, I looked back at the first FITS reader I made over 20 years ago, and it will accept free-format strings. It seems that since
some keyword values may have a free-format string value, rejecting a FITS file for not having a single quote in column 11 may be too
stringent?
-Ray
Last edit: han.k 2021-05-17
I tested it with MaximDL version 5 and it reads free-format.
I have implemented free-format string in ASTAP version 0.9.539a. Windows version:
http://www.hnsky.org/astap_setup.exe
This works for OBJCTRA and OBJCTDEC, It doesn't work for keywords RA and DEC. There the program reads only floats. I never came across an RA keyword with a string.
The Linux and Mac version will follow very soon.
Han