×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

definitions of FITS headers DATAMIN and DATAMAX?

  • Posts: 71
  • Thank you received: 2
I don't understand how DATAMIN and DATAMAX in the FITS header are derived from the data. When I look at the data table in FV, all the entries are positive integers, but the header entries for DATAMIN and DATAMAX are by definition double precision decimals. How to get from one to the other?

So far I have found the function getMinMax in indiccd.cpp which is simple enough routine for finding extreme values. So I guess the float values come from the function getFrameBuffer for which I have not yet seen the source but will look for. But until then, I'm wondering what could be the reason to use decimal fractions to represent extreme values of binary integers?

Thanks.
5 years 5 months ago #31733

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
In theory, DATAMIN and DATAMAX represent the minimum and maximum physical values the sensor providing the data is able to store in the FITS file. There is a reference change (origin+scale) to process on the raw data to obtain the physical data.

-Eric
5 years 5 months ago #31735

Please Log in or Create an account to join the conversation.

  • Posts: 71
  • Thank you received: 2
My camera is a ZWO ASI290MM which should be producing 12 bit per pixel output. So, in analogy to DSLR output, I expected the FItS data to be an array of positive integers between 0 and 2^12-1 = 4095 with min and max nested between those extremes. But when I look at the data table of a photograph, FITS header attached, the values are all positive integers, *but* they are all even numbers and they top out at 5232. Min is around 160. Then the values for DATAMIN and DATAMAX are -898.34... and 5231.76.... I would like to understand how those numbers are obtained. It can't be a linear transformation a*x+b where a and b are scale and offset because any such number should be an integer if x is, so I guess there is some other algorithm.

Don't mean to be bothersome. Thanks.
5 years 5 months ago #31771
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
You are right, a 12-bit sensor should provide a dynamic range of 2^12 values. ZWO is actually claiming a dynamic range that is sometimes higher than what the ADC provides thanks to internal enhancements. For instance, they claim to achieve 12.5 bits on some cameras, while the reported range is 12bits. As it happens, if you do DATAMAX-DATAMIN in your case, you end up with approximately 12.58 bits of dynamic range. You should probably direct these questions to the support at ZWO to get the full explanation.

-Eric
5 years 5 months ago #31777

Please Log in or Create an account to join the conversation.

Time to create page: 0.484 seconds