Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kelle committed Nov 15, 2024
1 parent aa0bec1 commit 7a77b5d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sedkit/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import numpy as np
from pandas import DataFrame
from svo_filters import Filter

import warnings

from . import mcmc as mc
from . import utilities as u
Expand Down Expand Up @@ -1494,7 +1494,11 @@ def __init__(self, file, wave_units=None, flux_units=None, ext=0,

# Sanity check for wave_units
if data[0].min() > 100 and wave_units == q.um:
print("WARNING: Your wavelength range ({} - {}) looks like Angstroms. Are you sure it's {}?".format(data[0].min(), data[0].max(), wave_units))
msg = (
f"Your wavelength range ({data[0].min()} - {data[0].max()})"
f"looks like Angstroms. Are you sure it's {wave_units}?"
)
warnings.warn(msg)

# Apply units
wave = data[0] * wave_units
Expand Down

0 comments on commit 7a77b5d

Please sign in to comment.