Skip to content

sample format bug fix (glass slide) - #18

Merged
hongquanli merged 1 commit into
masterfrom
bug-fix-sample-format
Nov 27, 2024
Merged

sample format bug fix (glass slide)#18
hongquanli merged 1 commit into
masterfrom
bug-fix-sample-format

Conversation

@hongquanli

Copy link
Copy Markdown
Contributor

fix incomplete conversion from 0 -> "glass slide" for representing slide format

@hongquanli
hongquanli requested a review from ianohara November 27, 2024 06:07
@hongquanli
hongquanli merged commit 0009fcf into master Nov 27, 2024
Alpaca233 added a commit that referenced this pull request May 26, 2026
Picks up the remaining cheap, reasonable fixes from PR #535 review:

#1 cv2.imwrite return value: cv2 returns False (without raising) on
missing dir, missing codec, or unsupported dtype. We now check the
return value, log a throttled WARNING per failure, increment a
_silent_write_failures counter (surfaced in the diagnostics summary),
and skip counter increment + CSV row write so no row references a
file that isn't on disk.

#4 channel-name path sanitization: get_image_filepath previously only
replaced spaces; now also strips '/', '\\', ':', '*', '?', '"', '<',
'>', '|'. Strict improvement for both the recording widget and the
multipoint pipeline.

#7 frames.csv open guarded: a PermissionError on the CSV file no
longer leaves the widget in a half-started state. On failure,
experiment_ID is cleared and the exception is re-raised so the
toggle_recording slot doesn't run streamHandler.start_recording().

#8 drop the dead image_format constructor parameter: process_queue
hasn't read it since the cv2.imwrite refactor — it derives the
extension from control._def.Acquisition.IMAGE_FORMAT via
get_image_filepath. No in-tree callers passed it.

#9 OSError auto-stop emits only once per recording: a saturated queue
hitting a persistent OSError (e.g., full disk) no longer fires 10
redundant stop_recording signals. _stop_requested_from_writer is
reset in start_new_experiment; subsequent errors during shutdown
log as WARNING instead of re-emitting.

#18 channel_provider returning None at start_new_experiment now logs
a distinct WARNING. Before, a user who launched the GUI and clicked
Record without first selecting a live channel got every frame
tagged 'live' with no warning (because the provider lambda itself
was non-None, just its return value was).

Co-Authored-By: Claude Opus 4.7 (1M context) <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.

1 participant