Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After the discovery of Cesear's SRF bug, I thought it prudent to introduce more SRF checks to catch future bugs like this before they reach EMOD3D. Here are the additional quick checks I've added:
-90 <= lat <= 90
and-180 <= lon <= 180
for all points in the srf.The last check invokes the
.planes
property to which constructs source modellingPlane
objects. ThePlane
constructor checks that source modelling does apply here. This means SRFs meeting the above three criteria, but specifying a group of points that do not form a plane will be rejected.Additionally, I have fixed the SRF magnitude check. This check ensures that the magnitude in the SRF matches the magnitude in the realisation file. This was broken because I wasn't calculating SRF magnitude correctly due to a simple mistake. I have corrected this mistake, and testing the ~100 alpine realisation SRFs generated for Brendon a few weeks ago I now get passes for all of them.