Skip to content

Commit

Permalink
Replace broken URL
Browse files Browse the repository at this point in the history
and deprecated np.trapz usage.
  • Loading branch information
pllim committed Dec 5, 2023
1 parent 6b14578 commit f1cca76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion specreduce/calibration_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ class AtmosphericTransmission(AtmosphericExtinction):
two columns, wavelength and transmission (unscaled dimensionless). If
this isn't provided, a model is built from a pre-calculated table of values
from 0.9 to 5.6 microns. The values were generated by the ATRAN model,
https://atran.arc.nasa.gov/cgi-bin/atran/atran.cgi (Lord, S. D., 1992, NASA
https://ntrs.nasa.gov/citations/19930010877 (Lord, S. D., 1992, NASA
Technical Memorandum 103957). The extinction is given as a linear transmission
fraction at an airmass of 1 and 1 mm of precipitable water.
Expand Down
3 changes: 2 additions & 1 deletion specreduce/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from astropy import units as u
from astropy.modeling import Model, models, fitting
from astropy.nddata import NDData, VarianceUncertainty
from scipy.integrate import trapezoid
from scipy.interpolate import RectBivariateSpline
from specutils import Spectrum1D

Expand Down Expand Up @@ -794,7 +795,7 @@ def __call__(self, image=None, trace_object=None,
else: # interpolated_profile
fitted_col = interp_spatial_prof(col_pix, xd_pixels)
kernel_vals.append(fitted_col)
norms.append(np.trapz(fitted_col, dx=1)[0])
norms.append(trapezoid(fitted_col, dx=1)[0])

# transform fit-specific information
kernel_vals = np.vstack(kernel_vals).T
Expand Down

0 comments on commit f1cca76

Please sign in to comment.