Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyACS/acs.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,9 @@ def calibrate_frame(self, frame, get_external_temperature=False):
delta_t_c = self.f_delta_t_c(internal_temperature_su)
delta_t_a = self.f_delta_t_a(internal_temperature_su)
# Calibrate and apply temperature and clean water offset corrections
c = (self.offset_c - (1 / self.x) * np.log(frame.c_sig / frame.c_ref)) - delta_t_c
a = (self.offset_a - (1 / self.x) * np.log(frame.a_sig / frame.a_ref)) - delta_t_a
with np.errstate(divide='ignore'): # c_sig and a_sig can be zero
c = (self.offset_c - (1 / self.x) * np.log(frame.c_sig / frame.c_ref)) - delta_t_c
a = (self.offset_a - (1 / self.x) * np.log(frame.a_sig / frame.a_ref)) - delta_t_a
# Pack output in named tuple
if get_external_temperature:
return CalibratedFrameContainer(c=c, a=a,
Expand Down