Skip to content

Commit 4d22d84

Browse files
authored
Add version info in various docstrings (#678)
2 parents cf8b3b1 + 85d09a1 commit 4d22d84

11 files changed

Lines changed: 99 additions & 23 deletions

File tree

scopesim/effects/binning_3d.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414

1515

1616
class FluxBinning3D(Effect):
17-
"""Takes care of cube flux conversion in absence of a SpectralTraceList."""
17+
"""Takes care of cube flux conversion in absence of a SpectralTraceList.
18+
19+
.. versionadded:: PLACEHOLDER_NEXT_RELEASE_VERSION
20+
21+
"""
1822

1923
z_order: ClassVar[tuple[int, ...]] = (690,)
2024

scopesim/effects/electronic/electrons.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ class ADConversion(Effect):
124124
Again, `!DET.gain` can be used here. This can be useful when the
125125
`DetectorModePropertiesSetter` effect is used to switch between different
126126
detector modes with different gain values.
127+
128+
.. versionchanged:: PLACEHOLDER_NEXT_RELEASE_VERSION
129+
130+
Renamed from `Quantization` to `ADConversion`.
127131
"""
128132

129133
z_order: ClassVar[tuple[int, ...]] = (825,)

scopesim/effects/electronic/exposure.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ def apply_to(self, obj, **kwargs):
186186

187187

188188
class ExposureOutput(Effect):
189-
"""Return average or sum of ``ndit`` subexposures."""
189+
"""Return average or sum of ``ndit`` subexposures.
190+
191+
.. versionadded:: 0.9.3
192+
193+
"""
190194

191195
required_keys = {"dit", "ndit"}
192196
z_order: ClassVar[tuple[int, ...]] = (861,)

scopesim/effects/metis_ifu_simple/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# -*- coding: utf-8 -*-
2-
"""
3-
Effects for the METIS IFU_SMPL mode
2+
"""Effects for the METIS IFU_SMPL mode.
3+
4+
.. versionadded:: PLACEHOLDER_NEXT_RELEASE_VERSION
45
56
Classes:
67
- LineSpreadFunction
78
89
"""
10+
911
from .ifu_simple import LineSpreadFunction
1012
from ...utils import get_logger
1113

scopesim/effects/metis_ifu_simple/ifu_simple.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Effects for the METIS ifu_cube mode"""
2+
"""Effects for the METIS ifu_cube mode."""
33

44
from typing import ClassVar
55

@@ -15,7 +15,7 @@
1515

1616
class LineSpreadFunction(Effect):
1717
"""
18-
Compute and apply line spread function to IFU cube
18+
Compute and apply line spread function to IFU cube.
1919
2020
The effect can be instantiated either with the single parameter
2121
@@ -39,7 +39,11 @@ class LineSpreadFunction(Effect):
3939
Spectral bin width of the 3D detector of the lms_cube mode.
4040
4141
These values are set in `METIS_LMS_SMPL.yaml`.
42+
43+
.. versionadded:: PLACEHOLDER_NEXT_RELEASE_VERSION
44+
4245
"""
46+
4347
z_order: ClassVar[tuple[int, ...]] = (660,)
4448
report_plot_include: ClassVar[bool] = True
4549
report_table_include: ClassVar[bool] = False
@@ -56,7 +60,7 @@ def __init__(self, **kwargs):
5660
self.kernel = self.get_kernel()
5761

5862
def apply_to(self, obj, **kwargs):
59-
"""Apply the LSF"""
63+
"""Apply the LSF."""
6064
if not isinstance(obj, FieldOfView):
6165
return obj
6266

@@ -69,8 +73,7 @@ def apply_to(self, obj, **kwargs):
6973
return obj
7074

7175
def get_lsf_width(self):
72-
"""Determine width of the LSF kernel at central wavelength"""
73-
76+
"""Determine width of the LSF kernel at central wavelength."""
7477
slope = self.meta['fit_slope']
7578
intercept = self.meta['fit_intercept']
7679
lamc = self.meta["wavelen"]
@@ -85,10 +88,8 @@ def get_lsf_width(self):
8588

8689
return dlam_per_slice / spec_binwidth
8790

88-
8991
def get_kernel(self):
90-
"""Build LSF kernel: box kernel smoothed with narrow Gauss"""
91-
92+
"""Build LSF kernel: box kernel smoothed with narrow Gauss."""
9293
box = Box1DKernel(width=self.lsfwidth)
9394
gauss = Gaussian1DKernel(1)
9495
if box.shape > gauss.shape:

scopesim/effects/metis_wcu/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
Effects for METIS Warm Calibration Unit
3+
Effects for METIS Warm Calibration Unit.
4+
5+
.. versionadded:: 0.9.2
46
57
Classes:
68
- WCUSource

scopesim/effects/metis_wcu/fpmask.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# -*- coding: utf-8 -*-
2-
"""A class for the METIS WCU focal-plane mask."""
2+
"""A class for the METIS WCU focal-plane mask.
3+
4+
.. versionadded:: 0.9.2
5+
6+
"""
37

48
from pathlib import Path
59

@@ -22,6 +26,8 @@ class FPMask:
2226
----------
2327
See :class:`DataContainer` for input parameters
2428
29+
.. versionadded:: 0.9.2
30+
2531
"""
2632

2733
hdr = {

scopesim/effects/metis_wcu/metis_wcu.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# -*- coding: utf-8 -*-
2-
"""Classes for the METIS Warm Calibration Unit."""
2+
"""Classes for the METIS Warm Calibration Unit.
3+
4+
.. versionadded:: 0.9.2
5+
6+
"""
37

48
from typing import ClassVar
59

@@ -70,6 +74,9 @@ class WCUSource(TERCurve):
7074
7175
Which laser is seen depends on the wavelength of the observation. Note that
7276
the tunable laser currently cannot be tuned.
77+
78+
.. versionadded:: 0.9.2
79+
7380
"""
7481

7582
z_order: ClassVar[tuple[int, ...]] = (113, 513)

scopesim/effects/psfs/discrete.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ class FieldConstantPSF(DiscretePSF):
6969
7070
For spectroscopy, a wavelength-dependent PSF cube is built, where for each
7171
wavelength the reference PSF is scaled proportional to wavelength.
72+
73+
.. versionchanged:: PLACEHOLDER_NEXT_RELEASE_VERSION
74+
PSF interpolation can now be limited to the central wavelength by
75+
setting the "!OBS.interp_psf" keyword to False.
76+
7277
"""
7378

7479
required_keys = {"filename"}

scopesim/source/source.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ class Source:
151151
--------
152152
synphot : ``https://synphot.readthedocs.io/en/latest/``
153153
154+
.. versionchanged:: PLACEHOLDER_NEXT_RELEASE_VERSION
155+
156+
Added the ability to instantiate directly from an existing SourceField
157+
subclass instance.
158+
154159
"""
155160

156161
def __init__(self, filename=None, cube=None, ext=0,

0 commit comments

Comments
 (0)