We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have some data that crashes wrsamp because calc_adc_params produces values that don't fit the data (off by one):
wrsamp
calc_adc_params
chmin = -2147483648 chmax = 2147483648 IndexError: Channel 0 contain values outside allowed range [-2147483648, 2147483647] for fmt 32
As you can see, chmax is just above the dmax of 2147483647 for 32.
chmax
dmax
2147483647
This is some data for reproduction: data.float32.zip
You can try it with:
data = np.reshape(np.fromfile("data.float32", dtype=np.float32), [-1, 12]) wfdb.wrsamp( record_name="test", sig_name=[f"d{x}" for x in range(12)], units=["mv"] * 12, fs=500, # fmt=["16"] * 12, p_signal=data )
Note how passing fmt=16 fixes the problem in this particular case, probably by chance because it happens to not trigger the bug.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have some data that crashes
wrsamp
becausecalc_adc_params
produces values that don't fit the data (off by one):As you can see,
chmax
is just above thedmax
of2147483647
for 32.This is some data for reproduction:
data.float32.zip
You can try it with:
Note how passing fmt=16 fixes the problem in this particular case, probably by chance because it happens to not trigger the bug.
The text was updated successfully, but these errors were encountered: