Disable or bypass normalization when converting scientific data of ULONG_IMG case?

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

Hello and welcome!
Amateur images contain data that is usually 16 bit integers per pixel. Siril can handle that and another format that is 32 bit floating point when it needs to increase the precision. The only example we have of cameras giving images in more than 16 bit per pixel is the QHY binning that simply does an addition of the values, so binning 2 is 18 bits and so on.

If you know how many bits you camera will provide, you can adjust DATAMAX accordingly (to 2^18-1, 262143, for 18 bits for example).

If you camera gives 16 bits or less for pixel data, please consider using the correct FITS pixel format for it, otherwise it will have to be normalized in some way to be usable with Siril.