From 615be09a2630363070acefd2b47f5745c74a3813 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 4 Oct 2025 22:10:28 +0200 Subject: Initial commit. --- scripts/EKOS_Multi_Masters.ssf | 43 ++++ scripts/EKOS_Multi_Session_Preprocess.ssf | 48 +++++ scripts/EKOS_Multi_Session_Stack.ssf | 40 ++++ scripts/EKOS_OSC_Preprocessing.ssf | 68 ++++++ scripts/EKOS_Preprocessing_WithDrizzle.ssf | 75 +++++++ siril-cli-extractHaOIII | 105 ++++++++++ siril-cli-multisession | 321 +++++++++++++++++++++++++++++ 7 files changed, 700 insertions(+) create mode 100644 scripts/EKOS_Multi_Masters.ssf create mode 100644 scripts/EKOS_Multi_Session_Preprocess.ssf create mode 100644 scripts/EKOS_Multi_Session_Stack.ssf create mode 100644 scripts/EKOS_OSC_Preprocessing.ssf create mode 100644 scripts/EKOS_Preprocessing_WithDrizzle.ssf create mode 100755 siril-cli-extractHaOIII create mode 100755 siril-cli-multisession diff --git a/scripts/EKOS_Multi_Masters.ssf b/scripts/EKOS_Multi_Masters.ssf new file mode 100644 index 0000000..e3c781b --- /dev/null +++ b/scripts/EKOS_Multi_Masters.ssf @@ -0,0 +1,43 @@ +############################################ +# +# Script for Siril 1.2 +# +############################################ + +# +# Script to create a set of dark and bias masters +# for an EKOS multi-session project +# +# Required directory structure: +# +# [ Home ] +# /Bias +# /Dark +# +# Masters will be saved to +# +# /Master +# +# Temporary files will be saved to +# +# /process + +requires 1.2.0 + +# Convert Dark Frames to .fit files +cd Dark +convert dark -out=../process +cd ../process + +# Stack Dark Frames to master_dark.fit +stack dark rej 3 3 -nonorm -out=../Master/master_dark +cd .. + +# Convert Bias Frames to .fit files +cd Bias +convert bias -out=../process +cd ../process + +# Stack Bias Frames to master_bias.fit +stack bias rej 3 3 -nonorm -out=../Master/master_bias +cd .. diff --git a/scripts/EKOS_Multi_Session_Preprocess.ssf b/scripts/EKOS_Multi_Session_Preprocess.ssf new file mode 100644 index 0000000..52a57e2 --- /dev/null +++ b/scripts/EKOS_Multi_Session_Preprocess.ssf @@ -0,0 +1,48 @@ +############################################ +# +# Script for Siril 1.2 +# +############################################ + +# +# Script to create a set of dark and bias masters +# for an EKOS multi-session project +# +# Required directory structure: +# +# [ Session Home ] +# /Flat +# /Light +# +# Preprocessed files will be written to +# +# /process/session_pp_light*.fits +# +# Temporary files will be saved to +# +# /process + +requires 1.2.0 + +# Convert Flat Frames to .fit files +cd Flat +convert flat -out=../process +cd ../process + +# Pre-process Flat Frames +calibrate flat -bias=../../Master/master_bias + +# Stack Flat Frames to master_flat_session.fit +stack pp_flat rej 3 3 -norm=mul -out=master_flat_session +cd .. + +# Convert Light Frames to .fit files +cd Light +convert light -out=../process +cd ../process + +# Pre-process Light Frames +calibrate light -dark=../../Master/master_dark -flat=master_flat_session -cfa -cc=dark -equalize_cfa -debayer -prefix=session_pp_ + +cd .. +close diff --git a/scripts/EKOS_Multi_Session_Stack.ssf b/scripts/EKOS_Multi_Session_Stack.ssf new file mode 100644 index 0000000..0cfd9ba --- /dev/null +++ b/scripts/EKOS_Multi_Session_Stack.ssf @@ -0,0 +1,40 @@ +############################################ +# +# Script for Siril 1.2 +# +############################################ + +# +# Script to create a set of dark and bias masters +# for an EKOS multi-session project +# +# Required directory structure: +# +# [ Home ] +# /Preprocess +# +# Temporary files will be saved to +# +# /process + +requires 1.2.0 + +# Convert Light Frames to .fit files +cd Preprocess +convert preprocess -out=../process +cd ../process + +# Align lights +register preprocess -2pass -noout -drizzle -nostarlist +seqapplyreg preprocess -drizzle -framing=min + +# Stack calibrated lights to result.fit +stack r_preprocess rej 3 3 -norm=addscale -output_norm -rgb_equal -out=result + +# and flipping if required +load result +mirrorx -bottomup +save ../result_drizzle_$LIVETIME:%d$s + +cd .. +close diff --git a/scripts/EKOS_OSC_Preprocessing.ssf b/scripts/EKOS_OSC_Preprocessing.ssf new file mode 100644 index 0000000..991ea14 --- /dev/null +++ b/scripts/EKOS_OSC_Preprocessing.ssf @@ -0,0 +1,68 @@ +############################################ +# +# Script for Siril 1.0 +# July 2020 +# (C) Cyril Richard +# Preprocessing v1.0 +# +########### PREPROCESSING SCRIPT ########### +# +# Script for color camera preprocessing +# +# Needs 4 sets of RAW images in the working +# directory, within 4 directories: +# biases/ +# flats/ +# darks/ +# lights/ +# +############################################ + +requires 0.99.4 + +# Convert Bias Frames to .fit files +cd Bias +convert bias -out=../process +cd ../process + +# Stack Bias Frames to bias_stacked.fit +stack bias rej 3 3 -nonorm +cd .. + +# Convert Flat Frames to .fit files +cd Flat +convert flat -out=../process +cd ../process + +# Pre-process Flat Frames +preprocess flat -bias=bias_stacked + +# Stack Flat Frames to pp_flat_stacked.fit +stack pp_flat rej 3 3 -norm=mul +cd .. + +# Convert Dark Frames to .fit files +cd Dark +convert dark -out=../process +cd ../process + +# Stack Dark Frames to dark_stacked.fit +stack dark rej 3 3 -nonorm +cd .. + +# Convert Light Frames to .fit files +cd Light +convert light -out=../process +cd ../process + +# Pre-process Light Frames +preprocess light -dark=dark_stacked -flat=pp_flat_stacked -cfa -equalize_cfa -debayer + +# Align lights +register pp_light + +# Stack calibrated lights to result.fit +stack r_pp_light rej 3 3 -norm=addscale -output_norm -out=../result + +cd .. +close diff --git a/scripts/EKOS_Preprocessing_WithDrizzle.ssf b/scripts/EKOS_Preprocessing_WithDrizzle.ssf new file mode 100644 index 0000000..06a531d --- /dev/null +++ b/scripts/EKOS_Preprocessing_WithDrizzle.ssf @@ -0,0 +1,75 @@ +############################################ +# +# Script for Siril 1.2 +# February 2023 +# (C) Cyril Richard +# OSC_Preprocessing_WithDrizzle v1.3 +# +########### PREPROCESSING SCRIPT ########### +# +# Script for color camera preprocessing +# aligning using Drizzle 2x +# +# Needs 4 sets of RAW images in the working +# directory, within 4 directories: +# biases/ +# flats/ +# darks/ +# lights/ +# Saves masters to ./masters/ +# +############################################ + +requires 1.2.0 + +# Convert Bias Frames to .fit files +cd Bias +convert bias -out=../process +cd ../process + +# Stack Bias Frames to bias_stacked.fit +stack bias rej 3 3 -nonorm -out=../masters/bias_stacked +cd .. + +# Convert Flat Frames to .fit files +cd Flat +convert flat -out=../process +cd ../process + +# Calibrate Flat Frames +calibrate flat -bias=../masters/bias_stacked + +# Stack Flat Frames to pp_flat_stacked.fit +stack pp_flat rej 3 3 -norm=mul -out=../masters/pp_flat_stacked +cd .. + +# Convert Dark Frames to .fit files +cd Dark +convert dark -out=../process +cd ../process + +# Stack Dark Frames to dark_stacked.fit +stack dark rej 3 3 -nonorm -out=../masters/dark_stacked +cd .. + +# Convert Light Frames to .fit files +cd Light +convert light -out=../process +cd ../process + +# Calibrate Light Frames +calibrate light -dark=../masters/dark_stacked -flat=../masters/pp_flat_stacked -cc=dark -cfa -equalize_cfa -debayer + +# Align lights with Drizzle 2x +register pp_light -drizzle + +# Stack calibrated lights to result.fit +stack r_pp_light rej 3 3 -norm=addscale -output_norm -rgb_equal -out=result + +# and flipping if required +load result +mirrorx -bottomup +save ../result_drizzle_$LIVETIME:%d$s + +cd .. +close diff --git a/siril-cli-extractHaOIII b/siril-cli-extractHaOIII new file mode 100755 index 0000000..a370455 --- /dev/null +++ b/siril-cli-extractHaOIII @@ -0,0 +1,105 @@ +#!/bin/sh + +# Shell script to extra Ha and OIII data from smallband images + +# ------------------------------------------------------------------ +# CONFIGURATION + +# Directory names +LIGHTDIR=Light +FLATDIR=Flat +DARKDIR=Dark +BIASDIR=Bias +MASTERDIR=Master +CALIBRATEDDIR=Calibrated +PROCESSDIR=Process + +# Output file names +MASTERDARK=master_dark +MASTERBIAS=master_bias +MASTERFLAT=master_flat + +# Framing style +# --framing=[cog|max|min] +OPT_FRAMING=min + +# ------------------------------------------------------------------ +# COMMAND LINE OPTIONS + +while [ ! -z "$1" ]; do + + case "$1" in + -f | --framing) + shift + OPT_FRAMING=$1 + echo "Framing ${OPT_FRAMING}" + shift + ;; + *) + echo "Invalid option $1" + exit 1; + ;; + esac +done + +# ------------------------------------------------------------------ +# SAFETY CHECK + +if [ ! -d "${PROCESSDIR}" ]; then + echo "${PROCESSDIR} directory does not exist!" + exit 1 +fi + +# ------------------------------------------------------------------ +# EXTRACT Ha AND OIII + + +# ------------------------------------------------------------------ +# REGISTER LIGHTS + +echo "------------------------------------------------------------------" +echo "Extracting Ha and OIII" +#notify-send "${NOTIFICATIONTITLE}" "Extracting Ha and OIII" + +siril-cli -d . -s - <