starbash 0.1.9__py3-none-any.whl → 0.1.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of starbash might be problematic. Click here for more details.
- starbash/aliases.py +100 -0
- starbash/app.py +412 -189
- starbash/commands/info.py +69 -0
- starbash/commands/repo.py +19 -3
- starbash/commands/select.py +8 -1
- starbash/database.py +187 -94
- starbash/defaults/starbash.toml +21 -3
- starbash/paths.py +18 -2
- starbash/recipes/master_bias/starbash.toml +10 -14
- starbash/recipes/master_dark/starbash.toml +36 -0
- starbash/recipes/master_flat/starbash.toml +27 -17
- starbash/recipes/osc_dual_duo/starbash.py +1 -5
- starbash/recipes/osc_dual_duo/starbash.toml +8 -4
- starbash/recipes/osc_single_duo/starbash.toml +4 -4
- starbash/recipes/starbash.toml +23 -3
- starbash/selection.py +6 -1
- starbash/templates/repo/processed.toml +10 -0
- starbash/tool.py +127 -67
- {starbash-0.1.9.dist-info → starbash-0.1.10.dist-info}/METADATA +5 -3
- starbash-0.1.10.dist-info/RECORD +40 -0
- starbash-0.1.9.dist-info/RECORD +0 -37
- {starbash-0.1.9.dist-info → starbash-0.1.10.dist-info}/WHEEL +0 -0
- {starbash-0.1.9.dist-info → starbash-0.1.10.dist-info}/entry_points.txt +0 -0
- {starbash-0.1.9.dist-info → starbash-0.1.10.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
[repo]
|
|
3
|
+
kind = "recipe"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[recipe]
|
|
7
|
+
author.name = "FIXMESiril?"
|
|
8
|
+
author.email = "FIXMESiril?"
|
|
9
|
+
|
|
10
|
+
[[stage]]
|
|
11
|
+
|
|
12
|
+
description = "Generate master dark"
|
|
13
|
+
|
|
14
|
+
tool.name = "siril"
|
|
15
|
+
tool.timeout = 30
|
|
16
|
+
|
|
17
|
+
input.type = "dark"
|
|
18
|
+
|
|
19
|
+
# Look for files in input repos, finding them by using the "relative" tag they contain
|
|
20
|
+
input.source = "repo"
|
|
21
|
+
input.required = 2 # siril needs at least 2 frames to stack
|
|
22
|
+
|
|
23
|
+
when = "setup.master.dark" # run when master darks are regenerated
|
|
24
|
+
|
|
25
|
+
# Based on the following definitions in the stage toml file...
|
|
26
|
+
output.dest = "repo" # write to a particular repo
|
|
27
|
+
output.type = "master" # write output to the special masters repo
|
|
28
|
+
|
|
29
|
+
script = '''
|
|
30
|
+
# Convert bias/dark Frames to .fit files
|
|
31
|
+
link frames -out={process_dir}
|
|
32
|
+
cd {process_dir}
|
|
33
|
+
|
|
34
|
+
# Stack frames
|
|
35
|
+
stack frames rej 3 3 -nonorm -out={output["base_path"]}
|
|
36
|
+
'''
|
|
@@ -10,26 +10,36 @@ author.email = "FIXMESiril?"
|
|
|
10
10
|
|
|
11
11
|
[[stage]]
|
|
12
12
|
|
|
13
|
+
# See master_bias/starbash.toml for more documentation
|
|
14
|
+
|
|
13
15
|
description = "Generate master flat"
|
|
14
|
-
disabled =
|
|
16
|
+
# disabled = false
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
tool.name = "siril"
|
|
19
|
+
# tool.timeout = 15.0 # allow up to 15 seconds before we timeout and kill tool
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
input.
|
|
21
|
+
# or auto?
|
|
22
|
+
# find the most recent raw fits for the current instrument (as of the time of session start)
|
|
23
|
+
# input.source = "most-recent" # only look for the most recent set of raws for this particular type
|
|
24
|
+
input.type = "flat" # look in all raw repos, but look only for flat files
|
|
22
25
|
|
|
23
|
-
#
|
|
24
|
-
input.source = "
|
|
25
|
-
input.
|
|
26
|
-
|
|
26
|
+
# Look for files in input repos, finding them by using the "relative" tag they contain
|
|
27
|
+
input.source = "repo"
|
|
28
|
+
input.required = 2 # siril needs at least 2 frames to stack
|
|
29
|
+
|
|
30
|
+
# We require a master bias frame for this recipe. By the time our recipe is invoked
|
|
31
|
+
# context.master.bias will have been set to a full path to a master bias frame
|
|
32
|
+
input.masters = ["bias"]
|
|
27
33
|
|
|
28
|
-
when = "
|
|
29
|
-
context.output = "{process_dir}/flat_s{sessionid}_c{sessionconfig}.fits"
|
|
34
|
+
when = "setup.master.flat" # run when master biases are regenerated
|
|
30
35
|
|
|
31
|
-
#
|
|
32
|
-
|
|
36
|
+
# Based on the following definitions in the stage toml file...
|
|
37
|
+
output.dest = "repo" # write to a particular repo
|
|
38
|
+
output.type = "master" # write output to the special masters repo
|
|
39
|
+
|
|
40
|
+
# FIXME for early development we have support for simple absolute file paths with globs
|
|
41
|
+
#input.source = "path"
|
|
42
|
+
#input.path = "/workspaces/starbash/images/from_astroboy/M 27/2025-09-16/FLAT/*.fit*"
|
|
33
43
|
|
|
34
44
|
script = '''
|
|
35
45
|
# Create a sequence from the raw flat frames
|
|
@@ -37,10 +47,10 @@ script = '''
|
|
|
37
47
|
cd {process_dir}
|
|
38
48
|
|
|
39
49
|
# Calibrate the flat frames using master bias
|
|
40
|
-
calibrate flat -bias={bias}
|
|
50
|
+
calibrate flat -bias={master["bias"]}
|
|
41
51
|
|
|
42
|
-
# Stack the pre-processed (calibrated) flat frames
|
|
43
|
-
stack pp_flat rej 3 3 -norm=mul -out=
|
|
52
|
+
# Stack the pre-processed (calibrated) flat frames
|
|
53
|
+
stack pp_flat rej 3 3 -norm=mul -out={output["base_path"]}
|
|
44
54
|
'''
|
|
45
55
|
|
|
46
56
|
temporaries = ["flat", "pp_flat"]
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import os
|
|
5
5
|
from glob import glob
|
|
6
6
|
from starbash.tool import tools
|
|
7
|
+
from starbash.aliases import normalize_target_name
|
|
7
8
|
|
|
8
9
|
siril = tools["siril"]
|
|
9
10
|
|
|
@@ -18,11 +19,6 @@ def perhaps_delete_temps(temps: list[str]) -> None:
|
|
|
18
19
|
os.remove(path)
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
def normalize_target_name(name: str) -> str:
|
|
22
|
-
"""Converts a target name to an any filesystem-safe format by removing spaces"""
|
|
23
|
-
return name.replace(" ", "").upper()
|
|
24
|
-
|
|
25
|
-
|
|
26
22
|
def make_stacked(sessionconfig: str, variant: str, output_file: str):
|
|
27
23
|
"""
|
|
28
24
|
Registers and stacks all pre-processed light frames for a given filter configuration
|
|
@@ -30,8 +30,9 @@ auto.for-filter = ["SiiOiii"]
|
|
|
30
30
|
# auto.for-filter = ["HaOiii"]
|
|
31
31
|
auto.for-camera = ["OSC"]
|
|
32
32
|
|
|
33
|
-
tool = "siril"
|
|
34
|
-
|
|
33
|
+
tool.name = "siril"
|
|
34
|
+
|
|
35
|
+
when = "session.light" # run once per session.config
|
|
35
36
|
output = "FIXME"
|
|
36
37
|
|
|
37
38
|
# FIXME, bias and flat should have been added to context by two previous stages. But for now hardwire
|
|
@@ -74,8 +75,11 @@ description = "Stack OSC dual duo filter data, with separate Ha, Oiii and Sii ch
|
|
|
74
75
|
context.target = "M 27" # FIXME
|
|
75
76
|
context.targets = "/workspaces/starbash/images/processed" # FIXME, do something smarter
|
|
76
77
|
|
|
77
|
-
tool = "python"
|
|
78
|
-
|
|
78
|
+
tool.name = "python"
|
|
79
|
+
|
|
80
|
+
when = "session.stack" # run once after all session/session.config processing was done
|
|
81
|
+
|
|
82
|
+
input.masters = ["bias", "flat"]
|
|
79
83
|
|
|
80
84
|
# if not specified starbash.py used
|
|
81
85
|
# script-file = "script.py"
|
|
@@ -23,8 +23,8 @@ disabled = true # FIXME, we don't yet have auto selection based on filter types
|
|
|
23
23
|
auto.for-filter = ["HaOiii"]
|
|
24
24
|
auto.for-camera = ["OSC"]
|
|
25
25
|
|
|
26
|
-
tool = "siril"
|
|
27
|
-
when = "session
|
|
26
|
+
tool.name = "siril"
|
|
27
|
+
when = "session.light" # run once per session.config
|
|
28
28
|
output = "FIXME"
|
|
29
29
|
|
|
30
30
|
script = '''
|
|
@@ -45,8 +45,8 @@ temporaries = ["FIXME"]
|
|
|
45
45
|
|
|
46
46
|
disabled = true # FIXME, we don't yet have auto selection based on filter types
|
|
47
47
|
|
|
48
|
-
tool = "python"
|
|
49
|
-
when = "session
|
|
48
|
+
tool.name = "python"
|
|
49
|
+
when = "session.stack" # run once after all session/session.config processing was done
|
|
50
50
|
|
|
51
51
|
script-file = "script.py"
|
|
52
52
|
|
starbash/recipes/starbash.toml
CHANGED
|
@@ -5,6 +5,8 @@ kind = "repo"
|
|
|
5
5
|
[[repo-ref]]
|
|
6
6
|
dir = "master_bias"
|
|
7
7
|
[[repo-ref]]
|
|
8
|
+
dir = "master_dark"
|
|
9
|
+
[[repo-ref]]
|
|
8
10
|
dir = "master_flat"
|
|
9
11
|
|
|
10
12
|
# Note: For automated recipe finding, it is important to list more demanding recipes first. For instance:
|
|
@@ -26,14 +28,32 @@ dir = "osc_single_duo"
|
|
|
26
28
|
#name = "setup-masters" # for flat processing, master generation etc
|
|
27
29
|
#priority = 5
|
|
28
30
|
|
|
31
|
+
#
|
|
32
|
+
# master specific stages
|
|
33
|
+
#
|
|
34
|
+
[[master-stages]]
|
|
35
|
+
name = "setup.master.bias" # generate master bias frames
|
|
36
|
+
priority = 10
|
|
37
|
+
|
|
38
|
+
[[master-stages]]
|
|
39
|
+
name = "setup.master.dark" # generate master bias frames
|
|
40
|
+
priority = 10
|
|
41
|
+
|
|
42
|
+
[[master-stages]]
|
|
43
|
+
name = "setup.master.flat" # generate master flat frames
|
|
44
|
+
priority = 20
|
|
45
|
+
|
|
46
|
+
#
|
|
47
|
+
# session specific processing stages
|
|
48
|
+
#
|
|
29
49
|
[[stages]]
|
|
30
|
-
name = "session
|
|
50
|
+
name = "session.config" # for flat processing, master generation etc
|
|
31
51
|
priority = 10
|
|
32
52
|
|
|
33
53
|
[[stages]]
|
|
34
|
-
name = "session
|
|
54
|
+
name = "session.light" # generate light frames from lights and with reference to flats/bias
|
|
35
55
|
priority = 20
|
|
36
56
|
|
|
37
57
|
[[stages]]
|
|
38
|
-
name = "session
|
|
58
|
+
name = "session.stack" # stack frames
|
|
39
59
|
priority = 30
|
starbash/selection.py
CHANGED
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import logging
|
|
6
6
|
from typing import Any, Optional, TYPE_CHECKING
|
|
7
7
|
from repo import Repo
|
|
8
|
+
from starbash.aliases import normalize_target_name
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def where_tuple(conditions: dict[str, Any] | None) -> tuple[str, list[Any]]:
|
|
@@ -256,7 +257,11 @@ class Selection:
|
|
|
256
257
|
if self.targets:
|
|
257
258
|
# For now, just use the first target
|
|
258
259
|
# TODO: Support multiple targets in queries
|
|
259
|
-
conditions["OBJECT"] =
|
|
260
|
+
conditions["OBJECT"] = (
|
|
261
|
+
normalize_target_name(self.targets[0])
|
|
262
|
+
if len(self.targets) == 1
|
|
263
|
+
else None
|
|
264
|
+
)
|
|
260
265
|
|
|
261
266
|
if self.filters:
|
|
262
267
|
# For now, just use the first filter
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This is a processed repository for (Starbash)[{PROJECT_URL}].
|
|
2
|
+
#
|
|
3
|
+
# This file marks the root directory of a set of generated/processed starbash output files.
|
|
4
|
+
#
|
|
5
|
+
# You generally don't need to edit this file directly - it was auto generated when you ran
|
|
6
|
+
# "sb repo add --processed {REPO_PATH}".
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
[repo]
|
|
10
|
+
kind = "processed"
|
starbash/tool.py
CHANGED
|
@@ -3,6 +3,7 @@ import shutil
|
|
|
3
3
|
import textwrap
|
|
4
4
|
import tempfile
|
|
5
5
|
import subprocess
|
|
6
|
+
import select
|
|
6
7
|
import re
|
|
7
8
|
|
|
8
9
|
import logging
|
|
@@ -161,26 +162,87 @@ def strip_comments(text: str) -> str:
|
|
|
161
162
|
return "\n".join(lines)
|
|
162
163
|
|
|
163
164
|
|
|
164
|
-
def tool_run(
|
|
165
|
-
|
|
165
|
+
def tool_run(
|
|
166
|
+
cmd: str, cwd: str, commands: str | None = None, timeout: float | None = None
|
|
167
|
+
) -> None:
|
|
168
|
+
"""Executes an external tool with an optional script of commands in a given working directory.
|
|
166
169
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
)
|
|
170
|
+
Streams stdout and stderr in real-time to the logger, allowing you to see subprocess output
|
|
171
|
+
as it happens rather than waiting for completion.
|
|
172
|
+
"""
|
|
171
173
|
|
|
172
|
-
|
|
173
|
-
logger.warning(f"Tool error message:\n{result.stderr.strip()}")
|
|
174
|
+
logger.debug(f"Running {cmd} in {cwd}: stdin={commands}")
|
|
174
175
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
# Start the process with pipes for streaming
|
|
177
|
+
process = subprocess.Popen(
|
|
178
|
+
cmd,
|
|
179
|
+
stdin=subprocess.PIPE if commands else None,
|
|
180
|
+
stdout=subprocess.PIPE,
|
|
181
|
+
stderr=subprocess.PIPE,
|
|
182
|
+
shell=True,
|
|
183
|
+
text=True,
|
|
184
|
+
cwd=cwd,
|
|
185
|
+
)
|
|
181
186
|
|
|
182
|
-
if
|
|
183
|
-
|
|
187
|
+
# Send commands to stdin if provided
|
|
188
|
+
if commands and process.stdin:
|
|
189
|
+
try:
|
|
190
|
+
process.stdin.write(commands)
|
|
191
|
+
process.stdin.close()
|
|
192
|
+
except BrokenPipeError:
|
|
193
|
+
# Process may have terminated early
|
|
194
|
+
pass
|
|
195
|
+
|
|
196
|
+
# Stream output line by line in real-time
|
|
197
|
+
assert process.stdout
|
|
198
|
+
assert process.stderr
|
|
199
|
+
|
|
200
|
+
try:
|
|
201
|
+
streams = {
|
|
202
|
+
process.stdout.fileno(): (process.stdout, logger.debug, "tool-stdout"),
|
|
203
|
+
process.stderr.fileno(): (process.stderr, logger.warning, "tool-stderr"),
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
while streams:
|
|
207
|
+
# Wait for data on any stream (with timeout for periodic checking)
|
|
208
|
+
ready, _, _ = select.select(list(streams.keys()), [], [], 0.1)
|
|
209
|
+
|
|
210
|
+
for fd in ready:
|
|
211
|
+
stream, log_func, stream_name = streams[fd]
|
|
212
|
+
line = stream.readline()
|
|
213
|
+
|
|
214
|
+
if line:
|
|
215
|
+
# Strip trailing newline and log immediately
|
|
216
|
+
line = line.rstrip("\n")
|
|
217
|
+
log_func(f"[{stream_name}] {line}")
|
|
218
|
+
else:
|
|
219
|
+
# EOF reached on this stream
|
|
220
|
+
del streams[fd]
|
|
221
|
+
|
|
222
|
+
# Check if process has terminated
|
|
223
|
+
if process.poll() is not None and not streams:
|
|
224
|
+
break
|
|
225
|
+
|
|
226
|
+
# Wait for process to complete with timeout
|
|
227
|
+
try:
|
|
228
|
+
process.wait(timeout=timeout)
|
|
229
|
+
except subprocess.TimeoutExpired:
|
|
230
|
+
process.kill()
|
|
231
|
+
process.wait()
|
|
232
|
+
raise RuntimeError(f"Tool timed out after {timeout} seconds")
|
|
233
|
+
|
|
234
|
+
returncode = process.returncode
|
|
235
|
+
|
|
236
|
+
if returncode != 0:
|
|
237
|
+
raise RuntimeError(f"Tool failed with exit code {returncode}")
|
|
238
|
+
else:
|
|
239
|
+
logger.debug("Tool command successful.")
|
|
240
|
+
finally:
|
|
241
|
+
# Ensure streams are properly closed
|
|
242
|
+
if process.stdout:
|
|
243
|
+
process.stdout.close()
|
|
244
|
+
if process.stderr:
|
|
245
|
+
process.stderr.close()
|
|
184
246
|
|
|
185
247
|
|
|
186
248
|
def executable_path(commands: list[str], name: str) -> str:
|
|
@@ -191,55 +253,6 @@ def executable_path(commands: list[str], name: str) -> str:
|
|
|
191
253
|
raise FileNotFoundError(f"{name} not found, you probably need to install it.")
|
|
192
254
|
|
|
193
255
|
|
|
194
|
-
def siril_run(temp_dir: str, commands: str, input_files: list[str] = []) -> None:
|
|
195
|
-
"""Executes Siril with a script of commands in a given working directory."""
|
|
196
|
-
|
|
197
|
-
# siril_path = "/home/kevinh/packages/Siril-1.4.0~beta3-x86_64.AppImage"
|
|
198
|
-
# Possible siril commands, with preferred option first
|
|
199
|
-
siril_commands = ["org.siril.Siril", "siril-cli", "siril"]
|
|
200
|
-
siril_path = executable_path(siril_commands, "Siril")
|
|
201
|
-
if siril_path == "org.siril.Siril":
|
|
202
|
-
# The executable is inside a flatpak, so run the lighter/faster/no-gui required exe
|
|
203
|
-
# from inside the flatpak
|
|
204
|
-
siril_path = "flatpak run --command=siril-cli org.siril.Siril"
|
|
205
|
-
|
|
206
|
-
# Create symbolic links for all input files in the temp directory
|
|
207
|
-
for f in input_files:
|
|
208
|
-
os.symlink(
|
|
209
|
-
os.path.abspath(str(f)), os.path.join(temp_dir, os.path.basename(str(f)))
|
|
210
|
-
)
|
|
211
|
-
|
|
212
|
-
# We dedent here because the commands are often indented multiline strings
|
|
213
|
-
script_content = textwrap.dedent(
|
|
214
|
-
f"""
|
|
215
|
-
requires 1.4.0-beta3
|
|
216
|
-
{textwrap.dedent(strip_comments(commands))}
|
|
217
|
-
"""
|
|
218
|
-
)
|
|
219
|
-
|
|
220
|
-
logger.info(
|
|
221
|
-
f"Running Siril in {temp_dir}, ({len(input_files)} input files) cmds:\n{script_content}"
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
# The `-s -` arguments tell Siril to run in script mode and read commands from stdin.
|
|
225
|
-
# It seems like the -d command may also be required when siril is in a flatpak
|
|
226
|
-
cmd = f"{siril_path} -d {temp_dir} -s -"
|
|
227
|
-
|
|
228
|
-
tool_run(cmd, temp_dir, script_content)
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
def graxpert_run(cwd: str, arguments: str) -> None:
|
|
232
|
-
"""Executes Graxpert with the specified command line arguments"""
|
|
233
|
-
|
|
234
|
-
graxpert_commands = ["graxpert"]
|
|
235
|
-
graxpert_path = executable_path(graxpert_commands, "Graxpert")
|
|
236
|
-
|
|
237
|
-
# Arguments look similar to: graxpert -cmd background-extraction -output /tmp/testout tests/test_images/real_crummy.fits
|
|
238
|
-
cmd = f"{graxpert_path} {arguments}"
|
|
239
|
-
|
|
240
|
-
tool_run(cmd, cwd)
|
|
241
|
-
|
|
242
|
-
|
|
243
256
|
class Tool:
|
|
244
257
|
"""A tool for stage execution"""
|
|
245
258
|
|
|
@@ -248,6 +261,12 @@ class Tool:
|
|
|
248
261
|
|
|
249
262
|
# default script file name
|
|
250
263
|
self.default_script_file = None
|
|
264
|
+
self.set_defaults()
|
|
265
|
+
|
|
266
|
+
def set_defaults(self):
|
|
267
|
+
# default timeout in seconds, if you need to run a tool longer than this, you should change
|
|
268
|
+
# it before calling run()
|
|
269
|
+
self.timeout = 10.0
|
|
251
270
|
|
|
252
271
|
def run_in_temp_dir(self, commands: str, context: dict = {}) -> None:
|
|
253
272
|
"""Run commands inside this tool (with cwd pointing to a temp directory)"""
|
|
@@ -275,6 +294,7 @@ class SirilTool(Tool):
|
|
|
275
294
|
super().__init__("siril")
|
|
276
295
|
|
|
277
296
|
def run(self, cwd: str, commands: str, context: dict = {}) -> None:
|
|
297
|
+
"""Executes Siril with a script of commands in a given working directory."""
|
|
278
298
|
|
|
279
299
|
# Iteratively expand the command string to handle nested placeholders.
|
|
280
300
|
# The loop continues until the string no longer changes.
|
|
@@ -282,7 +302,42 @@ class SirilTool(Tool):
|
|
|
282
302
|
|
|
283
303
|
input_files = context.get("input_files", [])
|
|
284
304
|
|
|
285
|
-
|
|
305
|
+
temp_dir = cwd
|
|
306
|
+
|
|
307
|
+
# siril_path = "/home/kevinh/packages/Siril-1.4.0~beta3-x86_64.AppImage"
|
|
308
|
+
# Possible siril commands, with preferred option first
|
|
309
|
+
siril_commands = ["org.siril.Siril", "siril-cli", "siril"]
|
|
310
|
+
siril_path = executable_path(siril_commands, "Siril")
|
|
311
|
+
if siril_path == "org.siril.Siril":
|
|
312
|
+
# The executable is inside a flatpak, so run the lighter/faster/no-gui required exe
|
|
313
|
+
# from inside the flatpak
|
|
314
|
+
siril_path = "flatpak run --command=siril-cli org.siril.Siril"
|
|
315
|
+
|
|
316
|
+
# Create symbolic links for all input files in the temp directory
|
|
317
|
+
for f in input_files:
|
|
318
|
+
os.symlink(
|
|
319
|
+
os.path.abspath(str(f)),
|
|
320
|
+
os.path.join(temp_dir, os.path.basename(str(f))),
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
# We dedent here because the commands are often indented multiline strings
|
|
324
|
+
script_content = textwrap.dedent(
|
|
325
|
+
f"""
|
|
326
|
+
requires 1.4.0-beta3
|
|
327
|
+
{textwrap.dedent(strip_comments(expanded))}
|
|
328
|
+
"""
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
logger.debug(
|
|
332
|
+
f"Running Siril in {temp_dir}, ({len(input_files)} input files) cmds:\n{script_content}"
|
|
333
|
+
)
|
|
334
|
+
logger.info(f"Running Siril ({len(input_files)} input files)")
|
|
335
|
+
|
|
336
|
+
# The `-s -` arguments tell Siril to run in script mode and read commands from stdin.
|
|
337
|
+
# It seems like the -d command may also be required when siril is in a flatpak
|
|
338
|
+
cmd = f"{siril_path} -d {temp_dir} -s -"
|
|
339
|
+
|
|
340
|
+
tool_run(cmd, temp_dir, script_content, timeout=self.timeout)
|
|
286
341
|
|
|
287
342
|
|
|
288
343
|
class GraxpertTool(Tool):
|
|
@@ -292,7 +347,12 @@ class GraxpertTool(Tool):
|
|
|
292
347
|
super().__init__("graxpert")
|
|
293
348
|
|
|
294
349
|
def run(self, cwd: str, commands: str, context: dict = {}) -> None:
|
|
295
|
-
|
|
350
|
+
"""Executes Graxpert with the specified command line arguments"""
|
|
351
|
+
|
|
352
|
+
# Arguments look similar to: graxpert -cmd background-extraction -output /tmp/testout tests/test_images/real_crummy.fits
|
|
353
|
+
cmd = f"graxpert {commands}"
|
|
354
|
+
|
|
355
|
+
tool_run(cmd, cwd, timeout=self.timeout)
|
|
296
356
|
|
|
297
357
|
|
|
298
358
|
class PythonTool(Tool):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: starbash
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.10
|
|
4
4
|
Summary: A tool for automating/standardizing/sharing astrophotography workflows.
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Kevin Hester
|
|
@@ -33,6 +33,7 @@ A tool for automating/standardizing/sharing astrophotography workflows.
|
|
|
33
33
|
* Automatic - with sensible defaults, that you can change as needed.
|
|
34
34
|
* Easy - provides a 'seestar like' starting-point for autoprocessing all your sessions (by default).
|
|
35
35
|
* Fast - even with large image repositories. Automatic master bias and flat generation and reasonable defaults
|
|
36
|
+
* Multi-session - by default. So your workflows can stack from multiple nights (and still use the correct flats etc...)
|
|
36
37
|
* Sharable - you can share/use recipes for image preprocessing flows.
|
|
37
38
|
|
|
38
39
|
(This project is currently 'alpha' and missing recipes for some workflows, but adding new recipes is easy and we're happy to help. Please file a github issue if your images are not auto-processed and we'll work out a fix.)
|
|
@@ -89,7 +90,7 @@ FIXME - add getting started instructions (possibly with a screenshare video)
|
|
|
89
90
|
|
|
90
91
|
### Repository Management
|
|
91
92
|
- `sb repo list [--verbose]` - List installed repos (use `-v` for details)
|
|
92
|
-
- `sb repo add [--master]
|
|
93
|
+
- `sb repo add [--master] [filepath|URL]` - Add a repository, optionally specifying the type
|
|
93
94
|
- `sb repo remove <REPOURL>` - Remove the indicated repo from the repo list
|
|
94
95
|
- `sb repo reindex [--force] <REPOURL>` - Reindex the specified repo (or all repos if none specified)
|
|
95
96
|
|
|
@@ -113,6 +114,7 @@ FIXME - add getting started instructions (possibly with a screenshare video)
|
|
|
113
114
|
- `sb info target` - List targets (filtered based on the current selection)
|
|
114
115
|
- `sb info telescope` - List instruments (filtered based on the current selection)
|
|
115
116
|
- `sb info filter` - List all filters found in current selection
|
|
117
|
+
- `sb info master [KIND]` - List all precalculated master images (darks, biases, flats). Optional KIND argument to filter by image type (e.g., BIAS, DARK, FLAT)
|
|
116
118
|
|
|
117
119
|
## Not yet supported commands
|
|
118
120
|
|
|
@@ -142,4 +144,4 @@ Project members can access crash reports [here](https://geeksville.sentry.io/ins
|
|
|
142
144
|
## License
|
|
143
145
|
|
|
144
146
|
Copyright 2025 Kevin Hester, kevinh@geeksville.com.
|
|
145
|
-
Licensed under the
|
|
147
|
+
Licensed under the [GPL v3](LICENSE)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
repo/__init__.py,sha256=St2udJPFek-KwjagkH23h8kBYJHyIXrXjQJpL2Vjz_s,229
|
|
2
|
+
repo/manager.py,sha256=4QEt4oRzlTcf75Q7gALBFhtZS_JXOJF6apnSYozRC5c,4812
|
|
3
|
+
repo/repo.py,sha256=7EgzEDzTDuluGFbGHLz_-tracze4jPuzerXJpjUaDKU,10680
|
|
4
|
+
starbash/__init__.py,sha256=0kEchneSvvuKV334VwULs3UZSIJ9Edsfvawuq39LJmo,1146
|
|
5
|
+
starbash/aliases.py,sha256=x2be5VsHmSgwT5WCR_jMjPhnVLhd4Mu1Gw4RctzgOqI,3779
|
|
6
|
+
starbash/analytics.py,sha256=XYe7PN-pymXmmv8x1C2mUV_wecTnY9gHjczUv3fjSo8,4346
|
|
7
|
+
starbash/app.py,sha256=UObVH6dBlWiCboCgRc1uY-2hhGV7tdlHUfIySc3wXg8,43227
|
|
8
|
+
starbash/commands/__init__.py,sha256=sapJ5w5PFGUfmXtUA1bGIFTr0_gf91Gw6rgCcmzmjUw,706
|
|
9
|
+
starbash/commands/info.py,sha256=hE3c7_OlCKir5dYM73p9dFsyfhlN1MuC0j0-BFSQlSs,6162
|
|
10
|
+
starbash/commands/process.py,sha256=c5fsLX0sZRzC_8baT2aZYOpqN57jttL5YEvSJH_U3LU,5236
|
|
11
|
+
starbash/commands/repo.py,sha256=ZIIwpTtvpIiekK2FgrTMU9kNl-df4YH7oBSxOIlP-Ek,8220
|
|
12
|
+
starbash/commands/select.py,sha256=OvViVLpu3jKTgaBGKNuHxXx2QZfUVDdFqYLDoMay5E8,14773
|
|
13
|
+
starbash/commands/user.py,sha256=MIJFhhWokoaBiZ6rKqQaSVxSvO_glwG5dTGhaZy-6PA,4249
|
|
14
|
+
starbash/database.py,sha256=oHE1n4Jf7U2dfd9ONk-iQct_KPx2S11cSj_t7ZylCIg,26843
|
|
15
|
+
starbash/defaults/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
starbash/defaults/starbash.toml,sha256=drG42Q-mOy88d6F31BSbAiN_FTkiGrZSv2wz114MlpM,3112
|
|
17
|
+
starbash/main.py,sha256=DdeV_w4P__q0sTcGjGUm5hBqIDurq8DUKoDQQaawsfA,1600
|
|
18
|
+
starbash/paths.py,sha256=Xr4ZE4yWA_3zu23n8TLXa-wfLRWpQtvjTte0KTMG798,1896
|
|
19
|
+
starbash/recipes/README.md,sha256=OC0CUAL7xhxujOtEg97vrdNLZmGPLusBeOnwTo5rKN8,317
|
|
20
|
+
starbash/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
starbash/recipes/master_bias/starbash.toml,sha256=GAnpwEK9AV0G5agP50nUoJVW30OMDcRTkyMkW2b3sHY,2791
|
|
22
|
+
starbash/recipes/master_dark/starbash.toml,sha256=wynSMp3fQtTY6KtZZM5FGokFxLW2XtKwWNUZOSCqDhs,827
|
|
23
|
+
starbash/recipes/master_flat/starbash.toml,sha256=8Nd8jSSwGbNLPSZn37zIzNFRsmBR-VSDYQuwCOM3qD4,1775
|
|
24
|
+
starbash/recipes/osc_dual_duo/starbash.py,sha256=CkDhm-6sE4ZC44Rvlp6hO3dmBYEA0kfVHVNkJOni7JQ,5666
|
|
25
|
+
starbash/recipes/osc_dual_duo/starbash.toml,sha256=_BkkSn-iYFYIdJANbDKKMz0xAcVSGEU9kZaKsc5r0xI,3241
|
|
26
|
+
starbash/recipes/osc_single_duo/starbash.toml,sha256=Q0JRsv3SVBWie8LeK0xfY03c2dcN5JNLjjPJQKygUDk,2127
|
|
27
|
+
starbash/recipes/starbash.toml,sha256=CDTjGGSaUFpQ7rtLpG_T6xyToBLYsOiIEkRKBeRxitQ,1546
|
|
28
|
+
starbash/selection.py,sha256=404XPXA5nFtlyrFf4uikeJ5VNPShT_h5PBkQbx11IEQ,10964
|
|
29
|
+
starbash/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
+
starbash/templates/repo/master.toml,sha256=c53CXMdIPlw9E50LRabgHfyn2qOS0dhz7nmXBx0ETQA,392
|
|
31
|
+
starbash/templates/repo/processed.toml,sha256=jVsFjCkTGmIV5RfQ2yOIotLJRqXnPhYdxpQytuSJoKg,321
|
|
32
|
+
starbash/templates/userconfig.toml,sha256=4bpUQ5WlA2Ebbl6c5QxmS2-SXV4IxmN3-H9IghepQEQ,1459
|
|
33
|
+
starbash/toml.py,sha256=aNuCqsQ33HYDpWgr_9vpDpd80h2vOU2-kBQmkUqri7c,783
|
|
34
|
+
starbash/tool.py,sha256=uNWG3P8D77NQxdEdPEhy5pFfBf6-Kk1t6HTyZnRWCeo,13560
|
|
35
|
+
starbash/url.py,sha256=lorxQJ27jSfzsKCb0QvpcvLiPZG55Dkd_c1JPFbni4I,402
|
|
36
|
+
starbash-0.1.10.dist-info/METADATA,sha256=nqI8jba7u59wnkwlChR40t8ngeGmniL4UxED2K01dl8,7999
|
|
37
|
+
starbash-0.1.10.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
38
|
+
starbash-0.1.10.dist-info/entry_points.txt,sha256=REQyWs8e5TJsNK7JVVWowKVoytMmKlUwuFHLTmSX4hc,67
|
|
39
|
+
starbash-0.1.10.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
|
40
|
+
starbash-0.1.10.dist-info/RECORD,,
|
starbash-0.1.9.dist-info/RECORD
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
repo/__init__.py,sha256=St2udJPFek-KwjagkH23h8kBYJHyIXrXjQJpL2Vjz_s,229
|
|
2
|
-
repo/manager.py,sha256=4QEt4oRzlTcf75Q7gALBFhtZS_JXOJF6apnSYozRC5c,4812
|
|
3
|
-
repo/repo.py,sha256=7EgzEDzTDuluGFbGHLz_-tracze4jPuzerXJpjUaDKU,10680
|
|
4
|
-
starbash/__init__.py,sha256=0kEchneSvvuKV334VwULs3UZSIJ9Edsfvawuq39LJmo,1146
|
|
5
|
-
starbash/analytics.py,sha256=XYe7PN-pymXmmv8x1C2mUV_wecTnY9gHjczUv3fjSo8,4346
|
|
6
|
-
starbash/app.py,sha256=BnuPzM3aBROveMbx0SFkfDMm_ItLJUstEmEWspJOKs0,34168
|
|
7
|
-
starbash/commands/__init__.py,sha256=sapJ5w5PFGUfmXtUA1bGIFTr0_gf91Gw6rgCcmzmjUw,706
|
|
8
|
-
starbash/commands/info.py,sha256=PNiCdvKocQCAeIMFKYtMsx6PmGnTcxsto8yA3kNvnxo,4131
|
|
9
|
-
starbash/commands/process.py,sha256=c5fsLX0sZRzC_8baT2aZYOpqN57jttL5YEvSJH_U3LU,5236
|
|
10
|
-
starbash/commands/repo.py,sha256=lelqdo8t6sGvXw9V6ax77P6l7U6z-N4nlc_6RzuOaWQ,7623
|
|
11
|
-
starbash/commands/select.py,sha256=_D4FNVnqIYUCWcLYSIYaHDCMccQBPJ3mAVHgqk6Nkr8,14493
|
|
12
|
-
starbash/commands/user.py,sha256=MIJFhhWokoaBiZ6rKqQaSVxSvO_glwG5dTGhaZy-6PA,4249
|
|
13
|
-
starbash/database.py,sha256=Rno00XGukunS5bTT5SqrEQudUhgXcP0jyvJK1hy_cU0,23058
|
|
14
|
-
starbash/defaults/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
starbash/defaults/starbash.toml,sha256=tDF3YFs7JrkZhF2Z1jHQLHR3-4iKSAU7PAeVG9SafZ4,2246
|
|
16
|
-
starbash/main.py,sha256=DdeV_w4P__q0sTcGjGUm5hBqIDurq8DUKoDQQaawsfA,1600
|
|
17
|
-
starbash/paths.py,sha256=BKKnSXt3tOh16o7ljDcQLtWKIiepEmud9JFtzRwDHtg,1317
|
|
18
|
-
starbash/recipes/README.md,sha256=OC0CUAL7xhxujOtEg97vrdNLZmGPLusBeOnwTo5rKN8,317
|
|
19
|
-
starbash/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
starbash/recipes/master_bias/starbash.toml,sha256=M06qprFiAhdRubRudHEusrdzNzm7aaqaisjXO7r1tlg,2985
|
|
21
|
-
starbash/recipes/master_flat/starbash.toml,sha256=HWZXjXbTiExsC6o5QNr1-5x37PBRo7XNwBEto8Ea-LE,1430
|
|
22
|
-
starbash/recipes/osc_dual_duo/starbash.py,sha256=2cI4L6-d50-mL4hY0Oe6ad1v7g18D7ud0Hn0AlHZDOk,5788
|
|
23
|
-
starbash/recipes/osc_dual_duo/starbash.toml,sha256=xh3zEqdotRZr7eUcqel-xnQcWH8z-PUFRuWQfLp3F_E,3195
|
|
24
|
-
starbash/recipes/osc_single_duo/starbash.toml,sha256=kB-FMek0Z-8vieUfxKqmZMFNnZsSKdufSkLSgH03CkY,2117
|
|
25
|
-
starbash/recipes/starbash.toml,sha256=etkMf9iQbEXIKp8GkB05m4jQlnxTqTsDT8MtSJaBSR8,1173
|
|
26
|
-
starbash/selection.py,sha256=vsup4XDsch0Z6aGLO9pgcGGgku0xCWfUgk49lRWr9_g,10826
|
|
27
|
-
starbash/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
starbash/templates/repo/master.toml,sha256=c53CXMdIPlw9E50LRabgHfyn2qOS0dhz7nmXBx0ETQA,392
|
|
29
|
-
starbash/templates/userconfig.toml,sha256=4bpUQ5WlA2Ebbl6c5QxmS2-SXV4IxmN3-H9IghepQEQ,1459
|
|
30
|
-
starbash/toml.py,sha256=aNuCqsQ33HYDpWgr_9vpDpd80h2vOU2-kBQmkUqri7c,783
|
|
31
|
-
starbash/tool.py,sha256=mBRvSwr2Z96YSBwBgYNrQqj83La97yJkBvZhKWvDqfM,11533
|
|
32
|
-
starbash/url.py,sha256=lorxQJ27jSfzsKCb0QvpcvLiPZG55Dkd_c1JPFbni4I,402
|
|
33
|
-
starbash-0.1.9.dist-info/METADATA,sha256=IjkplSkTM32SsUOEA1V0791t6S-EDSqiEeglAiB53IM,7716
|
|
34
|
-
starbash-0.1.9.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
35
|
-
starbash-0.1.9.dist-info/entry_points.txt,sha256=REQyWs8e5TJsNK7JVVWowKVoytMmKlUwuFHLTmSX4hc,67
|
|
36
|
-
starbash-0.1.9.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
|
37
|
-
starbash-0.1.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|