punchbowl.level3.motion_filter#

Attributes#

Functions#

layer_mask() → numpy.ndarray)

Define a circular mask.

generate_hourglass_filter(→ numpy.ndarray)

Create an hourglass filter mask.

apply_motion_filter(→ numpy.ndarray)

Perform a Fourier motion filter on input datacube.

Module Contents#

punchbowl.level3.motion_filter.HAS_CUPY = True#
punchbowl.level3.motion_filter.layer_mask(radius: float, img_shape: int, int) numpy.ndarray#

Define a circular mask.

Parameters:
  • radius (float) – The radius of the circular mask.

  • img_shape (tuple) – The shape of the input image.

Returns:

Circular mask.

Return type:

np.ndarray

punchbowl.level3.motion_filter.generate_hourglass_filter(fft_cube: numpy.ndarray, cutoff_velocity: float) numpy.ndarray#

Create an hourglass filter mask.

Parameters:
  • fft_cube (np.ndarray) – The 3D Fourier space cube.

  • cutoff_velocity (float) – The cutoff velocity.

Returns:

Hourglass filter mask.

Return type:

np.ndarray

punchbowl.level3.motion_filter.apply_motion_filter(stacked_data: numpy.ndarray, apod_margin: int, use_gpu: bool = True) numpy.ndarray#

Perform a Fourier motion filter on input datacube.

Parameters:
  • stacked_data (np.ndarray) – Starfield removed stacked datacube.

  • apod_margin (int) – Apodization margin.

  • use_gpu (bool, optional) – Whether to use GPU for processing (default is True).

Returns:

Fourier motion filtered datacube.

Return type:

np.ndarray