correct rust temperature code

This commit is contained in:
Alon Levy 2023-12-29 17:33:10 +02:00
parent 0554eaaafd
commit 44849f5b66
2 changed files with 2 additions and 0 deletions

1
test_rust.py Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
from pathlib import Path
from thermaldecoder import decode
import numpy as np

View File

@ -169,6 +169,7 @@ fn decode_raw(filename: &str, frames_root: &str) -> anyhow::Result<Vec<Vec<u16>>
.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.)