Skip to content

Commit

Permalink
Merge pull request #15 from roxyboy/noneed
Browse files Browse the repository at this point in the history
xarray was smart all along
  • Loading branch information
Takaya Uchida authored Aug 11, 2022
2 parents 5ac8851 + 26f90af commit 00ffe89
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions xwavelet/wavelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,6 @@ def dwvlt(da, s, spacing_tol=1e-3, dim=None, xo=50e3, a=1.0, ntheta=16, wtype="m
else:
raise NotImplementedError("Only the Morlet wavelet is implemented for now.")

new_coords = dict()
for d in dim:
new_coords[d] = da[d]
wavelet = xr.DataArray(wavelet.data, dims=dim, coords=new_coords)

dawt = (da * np.conj(wavelet)).sum(dim, skipna=True) * np.prod(delta_x) / s
dawt = dawt.drop_vars(sdim)
dawt[sdim] = xo * s
Expand Down

0 comments on commit 00ffe89

Please sign in to comment.