OSC Drizzle script question

Looking at the Siril standard OSC_Preprocessing_WBayerDrizzle (v1.1) script it appears that flats are applied twice:

Calibrate Light Frames

calibrate light -bias=$defbias -flat=…/masters/pp_flat_stacked -cfa -equalize_cfa

Align lights with Drizzle

register pp_light -drizzle -scale=1.0 -pixfrac=1.0 -kernel=square -flat=…/masters/pp_flat_stacked

Is there a reason for this? I would have thought that registering (with drizzle) would just use the already-calibrated pp_light frames, without applying flats again.

The flat in the drizzle is just used as weight. To take into account vignetting in the drizzle computation.

Thanks for the reply, although I still don’t really get it.
According to the Siril drizzle doc, “The contribution of each input pixel can be weighted by the master flat, so that pixels from areas with higher SNR (less vignetting) are weighted more highly”.
However, the calibrate command (just prior) has already used the master flat to remove vignetting from the pixels that are the input to that drizzle.

The reason for asking this is that I wanted to separate the calibrate & register commands for multi-night stacking i.e. take calibrated subs from each night and then do a final combined register (with drizzle) before stacking everything. Possibly I should first register & drizzle each night separately instead…