Skip to content

Use the pylablib Shamrock actuator in the ShamrockSCMOS plugin - #35

Merged
seb5g merged 2 commits into
feature/andor-legacy-pluginsfrom
fix/andor-scmos-imports
Nov 4, 2026
Merged

seb5g merged 2 commits into
feature/andor-legacy-pluginsfrom
fix/andor-scmos-imports

Conversation

@seb5g

@seb5g seb5g commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #34 (base is its branch; retarget to 5.0.x once #34 is merged).

Before: daq_1Dviewer_ShamrockSCMOS and daq_1Dviewer_ShamrockSCMOSLegacy import daq_move_plugins.daq_move_Shamrock, which #32 removed, so they cannot be imported on 5.0.x.

After:

  • ShamrockSCMOS (composite) uses DAQ_Move_ShamrockPll for the spectrometer, as ShamrockCCDPll does: SetNumberPixelsSR, SetPixelWidthSR and GetCalibrationSR become set_number_pixels, set_pixel_width and get_calibration() (metres, converted to nm), and the wavelength is read with get_wavelength(). The number of pixels is set again before each calibration read, because the ROI may have changed.
  • ShamrockSCMOSLegacy (double inheritance) is left as it is and imports the actuator from pymodaq_plugins_andor.legacy (Keep the replaced plugins in a legacy folder #34).
  • Both declare supported_platforms = ('win32',): they load the Andor SDK3 (and, for the legacy one, the Shamrock SDK) with ctypes.windll. With the declaration, PyMoDAQ >= 5.3.5 refuses to initialize them elsewhere and the plugin tests skip them instead of failing.

Tested: no hardware. The file compiles and check_plugin was run locally on Linux. Not verified: the SDK3 camera and the pylablib Shamrock in the same process, and the calibration values and flip of the wavelength axis against a real spectrometer. The CI of 5.0.x is red for reasons I cannot read in the logs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg

…eclare them Windows only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg

seb5g commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

tests / tests is red here as on the base (5.0.x after #32, and #34). The only information I can read is "Process completed with exit code 1" on the Tests step: the job logs are not readable from my session, so I cannot tell yet whether the SCMOS imports were part of the failure or whether another plugin of the package fails first. I will not guess a fix; the failing log lines are needed to continue.


Generated by Claude Code

@seb5g seb5g changed the title Fix the ShamrockSCMOS imports left dangling by the legacy move Use the pylablib Shamrock actuator in the ShamrockSCMOS plugin Nov 4, 2026
@seb5g
seb5g merged commit 29cfcbf into feature/andor-legacy-plugins Nov 4, 2026
0 of 7 checks passed
@seb5g
seb5g deleted the fix/andor-scmos-imports branch November 4, 2026 15:43
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