Signed Integers

I’ve just become aware of the possibility that my camera, and perhaps records my pixel values with signed integers. For those that are yet unaware of this issue some dedicated astrophotography cameras use a scale of -32768 as total black and 32767 as pure white. The software I use for processing does not deal with negative values well and requires some specific settings to adapt to that system of recording data. I’m happy to make those changes in settings, but only if I know that my camera, and Sequence Generator, are saving my data that way.

I use a QSI 683 camera. In some experimentation with flat exposures I have seen image statistics showing 65535 ADU with Sequence Generator. I’ve also seen this value when using Image Statistics on a light frame at a saturated star. When I look at the FITS header for my images though I see a FITS Word BZERO=32768. After looking up what the heck BZERO means I have found that it indicates that I likely have my data recorded with signed integers. This post is part of my effort to clarify this. I don’t want to fix anything that ain’t broke, and I’m not sure if this situation indicates something is, in fact, broke.

So I’m wondering if someone knows if my camera is recording data with signed integers, and if Sequence Generator is somehow scaling the data to accommodate that condition, as I think is indicated by the values I get from saturated stars and overbright flat frames?

If Sequence Generator is in fact scaling the data, is it possible to make a change in settings so that the data is recorded in an unsigned, 0 to 65535 scale? If not I have other means to deal with it, but I like to resolve such issues as close to the beginning as possible.

Thanks in advance for advice and counsel on this subject.

Mike

FITs data is inherently signed and ranges from -32768 to 32768. Values are stored in the fits as

BSCALE * “Actual Pixel Value” - 32768

So when these come back out of the fits they are then read correctly. In the case of the 683 it is 100% a 16bit per pixel camera and the data is stored in the fits as such. By setting the BSCALE to 1 and the BZERO to 32768 this effectively allows you to store 16bit unsigned data into a floating point structure without any loss.

To recap:
Your camera is 16bpp unsigned
SGP stores 16bpp unsigned data in the FITs
BSCALE = 1 and BZERO = 32768 are a way to manipulate the fits to accommodate this.
Range of a 16bit unsigned int is 0 - 65535 (all of which are valid for a 16bpp camera)

There should not need to be anything done on your end to “deal with it” as it is being handled correctly.

Jared

Jared,

Thank you so much for your response. You gave me exactly the information I need to understand this part of astroimaging. I couldn’t ask for a better answer.

Over my years in this hobby I’ve gotten so much insight from software developers like you and it always amazes me. Thank you so much for spending the time to create this software, and more for supporting it personally. Your time is valuable and sharing it the way you do is so appreciated!