Skip to content

Make laser parameters configurable; utility function for tunable laser - #970

Merged
oczoske merged 6 commits into
mainfrom
oc/metis_lasers
Sep 2, 2026
Merged

Make laser parameters configurable; utility function for tunable laser#970
oczoske merged 6 commits into
mainfrom
oc/metis_lasers

Conversation

@oczoske

Copy link
Copy Markdown
Collaborator

The laser parameters (wavelength, power) are now taken from wcu.meta, i.e. from a config file or from kwargs.
All parameters can be changed by doing, e.g.

wcu = metis['wcu_source']
wcu.meta['laser_l_wave'] = 3.15
wcu.set_lamp("laser")

set_lamp is necessary to recompute the lamp emission.

The wavelengths of the tunable laser should be more easily accessible to the user, therefore a utility method is offered (this recomputes the emission automatically):

wcu.tune_laser(wavelength=np.linspace(4.68, 4.78, 10))

A validation method for the wavelengths has been implemented but is not yet used as we do not have reliable information on the actually available wavelength range.

@oczoskeoczoske self-assigned this Aug 11, 2026
@oczoskeoczoske added API How users interact with the software instrument-specific METIS AIT Issues relating to METIS AIT simulations labels Aug 11, 2026
@codecov

codecovBot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.73684% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.35%. Comparing base (5b85425) to head (1e4c727).
⚠️ Report is 42 commits behind head on main.

Files with missing linesPatch %Lines
scopesim/effects/metis_wcu/metis_wcu.py94.73%2 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #970 +/- ##
==========================================
+ Coverage 75.89% 76.35% +0.46% 
==========================================
Files 70 69 -1 Lines 9030 9086 +56 ==========================================
+ Hits 6853 6938 +85 + Misses 2177 2148 -29 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@teutoburgteutoburg moved this to 👀 Awaiting Review in ScopeSim-developmentAug 12, 2026

@teutoburgteutoburg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See individual comments, but overall fine.

Comment threadscopesim/effects/metis_wcu/metis_wcu.py Outdated
Comment threadscopesim/effects/metis_wcu/metis_wcu.py
Comment threadscopesim/effects/metis_wcu/metis_wcu.py
Comment threadscopesim/effects/metis_wcu/metis_wcu.py Outdated
Comment threadscopesim/tests/tests_effects/test_MetisWCU.py Outdated
@teutoburgteutoburg moved this from 👀 Awaiting Review to 🚧 On hold in ScopeSim-developmentAug 25, 2026
@oczoskeoczoske moved this from 🚧 On hold to 🏗 In progress in ScopeSim-developmentSep 1, 2026
@oczoske
oczoske marked this pull request as ready for review September 1, 2026 14:48
@oczoske
oczoske merged commit e9b451d into mainSep 2, 2026
22 checks passed
@oczoske
oczoske deleted the oc/metis_lasers branch September 2, 2026 08:29
@github-project-automationgithub-project-automationBot moved this from 🏗 In progress to ✅ Done in ScopeSim-developmentSep 2, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APIHow users interact with the softwareinstrument-specificMETIS AITIssues relating to METIS AIT simulations

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants

@oczoske@teutoburg