Greetings, I am using Siril to do some scientific data processing.
The science images were taken by a high-speed photometric camera mounted on the Palomar 200 telescope (aka Hale telescope). I’m trying to stack the images using Siril, turns out that when I run the convert
command, Siril’s command line returns
Normalizing the image data with [491, 509], not suitable for sequence operations
and the effective depth information of fits after conversion has been completely lost because of this auto normalization.
So I turned to Siril’s source code and found the following judgment statement (image_format_fits.c
):
static void convert_data_float(int bitpix, const void *from, float *to, size_t nbdata, double data_max) {
...
case ULONG_IMG: // 32-bit unsigned integer pixels
data32 = (unsigned long *)from;
if (data_max > 0.0) {
siril_debug_print("Normalizing image data with DATA_MAX of %d\n", round_to_int(data_max));
for (i = 0; i < nbdata; i++)
to[i] = (float)(((double)(data32[i])) / data_max);
} else {
// N.I.N.A. gives the normalization value in DATAMAX, if it's not
// there, compute from data. This is not suitable for sequence work
unsigned long min = ULONG_MAX, max = 0;
for (i = 0; i < nbdata; i++) {
min = min(data32[i], min);
max = max(data32[i], max);
}
siril_log_message(_("Normalizing the image data with [%ld, %ld], not suitable for sequence operations\n"), min, max);
mini = (double)min;
maxi = (double)max;
for (i = 0; i < nbdata; i++)
to[i] = (float)((data32[i] - mini)) / (maxi - mini);
}
break;
...
I’m kinda curious what this ULONG_IMG image is? Is it possible to bypass the auto normalization? I’m using Siril 1.2.5 for Windows for image processing, and I’ve searched for a long time and haven’t found a way to bypass this normalization