{"id":18182925,"url":"https://github.com/tomycesaille/poto-siril","last_synced_at":"2025-04-09T17:51:19.544Z","repository":{"id":260734976,"uuid":"861421155","full_name":"TomyCesaille/poto-siril","owner":"TomyCesaille","description":"Automatization around Siril and ASIAIR for deep sky astrophotography.","archived":false,"fork":false,"pushed_at":"2025-04-02T21:47:21.000Z","size":26350,"stargazers_count":2,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T14:39:46.007Z","etag":null,"topics":["astro","astrophotography","deep-sky","siril","zwo","zwoasi"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/poto-siril","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomyCesaille.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-22T20:54:11.000Z","updated_at":"2025-04-02T21:47:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"3bb11862-64c1-442f-86bc-e9a6d2ee60fc","html_url":"https://github.com/TomyCesaille/poto-siril","commit_stats":{"total_commits":48,"total_committers":2,"mean_commits":24.0,"dds":"0.14583333333333337","last_synced_commit":"0b608edfee423e9ef324aa7fa85dffee5aedb952"},"previous_names":["tomycesaille/poto-siril"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomyCesaille%2Fpoto-siril","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomyCesaille%2Fpoto-siril/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomyCesaille%2Fpoto-siril/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomyCesaille%2Fpoto-siril/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomyCesaille","download_url":"https://codeload.github.com/TomyCesaille/poto-siril/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248083058,"owners_count":21045033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astro","astrophotography","deep-sky","siril","zwo","zwoasi"],"created_at":"2024-11-02T19:03:41.988Z","updated_at":"2025-04-09T17:51:19.537Z","avatar_url":"https://github.com/TomyCesaille.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![logo](https://github.com/TomyCesaille/poto-siril/blob/main/img/poto-siril_logo.png?raw=true)\n\nAutomatization around Siril (\u003chttps://siril.org/\u003e) for deep sky astrophotography.\n\n[![codecov](https://codecov.io/gh/TomyCesaille/poto-siril/graph/badge.svg?token=RCF9ZV8JZ9)](https://codecov.io/gh/TomyCesaille/poto-siril) ![NPM Version](https://img.shields.io/npm/v/poto-siril) ![NPM Downloads](https://img.shields.io/npm/d18m/poto-siril)\n\n## What is it?\n\n**Poto-Siril is a CLI tool to automate the pre-processing of astrophotography images on top of Siril.**\n\nPoto-Siril aims to **overcome the repetitive and tedious** work when pre-processing multiple layers before compositing an (L)RGB image (e.g. narrowband filters with a monochrome camera or a color camera with dual-band filters).\n\nIt works out of the box with images captured by a ZWO ASIAIR device or with any `fit` files that follow the same [file naming convention](#file-naming-convention) and [directory structure](#asiair-directory-structure-for-reference) (more support to come, help is welcomed 👋).\n\n### Workflow 🚀\n\nThe essence of Poto-Siril is about:\n\n- Organizing the raw data by grouping the multiple light sequences together in small groups (of the same filter, bulb, gain, etc...) tagged with the appropriate flats, darks, and biases.\n- Running Siril script(s) on each group of lights to retrieve the calibrated lights, following:\n\n```math\nCalibrated\\_Light = \\frac{Light\\_Frame - Dark\\_Frame}{Flat\\_Frame}\n```\n\n- Stacking the calibrated lights to get a master light for each layer/filter.\n\n![workflow](https://github.com/TomyCesaille/poto-siril/blob/main/img/poto-siril_workflow.png?raw=true)\n\n### In detail\n\n- **Easy import of lights and flats from night session(s) and search for associated darks and biases in a bank folder**\n  Import one or several night sessions (e.g. lights and flats from `Autorun` or `Plan` mode with ASIAIR) and automatically pick the darks and biases from the bank folder (matching bulb, gain, binning, ...).\n  A summary resumes the light sequence(s) and the calibration files associated.\n  ![dispatch](https://github.com/TomyCesaille/poto-siril/blob/main/img/poto-siril_prepare_summary.png?raw=true)\n- **Complex Light - Flat matching**\n  Poto-Siril helps to associate the right flats with the right lights when the project consists of multiple night sessions where the flats changed over time, e.g., a significant date gap between shooting sessions having a new collimation tuning and/or new dust in the optical train.\n  ![flat_matching](https://github.com/TomyCesaille/poto-siril/blob/main/img/poto-siril_prepare_advanced-flats-matching.png?raw=true)\n- **Multi-layers project structure**\n  The imported files ☝️ are organized by filters and light sets (bulb, gain \u0026 binning, if there are multiple combinations). Each light set will map to a light sequence in Siril to be pre-processed separately.\n  👉 You can easily work on an LRGB or LRGBHaOIIISII project.\n- **Batch Siril script execution to pre-process the data**\n  (Generates and) Runs a Siril script (`.ssl` file) to calibrate the lights for each light set, based on a customizable ssl file template.\n- **A/B testing** (PLANNED)\n  Run the (generated ☝️) Siril script with different parameters (e.g. rejection algorithm, sigma low/high thresholds) and compare the results.\n  Or run several different pre-processing scripts and compare the results.\n\n### What it is not doing\n\nPoto-Siril does not eliminate bad light images, and everything related to the final processing such as channel compositing, color calibration, background extraction, etc...\n\n## Usage\n\n### First installation\n\nInstall [node](https://node.org) latest version and run:\n\n```bash\nnpm install -g poto-siril\npoto -v\n# Should print `poto-siril 0.8.0`.\n\n# Make sure to have `siril` registered in your PATH.\nsiril -v\n# Should print `siril 1.2.5`.\n```\n\n### CLI commands\n\n```bash\n$POTO_PROJECT=jorislacance/deepsky/poto_2024_08_10_veil-nebula\n\n# Prepare a Poto project by importing imaging data session(s) and \"static\" calibration files (darks, biases).\n./poto.sh prepare \\\n  # e.g. ASIAIR dump folder with Autorun directory filled with lights and corresponding flats.\n  -i jorislacance/deepsky/sessions/asiair_2024_08_10_veil-nebula \\\n  # e.g. Bank folder where poto-siril will cherry-pick darks and biases as needed.\n  -i jorislacance/deepsky/_bank \\\n  # 🎉 poto project directory destination.\n  $POTO_PROJECT\n\n# Batch pre-process all the lights, set by set (filter, bulb, gain, binning...) based on a Siril script template.\n./poto.sh preprocess \\\n  -t src/pipeline/Mono_Preprocessing/Mono_Preprocessing.ssf \\\n  $POTO_PROJECT\n\n# BONUS: Drop thumbnails and empty directories generated by ASIAIR.\n./poto.sh clear jorislacance/deepsky/sessions/asiair_2024_08_10_veil-nebula\n```\n\n### Pre-processing pipeline\n\nUsually, the pre-processing is a multi-step journey. The most usual case is to pre-process lights, eliminate bad ones in Siril directly, and go back to Poto-Siril to batch-run the stacking.\n\nYou can chain multiple scripts to achieve the desired result.\nSee [src/pipeline/Mono_Preprocessing/README.md](src/pipeline/Mono_Preprocessing/README.md) for a full example of a pre-processing pipeline.\n\n#### Create your own\n\nYou can easily create your own by following the [Mono_Preprocessing pipeline](src/pipeline/Mono_Preprocessing) example.\n\nSome remarks about **Poto-Siril script templates**:\n\n- `.ssf` extension like regular Siril scripts.\n- Poto-Siril dynamically overwrites the `{{poto-dir}}`, `{{lights}}`, `{{flats}}`, `{{darks}}`, `{{biases}}`, `{{process}}` \u0026 `{{masters}}` variables to the current light set to pre-process.\n\n### File naming convention\n\nPoto-Siril expects the files to follow the ASIAIR file naming convention `{Light|Flat|Dark|Bias}_{TARGET}_{EXPOSURE_TIME}{s|ms}_Bin{BINNING}_{FILTER}_gain{GAIN}_{DATE}-{TIME}_{TEMPERATURE}C_{SEQUENCE_NUMBER}.fit`.\n\nFor example:\n\n- `Light_10.0s_Bin1_S_gain360_20240320-203324_-10.0C_0001.fit`\n- `Light_FOV_60.0s_Bin1_S_gain100_20240624-010840_-10.1C_0001.fit`\n- `Flat_1.0ms_Bin1_S_gain100_20240320-233122_-10.5C_0001.fit`\n- `Dark_300.0s_Bin1_S_gain100_20240320-233122_-10.5C_0001.fit`\n- `Bias_1.0ms_Bin1_S_gain100_20240320-233122_-10.5C_0001.fit`\n\n### Poto-Siril project architecture\n\n```text\n# Poto project root directory\n├── S    👈 Directory for each filter.\n│   ├── Light_M42_10.0s_Bin1_S_gain360    👈 Sub directory for each light set (BIN-GAIN-BULB combination).\n|   │   ├── Light_M42_10.0s_Bin1_S_gain360_20240320-203324_-10.0C_0001.fit\n│   │   └── ...\n│   ├── Light_M42_10.0s_Bin1_S_gain100\n|   │   ├── Light_M42_10.0s_Bin1_S_gain100_20240321-223159_-10.0C_0001.fit\n│   │   └── ...\n│   └── Flat_1.0ms_Bin1_S_gain100\n|       ├── Flat_1.0ms_Bin1_S_gain100_20240320-233122_-10.5C_0001.fit\n│       └── ...\n├── H\n├── O\n├── ...\n└── any    👈 Biases \u0026 darks fall here.\n```\n\n\u003e 💡 `S`, `H`, `O` are the filter names extracted from the [File naming convention](#file-naming-convention).\n\n### The bank folder (for reference)\n\nIt's common to store the **darks** and **biases** in a 'bank folder' since they are quite static. Poto-siril doesn't expect any precise directory structure for a directory to act like a bank folder as long as the [file naming convention](#file-naming-convention) is respected.\n\nExample of structure:\n\n```text\n# Bank directory\n├── Bias_1.0ms_Bin1_gain100_-9.9C_2024\n│   ├── Bias_1.0ms_Bin1_L_gain100_20240308-154935_-10.0C_0001.fit\n│   ├── Bias_1.0ms_Bin1_L_gain100_20240308-154936_-9.9C_0002.fit\n│   └── ...\n├── Darks_300.0s_Bin1_gain100_-10C_2024\n│   ├── Dark_300.0s_Bin1_L_gain100_20240308-172757_-10.0C_0001.fit\n│   ├── Dark_300.0s_Bin1_L_gain100_20240308-160224_-10.0C_0002.fit\n│   └── ...\n└── ...\n```\n\n### ASIAIR directory structure (for reference)\n\n\u003e 💡 Note that this directory structure is optional.\n\n```text\n# Root dump directory of an ASIAIR session\n├── Autorun\n│   ├── Light\n|   |   └── M42\n|   |       ├── Light_M42_10.0s_Bin1_S_gain360_20240320-203324_-10.0C_0001.fit\n│   |       ├── ...\n|   |       ├── Light_M42_10.0s_Bin1_S_gain100_20240321-223159_-10.0C_0001.fit\n|   |       └── ...\n│   └── Flat\n|       ├── Flat_1.0ms_Bin1_S_gain100_20240320-233122_-10.5C_0001.fit\n│       └── ...\n├── Plan\n│   # Same structure as Autorun.\n├── Live\n│   # Ignored in poto-siril\n├── Preview\n│   # Ignored in poto-siril\n├── Video\n│   # Ignored in poto-siril\n└── log\n    # Ignored in poto-siril\n```\n\n## Development\n\nInstall [node](https://node.org) latest version and run:\n\n```bash\nnpm i\n# For Unix based systems:\nchmod +x ./poto.sh\n./poto.sh -v\n# Should print `poto-siril 0.8.0`.\n\n# Make sure to have `siril` registered in your PATH.\nsiril -v\n# Should print `siril 1.2.5`.\n\n# Run the tests\nnpm test\n\n# Run the linter\nnpm run lint\n\n# Run type checking\nnpm run check-types\n\n# Generate dataset 1 for development\nnpm run dev-spawn-ds1\n\n# Run dev-spawn-ds1 \u0026 the prepare command with the development dataset 1\nnpm run dev-prepare-ds1\n\n# Run the preprocess command with the development dataset 1\nnpm run dev-preprocess-ds1\n```\n\n## Side Notes\n\n[Sirilic and Sirilot](https://siril.org/2018/11/sirilic-and-sirilot-two-very-useful-utilities-for-siril/) are two alternatives to automate Siril. This project is another take that emphasizes the laziness of manipulating files in the file system, the love of Siril Scripting, and A/B testing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomycesaille%2Fpoto-siril","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomycesaille%2Fpoto-siril","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomycesaille%2Fpoto-siril/lists"}