This function compute oxygen consumption from Harvard Spirometer tracing. Simply define 2 points along oxygen line, and provide displacement in x-and y-direction. Oxygen consumption can be reported in units: L/hr or ml/min, and at condition: ATPS or STPD.
Displacement of tracing in x-direction (in millimeter).
Displacement of tracing in y-direction (in millimeter).
Paper speed of the kymograph (in millimeter/minute), 25 mm/min by default.
(Character) Unit of the oxygen consumption to return, e.g. L/hr (default).
(Character) Environmental condition to calculate oxygen consumption that affect gas volume, must be one of:
ATPS: Volume of gas at ambient (A) temperature (T) (room temperature) and barometric pressure (P) saturated (S) with water vapor.
STPD: Volume of gas at the standard (S) temperature (T) of 0°C and a barometric pressure (P) of 760 mmHg, and in a dry state (D).
(If condition
= "STPD") Barometric pressure at the recording site.
(If condition
= "STPD") Temperature in celsius at the recording site.
Print information to console and return oxygen consumption as numeric vector, invisibly.
# Oxygen Consumption at ATPS in L/hr
get_oxycons(x = 100, y = 50)
#> Harvard spirometer tracing:
#> - Paper speed = 25 mm/min
#> - Time interval = 4 min (horizontal displacement = 100 mm)
#> - Volume change = 1500 ml (vertical displacement = 50 mm)
#>
#> Oxygen Consumption at ATPS = 22.5 L/hr
# Oxygen Consumption at ATPS in ml/min
get_oxycons(x = 100, y = 50, unit = "ml/min")
#> Harvard spirometer tracing:
#> - Paper speed = 25 mm/min
#> - Time interval = 4 min (horizontal displacement = 100 mm)
#> - Volume change = 1500 ml (vertical displacement = 50 mm)
#>
#> Oxygen Consumption at ATPS = 375 ml/min
# Oxygen Consumption at STPD, in L/hr, must provide `baro` and `temp_c`
get_oxycons(x = 100, y = 50, condition = "STPD", baro = 760, temp_c = 23)
#> Harvard spirometer tracing:
#> - Paper speed = 25 mm/min
#> - Time interval = 4 min (horizontal displacement = 100 mm)
#> - Volume change = 1500 ml (vertical displacement = 50 mm)
#> - STPD Correction factor = 0.892 (760 mmHg, 23 degree celcius)
#>
#> Oxygen Consumption at STPD = 20.08 L/hr