Skip to content

Commit

Permalink
fixed error when converting the bands
Browse files Browse the repository at this point in the history
  • Loading branch information
cparcerisas committed Sep 10, 2024
1 parent 600866d commit 8034b84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pypam/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@ def hmb_to_decidecade(ds, data_var, nfft, freq_coord):

# Compute the decidecades on the non-linear part
high_psd = ds_data_var.where(ds[freq_coord] > changing_frequency, drop=True)
high_psd = high_psd * (high_psd.upper_frequency - high_psd.lower_frequency)
high_decidecade = high_psd.groupby_bins(freq_coord, bins=bands_limits, labels=bands_c, right=True).sum()
bandwidths = np.diff(bands_limits)
high_decidecade = high_decidecade / bandwidths
Expand Down

0 comments on commit 8034b84

Please sign in to comment.