Request for a new FITS keyword
Request for a new FITS keyword
Hello,
I'm one of the developer of Siril software.
We recently wrote a short document explaining why we've had added a new FITS keyword and why we would like that every FITS data producers do the same.
The document: http://free-astro.org/index.php?title=S ... rientation
In addition to this (we will add this to the doc soon), from https://ui.adsabs.harvard.edu/abs/2002A ... G/abstract :
5.1. Image display conventions
It is very helpful to adopt a convention for the display of images transferred via the FITS format. Many of the current image processing systems have converged upon such a convention. Therefore, we recommend that FITS writers order the pixels so that the first pixel in the FITS file (for each image plane) be the one that would be displayed in the lower-left corner (with the first axis increasing to the right and the second axis increasing upwards) by the imaging system of the FITS writer. This convention is clearly helpful in the absence of a description of the world coordinates. It does not preclude a program from looking at the axis descriptions and overriding this convention, or preclude the user from requesting a different display. This convention also does not excuse FITS writers from providing complete and correct descriptions of the image coordinates, allowing the user to determine the meaning of the image. The ordering of the image for display is simply a convention of convenience, whereas the coordinates of the pixels are part of the physics of the observation.
Do you think it would be possible to introduce this keyword in sharpcap ? EKOS/INDI has just introduced it.
My best regards,
Cyril
I'm one of the developer of Siril software.
We recently wrote a short document explaining why we've had added a new FITS keyword and why we would like that every FITS data producers do the same.
The document: http://free-astro.org/index.php?title=S ... rientation
In addition to this (we will add this to the doc soon), from https://ui.adsabs.harvard.edu/abs/2002A ... G/abstract :
5.1. Image display conventions
It is very helpful to adopt a convention for the display of images transferred via the FITS format. Many of the current image processing systems have converged upon such a convention. Therefore, we recommend that FITS writers order the pixels so that the first pixel in the FITS file (for each image plane) be the one that would be displayed in the lower-left corner (with the first axis increasing to the right and the second axis increasing upwards) by the imaging system of the FITS writer. This convention is clearly helpful in the absence of a description of the world coordinates. It does not preclude a program from looking at the axis descriptions and overriding this convention, or preclude the user from requesting a different display. This convention also does not excuse FITS writers from providing complete and correct descriptions of the image coordinates, allowing the user to determine the meaning of the image. The ordering of the image for display is simply a convention of convenience, whereas the coordinates of the pixels are part of the physics of the observation.
Do you think it would be possible to introduce this keyword in sharpcap ? EKOS/INDI has just introduced it.
My best regards,
Cyril
- admin
- Site Admin
- Posts: 13330
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Request for a new FITS keyword
Hi Cyril,
yes, no problem. Makes a lot of sense.
Robin
yes, no problem. Makes a lot of sense.
Robin
- admin
- Site Admin
- Posts: 13330
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Request for a new FITS keyword
Hi,
I created a test file with the header in without changing anything else in SharpCap's FITS writing
https://drive.google.com/file/d/1tK289i ... sp=sharing
Any observations on flaws in the headers welcome - The problem I have found is that different processing applications interpret FITS images in different ways, so no single way of writing the BAYERPAT/COLORTYP/BAYOFFX/BAYOFFY headers makes sense for all applications. Actually though, I don't recall finding any application that actually takes notice of those headers
The image is GBRG as far as the camera is concerned (counting from top-left).
Robin
I created a test file with the header in without changing anything else in SharpCap's FITS writing
https://drive.google.com/file/d/1tK289i ... sp=sharing
Any observations on flaws in the headers welcome - The problem I have found is that different processing applications interpret FITS images in different ways, so no single way of writing the BAYERPAT/COLORTYP/BAYOFFX/BAYOFFY headers makes sense for all applications. Actually though, I don't recall finding any application that actually takes notice of those headers
The image is GBRG as far as the camera is concerned (counting from top-left).
Robin
Re: Request for a new FITS keyword
Hello, thanks for having a look.
I can debayer your FITS image with the correct pattern, only with BOTTOM-UP information. Not with TOP-DOWN as it is written, where color are wrong.
In Siril we do not use COLORTYP (dont think it is used either by EKOS/INDI). For BAYOFFX and BAYOFFY we are doing something like that (but we use, like INDI, XBAYROFF and YBAYROFF):
I can debayer your FITS image with the correct pattern, only with BOTTOM-UP information. Not with TOP-DOWN as it is written, where color are wrong.
Code: Select all
The problem I have found is that different processing applications interpret FITS images in different ways, so no single way of writing the BAYERPAT/COLORTYP/BAYOFFX/BAYOFFY headers makes sense for all applications
Code: Select all
if (xbayeroff == 1) {
switch (*pattern) {
case BAYER_FILTER_RGGB:
*pattern = BAYER_FILTER_GRBG;
break;
case BAYER_FILTER_BGGR:
*pattern = BAYER_FILTER_GBRG;
break;
case BAYER_FILTER_GBRG:
*pattern = BAYER_FILTER_BGGR;
break;
case BAYER_FILTER_GRBG:
*pattern = BAYER_FILTER_RGGB;
break;
default:
return 1;
}
}
/* y offset
* or bottom-up debayer
*/
if ((ybayeroff == 1)
|| ((com.pref.debayer.use_bayer_header
&& !g_strcmp0(fit->row_order, "BOTTOM-UP"))
|| !com.pref.debayer.top_down)) {
switch (*pattern) {
case BAYER_FILTER_RGGB:
*pattern = BAYER_FILTER_GBRG;
break;
case BAYER_FILTER_BGGR:
*pattern = BAYER_FILTER_GRBG;
break;
case BAYER_FILTER_GBRG:
*pattern = BAYER_FILTER_RGGB;
break;
case BAYER_FILTER_GRBG:
*pattern = BAYER_FILTER_BGGR;
break;
default:
return 1;
}
}
- admin
- Site Admin
- Posts: 13330
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Request for a new FITS keyword
Ah, Ok... And which setting of the top-down/botton-up is required for the image to be the right way up?
I may need to change how the bayer info is written out and it would be best to get all the changes needed done in one go.
thanks,
Robin
I may need to change how the bayer info is written out and it would be best to get all the changes needed done in one go.
thanks,
Robin
Re: Request for a new FITS keyword
Maybe I could give you these test files: https://filesender.renater.fr/?s=downlo ... ac4b5a78e5
Does it help you?
Does it help you?
Re: Request for a new FITS keyword
Do not hesitate to ask if you want me to test something.
- admin
- Site Admin
- Posts: 13330
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Request for a new FITS keyword
How about this file – https://drive.google.com/file/d/1Bv8YOJ ... sp=sharing
I believe that should be consistent – if you interpret it as starting from the top down, the required Bayer pattern is GB RG and the images the right way up.
Cheers, Robin
I believe that should be consistent – if you interpret it as starting from the top down, the required Bayer pattern is GB RG and the images the right way up.
Cheers, Robin
Re: Request for a new FITS keyword
Yes looks good to me.
Here the result I have:
Here the result I have:
Re: Request for a new FITS keyword
Your next update will contain this change?
Many thanks for that. It will be very useful I think
Many thanks for that. It will be very useful I think