Skip to content

Commit

Permalink
doc fixes (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
cshanahan1 authored Jan 12, 2025
1 parent 857c652 commit 28aa82b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
26 changes: 13 additions & 13 deletions specreduce/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class Background(_ImageParser):
traces : List, `specreduce.tracing.Trace`, int, float
Individual or list of trace object(s) (or integers/floats to define
FlatTraces) to extract the background. If None, a ``FlatTrace`` at the
center of the image (according to `disp_axis`) will be used.
center of the image (according to ``disp_axis``) will be used.
width : float
width of extraction aperture in pixels
statistic: string
statistic to use when computing the background. 'average' will
account for partial pixel weights, 'median' will include all partial
statistic to use when computing the background. ``average`` will
account for partial pixel weights, ``median`` will include all partial
pixels.
disp_axis : int
dispersion axis
Expand All @@ -50,9 +50,9 @@ class Background(_ImageParser):
[default: 0]
mask_treatment : string, optional
The method for handling masked or non-finite data. Choice of ``filter``,
``omit``, or ``zero-fill``. If ``filter`` is chosen, masked and non-finite
``omit``, or ``zero-fill``. If `filter` is chosen, masked and non-finite
data will not contribute to the background statistic that is calculated
in each column along `disp_axis`. If `omit` is chosen, columns along
in each column along ``disp_axis``. If ``omit`` is chosen, columns along
disp_axis with any masked/non-finite data values will be fully masked
(i.e, 2D mask is collapsed to 1D and applied). If ``zero-fill`` is chosen,
masked/non-finite data will be replaced with 0.0 in the input image,
Expand Down Expand Up @@ -245,12 +245,12 @@ def two_sided(cls, image, trace_object, separation, **kwargs):
crossdisp_axis : int
cross-dispersion axis
mask_treatment : string
The method for handling masked or non-finite data. Choice of `filter`,
`omit`, or `zero-fill`. If `filter` is chosen, masked/non-finite data
The method for handling masked or non-finite data. Choice of ``filter``,
``omit`, or ``zero-fill``. If `filter` is chosen, masked/non-finite data
will be filtered during the fit to each bin/column (along disp. axis) to
find the peak. If `omit` is chosen, columns along disp_axis with any
find the peak. If ``omit`` is chosen, columns along disp_axis with any
masked/non-finite data values will be fully masked (i.e, 2D mask is
collapsed to 1D and applied). If `zero-fill` is chosen, masked/non-finite
collapsed to 1D and applied). If ``zero-fill`` is chosen, masked/non-finite
data will be replaced with 0.0 in the input image, and the mask will then
be dropped. For all three options, the input mask (optional on input
NDData object) will be combined with a mask generated from any non-finite
Expand Down Expand Up @@ -294,12 +294,12 @@ def one_sided(cls, image, trace_object, separation, **kwargs):
crossdisp_axis : int
cross-dispersion axis
mask_treatment : string
The method for handling masked or non-finite data. Choice of `filter`,
`omit`, or `zero-fill`. If `filter` is chosen, masked/non-finite data
The method for handling masked or non-finite data. Choice of ``filter``,
``omit``, or ``zero-fill``. If `filter` is chosen, masked/non-finite data
will be filtered during the fit to each bin/column (along disp. axis) to
find the peak. If `omit` is chosen, columns along disp_axis with any
find the peak. If ``omit`` is chosen, columns along disp_axis with any
masked/non-finite data values will be fully masked (i.e, 2D mask is
collapsed to 1D and applied). If `zero-fill` is chosen, masked/non-finite
collapsed to 1D and applied). If ``zero-fill`` is chosen, masked/non-finite
data will be replaced with 0.0 in the input image, and the mask will then
be dropped. For all three options, the input mask (optional on input
NDData object) will be combined with a mask generated from any non-finite
Expand Down
13 changes: 7 additions & 6 deletions specreduce/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ class BoxcarExtract(SpecreduceOperation):
crossdisp_axis
cross-dispersion axis
mask_treatment
The method for handling masked or non-finite data. Choice of `filter`,
`omit`, or `zero-fill`. If `filter` is chosen, the mask is ignored
and the non-finite data will passed to the extraction as is. If `omit`
The method for handling masked or non-finite data. Choice of ``filter``,
``omit``, or ``zero-fill``. If `filter` is chosen, the mask is ignored
and the non-finite data will passed to the extraction as is. If ``omit``
is chosen, columns along disp_axis with any masked or non-finite data
values will be fully masked (i.e, 2D mask is collapsed to 1D and applied).
If `zero-fill` is chosen, masked and non-finite data will be replaced
If ``zero-fill`` is chosen, masked and non-finite data will be replaced
with 0.0 in the input image, and the mask will then be dropped.
For all three options, the input mask (optional on input NDData object)
will be combined with a mask generated from any non-finite values in the
Expand Down Expand Up @@ -248,8 +248,9 @@ class HorneExtract(SpecreduceOperation):
extraction - by default, a 1D gaussian is fit and as a uniform profile
across the spectrum. Alternativley, the ``self profile`` option may be
chosen - when this option is chosen, the spatial profile will be sampled
at various locations (set by <>) and interpolated between to produce a
smoothly varying spatial profile across the spectrum.
(using a default of 10 sample bins, but can be modified with
``spatial_profile``) and interpolated between to produce a smoothly varying
spatial profile across the spectrum.
If using the Gaussian option for the spatial profile, a background profile
may be fit (but not subtracted) simultaneously to the data. By default,
Expand Down
6 changes: 3 additions & 3 deletions specreduce/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ class FitTrace(Trace, _ImageParser):
``max``: Saves the position with the maximum flux in each bin.
[default: ``max``]
mask_treatment : string, optional
The method for handling masked or non-finite data. Choice of `filter` or
`omit`. If `filter` is chosen, masked/non-finite data will be filtered
The method for handling masked or non-finite data. Choice of ``filter`` or
``omit``. If `filter` is chosen, masked/non-finite data will be filtered
during the fit to each bin/column (along disp. axis) to find the peak.
If `omit` is chosen, columns along disp_axis with any masked/non-finite
If ``omit`` is chosen, columns along disp_axis with any masked/non-finite
data values will be fully masked (i.e, 2D mask is collapsed to 1D and applied).
For both options, the input mask (optional on input NDData object) will
be combined with a mask generated from any non-finite values in the image
Expand Down

0 comments on commit 28aa82b

Please sign in to comment.