[repo] kind = "recipe" # FIXME - share these options via the repo import mechanism, instead of all this copy-and-paste... [[stages]] name = "stack_osc" description = "Basic OSC stacking (no fancy narrowband extraction)" tool.name = "siril" #role = "stack" priority = 310 # Delete the (large) merged/registered frames after reporting. The '*.fit*' # suffix matches both .fit and .fits and deliberately does NOT match the # '.seq' files, so the tracked 'r_osc_.seq' output survives (deleting it would # make doit see stack_osc as out-of-date and re-run the whole stack next time). temporaries = ["osc*.fit*", "r_osc*.fit*"] # or inline python code can be provided here. In this case I'm using some python # code I'm temporarily sharing from the main project... script = ''' # create a seq from the input files cd in convert osc -debayer -out=.. cd .. # We use -2pass to select the best possible reference frame for others to register against register osc -2pass # because we are using -2pass we must complete the registration here before stacking # we use framing=max/min/cog so that registration is not wrt the first frame # note: it is better to do filtering at this stage than when stacking, # because it keeps a record of which frames were dropped seqapplyreg osc {parameters.drizzle} {parameters.filtering} -framing={parameters.framing} stack r_osc {parameters.registration} {parameters.options} -out=results # and flip if required mirrorx_single results # Move the file to final output location load results save "{output.full_paths[0]}" ''' [[stages.inputs]] kind = "job" merge_to = "in" after = "light.*" # the name of the step we want to follow # Based on the following definitions in the stage toml file... # Note: outputs will be prefilled in the context so that the script can use them # # IMPORTANT: the registered sequence is declared FIRST and the processed # output LAST. _resolve_output_files() overwrites context["output"] for each # block, so the final block is what the script's save "{output.full_paths[0]}" # sees. Keeping 'processed' last means that still resolves to stacked.fits. [[stages.outputs]] # Declare the registered sequence as a tracked job output. This keeps it alive # in the shared process_dir until report_stack_osc consumes it, and lets doit # regenerate it (by re-running this stage) if it is ever missing. Without this, # when stacked.fits is up-to-date the stage is skipped and the (previously # cleaned-up) .seq would never be recreated for the report stage to read. kind = "job" name = ["r_osc_.seq"] [[stages.outputs]] # the 'processed' output points to a directory in the 'processed' repo but named based on the target we are trying to build for # see above for a rule that automatically populates the results_dir shorthand kind = "processed" name = ["stacked.fits"] [[stages.parameters]] name = "registration" # Winsorized Sigma Clipping (w 3 3) with Average rejection to nuke airplane/satellite trails. # Trail pixels are bright statistical outliers vs same pixel in other frames, so sigma high 3.0 # rejects them and averages dark sky from other frames into those spots. Gold standard for >15-20 frames. # If faint ghost survives, lower sigma high to 2.5. Previous GESDT method kept for reference: # "rej g 0.3 0.05" default = "rej w 3 3" # Value used if not overriden description = "Registration options for Siril stacking" [[stages.parameters]] name = "filtering" default = "-filter-wfwhm=80%" # better defaults description = "Filtering options for Siril (controls which frames are accepted for stacking) add -filter-round=80% -filter-bkg=80% for best results" [[stages.parameters]] name = "drizzle" # note: drizzle is only applicable for mono / CFA sequences, cannot drizzle color sequences. default = "" # "-drizzle" # Default to no drizzle description = "Drizzle option for Siril stacking, set to empty string to disable, or -drizzle to enable" [[stages.parameters]] name = "options" default = "-norm=addscale -output_norm -rgb_equal -32b" # Value used if not overriden description = "Misc options for Siril stacking" [[stages.parameters]] name = "framing" default = "max" # Value used if not overriden description = "Framing option for Siril stacking min/max/cog are recommended. cog requires all images to have same dimensions, so min/max is a safer default."