Skip to content

MHKiT-Python: v1.1.0

Choose a tag to compare

@simmsa simmsa released this 10 Jul 17:57
· 101 commits to main since this release

Additions

  • Acoustics: Add millicdecade and WISPR instrument support
    • Added millidecade spectral conversion
    • Added a WISPR hydrophone reader
    • Added a voltage-based export_audio resampling option
    • Refactored band-averaging to avoid losing information at frequency-band boundaries
    • #447
    • Author: @jmcvey3
    • Reviewer: @simmsa
  • DOLfYN: Add Nortek Aquadopp ADCP support
    • Added DOLfYN support for reading Aquadopp instruments
    • Cleaned Nortek parsing code
    • Simplified handling of the non-cabled ADV orientation flag
    • #434
    • Author: @jmcvey3
    • Reviewer: @akeeste
  • Examples: Add ADCP waves example: example/adcp_waves_example.ipynb
    • Added an example notebook showing how to ingest and analyze wave measurements from a dual-profile Nortek Signature 250 deployment at PacWave.
    • #430
    • Author: @jmcvey3
    • Reviewer: @akeeste

Improvements

Acoustics

  • Improved flexibility and robustness of the Acoustics module
    • Added a configurable FFT length for sound pressure PSDs
    • Renamed bin/windowing attributes for clarity
    • Fixed an incorrectly signed gain correction
    • #433
    • Author: @jmcvey3
    • Reviewer: @akeeste

DOLfYN

  • Refactored PSD calculations to use scipy.signal.welch
    • Replaced DOLfYN's custom Welch-like PSD implementation (built each segment from bin slices, could not overlap FFT segments) with scipy.signal.welch
    • Removed the bin-based segment structure and added a step argument to control overlap
    • Dropped float32 casts in some functions in favor of float64
    • Removed fft.py and renamed tools/misc.py to tools.py
    • Breaking Changes:
      • NaNs are no longer tolerated in PSD calculations
      • DOLfYN defaults to 0% overlap to preserve existing array shapes
      • Acoustics defaults to 50% overlap
      • PSD output time dimension renamed to time_psd
    • #452
    • Author: @jmcvey3
    • Reviewer: @akeeste, @simmsa
  • Improved handling of "averaged" profiles
    • Fixed handling of Nortek Signature dual-profile ADCP data by defaulting to "_avg" velocity variables when untagged ones are absent.
    • #430
    • Author: @jmcvey3
    • Reviewer: @akeeste
  • Critical PSD bugfix
    • Fixed a bug where individual FFTs received a 50% overlap twice, which corrupted the first and last spectrum of a timeseries.
    • #430
    • Author: @jmcvey3
    • Reviewer: @akeeste

Examples

River/IO

  • Fixed Qhull interpolation and D3D coordinate-system errors
  • Delft3D module updates
    • Added new Delft3D coordinate names
    • Added a new grid-convergence-index calculation function
    • Added support for xarray/netCDF4 input in the D3D module
    • #428
    • Author: @browniea
    • Reviewer: @akeeste

Wave

  • NDBC Directional Wave Units
    • Fixed NDBC directional wave spectrum output to return degrees instead of radians
    • Updated polar plots so 0 deg is at the top and increases clockwise
    • #437
    • Author: @jmcvey3
    • Reviewer: @akeeste
    • Fixes: #427

Wave/Hindcast

  • Added a hindcast_guard exception-handling decorator (hindcast_exceptions.py) that surfaces a clear error on HSDS request failures, distinguishing the known NLR HSDS outage (#450) from other failures

Maintenance

  • Added Python 3.13 support
  • Added pandas 3 Support
    • Updated the pandas dependency to allow pandas 3.x
    • Added a compatibility shim for NDBC missing-value handling related to pandas 3 object to String dtype api changes
    • Fixed a deprecated period alias in tests
    • #443
    • Author: @simmsa
    • Reviewer: @akeeste
    • Fixes: #440
  • Updated GitHub Actions CI, expanded installation/developer documentation, refreshed dev environment, and trimmed dependencies
    • Refactored optional dependencies
    • Standardized conda/conda-forge environment builds
    • Scoped black linting to changed files
    • #436
    • Author: @simmsa
    • Reviewer: @akeeste
  • Update rex dependency to target pypi package to NLR-rex[hsds]>=0.5.0