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

@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 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 lines Patch % Lines
scopesim/effects/metis_wcu/metis_wcu.py 94.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.

@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
@teutoburg teutoburg moved this from 👀 Awaiting Review to 🚧 On hold in ScopeSim-development Aug 25, 2026
@oczoske oczoske moved this from 🚧 On hold to 🏗 In progress in ScopeSim-development Sep 1, 2026
@oczoske
oczoske marked this pull request as ready for review September 1, 2026 14:48
@oczoske
oczoske merged commit e9b451d into main Sep 2, 2026
22 checks passed
@oczoske
oczoske deleted the oc/metis_lasers branch September 2, 2026 08:29
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to ✅ Done in ScopeSim-development Sep 2, 2026
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: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants