Skip to content

Add a simulated Shutter device - #8

Merged
marktsuchida merged 13 commits into
marktsuchida:mainfrom
gselzer:sim-shutter
Sep 25, 2026
Merged

marktsuchida merged 13 commits into
marktsuchida:mainfrom
gselzer:sim-shutter

Conversation

@gselzer

@gselzer gselzer commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

The shutter device itself is quite simple. When the shutter is closed, a "dark image" is drawn, with just gaussian noise and a dark offset. The "dark image" itself is not really a specimen property, so I've moved the code that was performing this behavior into SimCam (this does mean that SimulatedSpecimen.Draw should respect the values already present within the passed buffer - is that problematic?)

@gselzer

gselzer commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Closes #5

@marktsuchida

Copy link
Copy Markdown
Owner

(Resolving conflicts.)

Resolve conflicts with objective turret and reformatting on 'main'.
Also reformatted code.

(Assisted by Claude Code; any errors are mine.)
Put the shot noise together with the read noise/dark offset.

Specimen.h is now the pure expected photon count image.

Also dropped the template parameter T (= uint16_t) as it is constant for
now.

Benchmark rendering and noise separately.

(Assisted by Claude Code; any errors are mine.)
Require enumerating through hub only.

(Assisted by Claude Code; any errors are mine.)
Zero SD is not allowed by std::normal_distribution.

(Assisted by Claude Code; any errors are mine.)
Consistent with others.

(Assisted by Claude Code; any errors are mine.)
Standard for shutters.

(Assisted by Claude Code; any errors are mine.)
(Assisted by Claude Code; any errors are mine.)
(for std::plus<>)

(Assisted by Claude Code; any errors are mine.)
@marktsuchida

Copy link
Copy Markdown
Owner

@gselzer Can you give this a quick test to make sure I didn't break any intended behavior?

@gselzer

gselzer commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

@marktsuchida seems to work well for me!

@marktsuchida
marktsuchida merged commit 715d6d5 into marktsuchida:main Sep 25, 2026
6 checks passed
@marktsuchida marktsuchida linked an issue Sep 25, 2026 that may be closed by this pull request
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.

Add a simulated shutter device

2 participants