Skip to content

Commit

Permalink
Downgrade warning to log debug
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Dec 19, 2023
1 parent aa08b1b commit 0a48f52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions aiapy/calibrate/tests/test_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ def test_correct_degradation(aia_171_map, correction_table, version):
),
],
)
@pytest.mark.filterwarnings("ignore:Multiple valid epochs for")
def test_degradation(correction_table, version, time_correction_truth):
# NOTE: this just tests an expected result from aiapy, not necessarily an
# absolutely correct result. It was calculated for the above time and
Expand Down Expand Up @@ -223,7 +222,6 @@ def test_degradation(correction_table, version, time_correction_truth):
),
],
)
@pytest.mark.filterwarnings("ignore:Multiple valid epochs for")
def test_degradation_all_wavelengths(wavelength, result):
obstime = astropy.time.Time("2015-01-01T00:00:00", scale="utc")
time_correction = degradation(
Expand Down
6 changes: 2 additions & 4 deletions aiapy/calibrate/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
from astropy.table import QTable
from astropy.time import Time
from erfa.core import ErfaWarning
from sunpy import log
from sunpy.data import manager
from sunpy.net import attrs, jsoc

from aiapy import _SSW_MIRRORS
from aiapy.util.decorators import validate_channel
from aiapy.util.exceptions import AiapyUserWarning

__all__ = ["get_correction_table", "get_pointing_table", "get_error_table"]

Expand Down Expand Up @@ -147,10 +147,8 @@ def _select_epoch_from_correction_table(channel: u.angstrom, obstime, table, *,
# use the most up-to-date one.
i_epoch = np.where(obstime_in_epoch)[0]
if i_epoch.shape[0] > 1:
warnings.warn(
log.debug(
f"Multiple valid epochs for {obstime}. Using the most recent one",
AiapyUserWarning,
stacklevel=3,
)
# Create new table with only first and obstime epochs
return QTable(table[[0, i_epoch[-1]]])
Expand Down

0 comments on commit 0a48f52

Please sign in to comment.