From 6668806432498aa123d4c15b2474c14a6ba105fa Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Tue, 16 May 2023 13:12:43 -0700 Subject: [PATCH] log 0 --- Server/Services/json/Log10.cs | 6 +++--- Server/Services/json/ProfilePoint.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Server/Services/json/Log10.cs b/Server/Services/json/Log10.cs index 4faf5bf..2b891e2 100644 --- a/Server/Services/json/Log10.cs +++ b/Server/Services/json/Log10.cs @@ -19,9 +19,9 @@ public class Log10 { Depth = Math.Log10(depth); ResistanceRaw = Math.Log10(raw); - ResistanceEdited = edited is null ? null : Math.Log10(edited.Value); - Resistivity = resistivity is null ? null : Math.Log10(resistivity.Value); - Concentration = cd is null ? null : Math.Log10(cd.Value); + ResistanceEdited = edited is null || edited.Value == 0 ? null : Math.Log10(edited.Value); + Resistivity = resistivity is null || resistivity.Value == 0 ? null : Math.Log10(resistivity.Value); + Concentration = cd is null || cd.Value == 0 ? null : Math.Log10(cd.Value); } } \ No newline at end of file diff --git a/Server/Services/json/ProfilePoint.cs b/Server/Services/json/ProfilePoint.cs index ca8aeb1..9e092f1 100644 --- a/Server/Services/json/ProfilePoint.cs +++ b/Server/Services/json/ProfilePoint.cs @@ -31,7 +31,7 @@ public class ProfilePoint Concentration = cd; DeltaPercent = lastProfilePoint is null ? null : (lastProfilePoint.ResistanceRaw - raw) / raw; LastProfilePoint = lastProfilePoint; - Log10 = new + Log10 = depth == 0 || raw == 0 ? null : new ( depth: depth, raw: raw,