Closed jcapriot closed 1 year ago
Merging #55 (0e56855) into main (3d3e021) will decrease coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #55 +/- ##
==========================================
- Coverage 87.51% 87.50% -0.01%
==========================================
Files 29 28 -1
Lines 2892 2890 -2
==========================================
- Hits 2531 2529 -2
Misses 361 361
Impacted Files | Coverage Δ | |
---|---|---|
geoana/kernels/potential_field_prism.py | 90.38% <100.00%> (+0.48%) |
:arrow_up: |
geoana/__init__.py |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Was a small undetected edge case in the potential field prism kernels. For example, it occurred when
x
andz
were small relative to a negativey
(ory
andz
were small relative to a negativex
). If these values were close to but not exactly 0, the floating point error would causey + r = 0
, thus throwing an error inlog(0)
.The fix for this is to just skip over when this condition (
y + r == 0
) happens by first checking the input to the logarithm. I favor this approach opposed to setting an arbitrary threshold on determining small values of x in order to more accurately compute the prism function when all three values (x
,y
, andz
) are small.