• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MHKiT-Software / MHKiT-Python / 17043903681
85%
master: 85%

Build:
Build:
LAST BUILD BRANCH: develop
DEFAULT BRANCH: master
Ran 18 Aug 2025 02:52PM UTC
Jobs 0
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
17043903681

push

github

web-flow
DOLfYN/RDI: Set  `fs` to NaN when typical calculation methods yield error (#408) (#409)

## Summary

Fix #408: ZeroDivisionError when reading RDI burst mode data files where
`sec_between_ping_groups=0` causes division by zero in sampling
frequency calculation.

## Changes

- Added check for `sec_between_ping_groups == 0` before calculation of
`fs`.

  - When true, set `fs` to `NaN` with descriptive warning.

- Added test using `unittest.mock.patch` to verify fix behavior with
burst mode configuration.

- Fixed pytest-asyncio deprecation warning in test configuration.

## Details

Per #408 RDI instruments in continuous burst mode set
`sec_between_ping_groups=0` for maximum ping rate, causing
ZeroDivisionError in:

```python
cfg["fs"] = 1 / (cfg["sec_between_ping_groups"] * cfg["pings_per_ensemble"])
```

The fix detects this condition and sets fs=NaN since burst mode
operation with variable timing prevents reliable sampling rate
determination using standard methods.

## Testing

Patch RDIReader.finalize to set `sec_between_ping_groups` to `0` and
verify the fix prevents the `ZeroDivisionError`, sets `fs` to `np.nan`
and warns the user.
Source Files on build 17043903681
Detailed source file information is not available for this build.
  • Back to Repo
  • c0bd56ec on github
  • Prev Build on develop (#16996002605)
  • Next Build on develop (#17079934795)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc