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,