diff --git a/test_rust.py b/test_rust.py old mode 100644 new mode 100755 index 34f4839..6e56382 --- a/test_rust.py +++ b/test_rust.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from pathlib import Path from thermaldecoder import decode import numpy as np diff --git a/thermaldecoder/src/lib.rs b/thermaldecoder/src/lib.rs index 14a1ce9..de0a407 100644 --- a/thermaldecoder/src/lib.rs +++ b/thermaldecoder/src/lib.rs @@ -169,6 +169,7 @@ fn decode_raw(filename: &str, frames_root: &str) -> anyhow::Result> .copied() .map(|x| { let x: f64 = x.into(); + let x = x / 256.0; ((-1.665884e-08) * x.powf(4.) + (1.347094e-05) * x.powf(3.) + (-4.396264e-03) * x.powf(2.)