correct rust temperature code
This commit is contained in:
parent
0554eaaafd
commit
44849f5b66
1
test_rust.py
Normal file → Executable file
1
test_rust.py
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from thermaldecoder import decode
|
from thermaldecoder import decode
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
|
@ -169,6 +169,7 @@ fn decode_raw(filename: &str, frames_root: &str) -> anyhow::Result<Vec<Vec<u16>>
|
||||||
.copied()
|
.copied()
|
||||||
.map(|x| {
|
.map(|x| {
|
||||||
let x: f64 = x.into();
|
let x: f64 = x.into();
|
||||||
|
let x = x / 256.0;
|
||||||
((-1.665884e-08) * x.powf(4.)
|
((-1.665884e-08) * x.powf(4.)
|
||||||
+ (1.347094e-05) * x.powf(3.)
|
+ (1.347094e-05) * x.powf(3.)
|
||||||
+ (-4.396264e-03) * x.powf(2.)
|
+ (-4.396264e-03) * x.powf(2.)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user