Skip to content

Commit

Permalink
Fix setting source spectrum following PR 405
Browse files Browse the repository at this point in the history
  • Loading branch information
oczoske committed Feb 15, 2025
1 parent 150e5dc commit 261d791
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"outputs": [],
"source": [
"src = flatlamp()\n",
"src.spectra[0] = spec"
"src.fields[0].spectra[0] = spec # NB: do not try to set src.spectra[0] directly, this has no effect"
]
},
{
Expand Down Expand Up @@ -385,7 +385,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.2"
"version": "3.12.9"
}
},
"nbformat": 4,
Expand Down
9 changes: 5 additions & 4 deletions METIS/docs/example_notebooks/demos/demo_rectify_traces.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"metadata": {},
"outputs": [],
"source": [
"# sim.download_packages([\"METIS\", \"telescopes/ELT\", \"locations/Armazones\"])"
"#sim.download_packages([\"METIS\", \"ELT\", \"Armazones\"])"
]
},
{
Expand Down Expand Up @@ -111,7 +111,7 @@
"spec = SourceSpectrum(Empirical1D, points=wave*u.um, lookup_table=flux)\n",
"\n",
"src_linelamp = flatlamp()\n",
"src_linelamp.spectra[0] = spec"
"src_linelamp.fields[0].spectra[0] = spec # NB: Do not try to set src_linelamp.spectra[0], this has no effect. "
]
},
{
Expand Down Expand Up @@ -149,7 +149,7 @@
"id": "5732f705",
"metadata": {},
"source": [
"We exclude atmospheric emission (and absorption) as is appropriate for a calibration-lamp observation. As the source fills the slit homogeneously a PSF convolution should have no effect on the result. Excluding PSF convolution cuts down significantly on computation time."
"We exclude atmospheric emission (and absorption) and the telescope optics as is appropriate for a calibration-lamp observation. As the source fills the slit homogeneously a PSF convolution should have no effect on the result. Excluding PSF convolution cuts down significantly on computation time."
]
},
{
Expand All @@ -160,6 +160,7 @@
"outputs": [],
"source": [
"metis[\"skycalc_atmosphere\"].include = False\n",
"metis[\"telescope_reflection\"].include = False\n",
"metis[\"psf\"].include = False"
]
},
Expand Down Expand Up @@ -305,7 +306,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.2"
"version": "3.12.9"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 261d791

Please sign in to comment.