5 releases
0.1.4 | Nov 7, 2021 |
---|---|
0.1.3 | Nov 7, 2021 |
0.1.2 | Nov 7, 2021 |
0.1.1 | Nov 7, 2021 |
0.1.0 | Nov 5, 2021 |
#630 in Math
39 downloads per month
Used in caliphui
30KB
399 lines
Caliph-RS
A simple tool to calibrate and convert pH measurements using a two point method.
About
This project contains two binaries:
caliph
, for calibrating a pH electrode using a two point pH method.
conph
for converting measured pH values to calibrated ones.
Demo
Once installed (see below), the two methods available are:
Calibration
When the temperature is 25˚C during the measurement:
$ caliph 3.97 10.2
-----------------
Calibrating
-----------------
Slope 0.96308
Offset 0.18657
-----------------
Optional temperature argument:
$ caliph 3.97 10.2 -t 22.3
-----------------
Calibrating
-----------------
Slope 0.96828
Offset 0.16052
-----------------
Boolean flat to save the calibration to calibration.ph
in the current directory:
$ caliph 3.97 10.2 -t 22.3 -s
-----------------
Calibrating
-----------------
Slope 0.96828
Offset 0.16052
-----------------
Saved to calibration.ph
Conversion
Assuming the calibration.ph
file exists:
$ conph 3.5
---------------
Converting
---------------
Input 3.5
Output 3.5495
---------------
Custom calibration settings fof the slope and offset:
-c
sets it to custom, -s VAL
is for the slope, -o VAL
is for the offset
$ conph 3.5 -c -s 1.1 -o 0.02
---------------
Converting
---------------
Input 3.5
Output 3.8700
---------------
Installing
The latest version of can be installed or updated with cargo install
:
cargo install caliph
or
cargo install --git https://github.com/pdunne/caliph-rs
Binary releases will also be made available on the github page.
Compiling
Follow these instructions to compile cargo-outdated
, then skip down to Installation.
- Ensure you have current version of
cargo
and Rust installed - Clone the project
$ git clone https://github.com/kbknapp/cargo-outdated && cd cargo-outdated
- Build the project
$ cargo build --release
- Once complete, the binary will be located at
target/release/cargo-outdated
Options
For caliph
:
caliph 0.1.3
Peter Dunne
Calculates corrections from 2 point pH calibration
USAGE:
caliph [FLAGS] [OPTIONS] <ph4> <ph10>
FLAGS:
-h, --help Prints help information
-s, --store Store calibration to file calib.ph
-V, --version Prints version information
OPTIONS:
-t, --temperature <temperature> temperature of measurement
ARGS:
<ph4> pH measured for pH 4.01 buffer solution
<ph10> pH measured for pH 10.01 buffer solution
and for conph
conph 0.1.3
Peter Dunne
Corrects pH measurement with calibration
USAGE:
conph [FLAGS] [OPTIONS] <ph>
FLAGS:
-c, --custom Custom Input
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-o, --offset <offset> Offset
-s, --slope <slope> Slope
-t, --temperature <temperature> Temperature of measurement
ARGS:
<ph> pH measured
License
calpih-rs
is released under the terms of the Mozilla Public
License, v. 2.0. See the LICENSE.
Dependencies
~1–8.5MB
~54K SLoC