Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifications for super-Gaussian windowing #202

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 58 additions & 58 deletions amical/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def show_clean_params(
f_kernel=3,
offx=0,
offy=0,
apod=False,
apod=True,
window=None,
*,
ifu=False,
Expand Down Expand Up @@ -396,34 +396,34 @@ def show_clean_params(
from astropy.io import fits
from matplotlib.colors import PowerNorm

if apod:
warnings.warn(
"The 'apod' parameter is deprecated and will be "
"removed in a future release. Please only use "
"the 'window' parameter instead. The argument of "
"'window' can be set to None for not applying the "
"super-Gaussian windowing.",
DeprecationWarning,
)

if window is None:
warnings.warn(
"The argument of 'apod' will be forced to "
"False because the argument of `window` was "
"set to None`."
)

apod = False

elif not apod and window is not None:
warnings.warn(
"The argument of 'apod' will be forced to "
"True because the `window` size has been "
"set. To not apply the apodization, please "
"set the argument of 'window' to None."
)

apod = True
# if apod:
# warnings.warn(
# "The 'apod' parameter is deprecated and will be "
# "removed in a future release. Please only use "
# "the 'window' parameter instead. The argument of "
# "'window' can be set to None for not applying the "
# "super-Gaussian windowing.",
# DeprecationWarning,
# )
#
# if window is None:
# warnings.warn(
# "The argument of 'apod' will be forced to "
# "False because the argument of `window` was "
# "set to None`."
# )
#
# apod = False
#
# elif not apod and window is not None:
# warnings.warn(
# "The argument of 'apod' will be forced to "
# "True because the `window` size has been "
# "set. To not apply the apodization, please "
# "set the argument of 'window' to None."
# )
#
# apod = True
neutrinoceros marked this conversation as resolved.
Show resolved Hide resolved

with fits.open(filename) as fd:
data = fd[ihdu].data
Expand Down Expand Up @@ -620,7 +620,7 @@ def clean_data(
edge=0,
bad_map=None,
add_bad=None,
apod=False,
apod=True,
offx=0,
offy=0,
sky=True,
Expand Down Expand Up @@ -781,34 +781,34 @@ def select_clean_data(
"""
from astropy.io import fits

if apod:
warnings.warn(
"The 'apod' parameter is deprecated and will be "
"removed in a future release. Please only use "
"the 'window' parameter instead. The argument of "
"'window' can be set to None for not applying the "
"super-Gaussian windowing.",
DeprecationWarning,
)

if window is None:
warnings.warn(
"The argument of 'apod' will be forced to "
"False because the argument of `window` was "
"set to None`."
)

apod = False

elif not apod and window is not None:
warnings.warn(
"The argument of 'apod' will be forced to "
"True because the `window` size has been "
"set. To not apply the apodization, please "
"set the argument of 'window' to None."
)

apod = True
# if apod:
# warnings.warn(
# "The 'apod' parameter is deprecated and will be "
# "removed in a future release. Please only use "
# "the 'window' parameter instead. The argument of "
# "'window' can be set to None for not applying the "
# "super-Gaussian windowing.",
# DeprecationWarning,
# )
#
# if window is None:
# warnings.warn(
# "The argument of 'apod' will be forced to "
# "False because the argument of `window` was "
# "set to None`."
# )
#
# apod = False
#
# elif not apod and window is not None:
# warnings.warn(
# "The argument of 'apod' will be forced to "
# "True because the `window` size has been "
# "set. To not apply the apodization, please "
# "set the argument of 'window' to None."
# )
#
# apod = True

with fits.open(filename) as hdu:
cube = hdu[ihdu].data
Expand Down