Skip to content

Let a colour flag pick the channels of -re instead of running step 3 - #182

Merged
kriboe90 merged 2 commits into
masterfrom
claude/restart-channel-flags
Nov 9, 2026
Merged

kriboe90 merged 2 commits into
masterfrom
claude/restart-channel-flags

Conversation

@kriboe90

@kriboe90 kriboe90 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

What changed

A colour flag without a step runs step 3 with the LED fits. #180 keeps -s3_fast from triggering that, but -re still did.

  • ledsa/core/parser_arguments_run.py: the implied step 3 now also leaves out -re, so -re -g resumes the green channel instead of first running the full step 3. A comment states the rule.
  • ledsa/tests/UnitTests/test_parser_arguments_run.py: -re alone and with -r, -g, -b, -rgb or -g -b builds a single restart extractor for those channels and never sets up step 3.
  • doc/cli_documentation.rst: the channel flags are -r, -g, -b and -rgb (the table listed --r, which argparse rejects as ambiguous) and apply to -s3_fast and -re as well. The --help of -re says to give the channel flags of the interrupted run.

Why

-re -r, -re -g and -re -rgb ran step 3 with fits on every image before the restart. That overwrote the partial results using the slowest variant of step 3, and the restart then found nothing left to analyse. Without a colour flag the restart resumes the red channel only, so an interrupted green, blue or RGB run could not be resumed at all.

For the reviewer

  • This branch contains the commit of fix: honor fast step three for individual color channels #180, because both change the same line. Merge fix: honor fast step three for individual color channels #180 first, and the diff here shows only the restart. Merging this PR first would merge fix: honor fast step three for individual color channels #180 with it.
  • Unchanged: -re alone resumes the red channel, an explicit -s3 next to -re still runs both, and a colour flag next to -s1, -s2 or -coord still implies step 3.
  • A limitation this PR does not change: the restart always analyses without fits (fit_leds=False). After an interrupted -s3 run, the resumed images get the -s3_fast column layout, and the analysis refuses the channel with its column-layout error. With a colour flag, the full rerun used to hide this; plain -re already ran into it. The restart also takes the images still to do from the first selected channel only.

Tests

  • Unit tests: 419 passed (Python 3.12.2, macOS). With the line of fix: honor fast step three for individual color channels #180, the new test fails for the five cases with a colour flag ("called 2 times") and passes for plain -re.
  • Robot Framework acceptance tests: not run locally. None of them combines -re with a colour flag (03_test_s3.robot runs plain -re).

🤖 Generated with Claude Code

imshah-id and others added 2 commits November 1, 2026 01:45
A colour flag without a step runs step 3 with the LED fits. The guard
against that checked -s3_fast only, so -re -r, -re -g and -re -rgb
first ran the full step 3 on every image, which overwrote the partial
results, and the restart then found nothing left to analyse. Plain -re
resumes the red channel only, so an interrupted green, blue or RGB run
could not be resumed at all.

The guard now also leaves out -re, and the colour flags only select the
channels of the restart. -re alone, an explicit -s3 next to -re and a
colour flag next to -s1, -s2 or -coord behave as before.

The CLI documentation listed --r, which argparse rejects as ambiguous,
and no channel flags for -s3_fast and -re. The help of -re now says to
give the channel flags of the interrupted run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kriboe90
kriboe90 merged commit f2e3ead into master Nov 9, 2026
5 checks passed
kriboe90 added a commit that referenced this pull request Nov 9, 2026
Brings the fixes of the step 3 flags and the restart into develop:
#180 (-s3_fast with -r, -g or -b no longer
also runs the full step 3), #182 (a colour flag picks the channels of
-re instead of running step 3) and #183 (-re resumes in the fit mode
and in all channels of the interrupted run). They are merged before the
v0.13.0 cleanup (#181) lands on master, so that develop takes the fixes
without the removals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kriboe90 added a commit that referenced this pull request Nov 9, 2026
…-0-cleanup-cea6d8

Brings the fixes of the step 3 flags and the restart (#180, #182, #183)
into the cleanup. Two conflicts, both from changes on adjacent lines:

- doc/cli_documentation.rst: the -s3_fast row keeps the description
  without the background-corrected sums and takes the channel flags.
- ledsa/data_extraction/step_3_functions.py: find_fit_leds_for_restart
  goes before _generate_led_analysis_data, which keeps the signature
  without the noise, side band and background floor parameters.

The restart reads the fit mode from the header line of the column
names, which still starts with id and lists fit_success only with the
fits, so it works with the shorter header of the cleanup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants