Skip to content

Commit

Permalink
Bump named-arrays to version 0.16.0 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrdie authored Nov 6, 2024
1 parent 391b935 commit 0761557
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions iris/sg/background/_background.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,7 @@ def fit(
wavelength_center = avg.wavelength_center.ndarray.mean()
# Interpolate wavelength samples onto cell centers
wavelength = avg.inputs.wavelength
for a in wavelength.shape:
lower = {a: slice(None, ~0)}
upper = {a: slice(+1, None)}
wavelength = (wavelength[lower] + wavelength[upper]) / 2
wavelength = avg.inputs.wavelength.cell_centers()
# Convert wavelength to velocity units
velocity = wavelength.to(
Expand Down Expand Up @@ -514,10 +510,7 @@ def subtract_spectral_line(

where_crop = np.isfinite(obs.outputs).mean(obs.axis_wavelength) > 0.7

velocity = obs.inputs.wavelength
for a in velocity.shape:
velocity = (velocity[{a: slice(None, ~0)}] + velocity[{a: slice(1, None)}]) / 2

velocity = obs.inputs.wavelength.cell_centers()
velocity = velocity[where_crop]

where = np.abs(velocity) < 150 * u.km / u.s
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ classifiers = [
dependencies = [
"astropy",
"requests",
"named-arrays==0.15.0",
"named-arrays==0.16.0",
]
dynamic = ["version"]

Expand Down

0 comments on commit 0761557

Please sign in to comment.