Skip to content

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

Draft
oczoske wants to merge 3 commits into
mainfrom
oc/metis_lasers
Draft

Make laser parameters configurable; utility function for tunable laser#970
oczoske wants to merge 3 commits into
mainfrom
oc/metis_lasers

Conversation

@oczoske

@oczoske oczoske commented Aug 11, 2026

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.

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

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
scopesim/effects/metis_wcu/metis_wcu.py 92.59% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #970      +/-   ##
==========================================
+ Coverage   75.89%   75.92%   +0.03%     
==========================================
  Files          70       70              
  Lines        9030     9050      +20     
==========================================
+ Hits         6853     6871      +18     
- Misses       2177     2179       +2     

☔ 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.

@teutoburg teutoburg moved this to 👀 Awaiting Review in ScopeSim-development Aug 12, 2026

@teutoburg teutoburg 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 thread scopesim/effects/metis_wcu/metis_wcu.py Outdated
Comment thread scopesim/effects/metis_wcu/metis_wcu.py
Comment thread scopesim/effects/metis_wcu/metis_wcu.py
Comment thread scopesim/effects/metis_wcu/metis_wcu.py Outdated
Comment thread scopesim/tests/tests_effects/test_MetisWCU.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API How users interact with the software instrument-specific METIS AIT Issues relating to METIS AIT simulations

Projects

Status: 👀 Awaiting Review

Development

Successfully merging this pull request may close these issues.

2 participants