Skip to content

Commit

Permalink
Improved _ImageParser docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
hpparvi committed Dec 10, 2024
1 parent ad22d50 commit b0a72ea
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions specreduce/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,17 @@ def _parse_image(self, image,
changed until operations can handle variable image
orientations. [default: 1]
mask_treatment
Treatment method for the mask.
The method for handling masked or non-finite data. Choice of ``filter``,
``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
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,
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 image data.
[default: ``filter``]
Returns
-------
Expand Down Expand Up @@ -150,8 +160,9 @@ def _mask_and_nonfinite_data_handling(image, mask,
----------
image : array-like
The input image data array that may contain nonfinite values.
mask : array-like or None
An optional mask array. Nonfinite values in the image will be added to this mask.
mask : array-like of bool or None
An optional Boolean mask array. Nonfinite values in the image will be added
to this mask.
mask_treatment : str
Specifies how to handle masked data:
- 'filter' (default): Returns the unmodified input image and combined mask.
Expand Down

0 comments on commit b0a72ea

Please sign in to comment.