Hi Max,
It is not that straightforward Max - as you may have deduced if you were following the thread that I became involved in over on the CCDAstro forum.
You also need to consider a few things first, namely, are your raw Flats and FlatDarks saved in 32-bit Float mode? If so, then PixInsight will NOT be able to process them in a 'straightforward' manner. Basically, as NONE of us are enjoying the luxury of a 32-bit CCD imager (yet

), then NONE of us should be 'saving' our raw data in 32-bit mode. If you can (and that excludes anybody working with Meade's Envisage program) then save your images in 16-bit Unsigned Integer mode (I am not wealthy enough to use any of the 'high-end' capture programs, but I checked with Nebulosity last night, and this basically means having 'none' of the boxes 'ticked' in the <File><Preferences><Output> section.
If you HAVE saved in 32-bit mode, then all is not lost, but you will need to convert back to 16-bit using a combination of an ImageContainer and the SampleFormatConversion process (I will explain on a follow-up, if needed).
Because these are all Flats and FlatDarks, you do not need to worry about Alignment.
You do need to run your FlatDarks through ImageIntegration, to create a MasterFlatDark (which will be suitable for all your sub-grouped Flats, assuming that you are taking groups of Flats at different orientations of your Lightbox with respect to your OTA). ImageIntegration does not have to be a sophisticated setup for this stage - you can get away with not much more than simple Averaging, with no normalisation or clipping.
You then need another ImageContainer or, rather, several of them - one for each sub-group of Flats. And you will need a PixelMath process set up as <$T - MasterFlatDark>. The PixelMath equation then gets applied to the ImageContainer (which should be set up to write the modified images either with a modified name or to a new directory - it's up to you). However you do things, you will end up with new groups of DarkCalFlats (again, one for each orientation of your Lightbox).
Then you use a new instance of ImageIntegration to combine each group of DarkCalFlats into a MasterCalFlat - and, again, ImageIntegration need be nothing more than a simple 'Average'.
Now you have your individual MasterCalFlats - and these need to be normalised. Inspect each with the Statistics process, and select the image with the highest 'Max' ADU. Either one-by-one, or by using an ImageContainer again, and with a PixelMath command set to <$T / maxADU> (where you will enter the 'discovered' number for 'maxADU'), you can now 'normalise' all of your MasterCalFlats such that they ALL have a maximum ADU of 1.0
A final use of an ImageContainer and PixelMath will allow you to pick any one of your MasterNormCalFlats as a 'masterCAL', and you can then use either <$T / masterCal> or <$T - masterCal> to divide the masterCAL into every other image, or to subtract the masterCAL from every other image.
Now the tricky part. I have used the FFT process in AIP4WIN (in the absence of a similar process being available in PI) to look for 'residual patterns' when I did my lightbox examination. I have also used the 3-D plot feature here in PI as well.
As I am right in the middle of fabricating two new lightboxes (using EL sheet this time) I will also be looking to see what DBE does to the images - specifically looking at the 'extracted' background. Perhaps DBE can even help analyse an FFT image - I have only just thought about that.
Right now, without evidence available to the contrary I totally refuse to accept that a twilight flat will be 'better' than a lightbox flat. As I said over on the CCD forum, a simple 'claim' to that effect is not very helpful.
But - like you - I would also like to hear how others might 'analyse' a group of Flats to decide whether a lightbox was actually 'flat enough' (bearing in mind that, so long as it eliminates 'most' of the optical vignetting, and 'all' of the dust artifacts, then I believe that the DBE process is actually MORE than powerful enough to eliminate everything else)
Comments . . . . . ?
Cheers,