You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
The calculated core strike values from shadow angles are incorrect. They are consistently off from the magnetic strike values which are already corrected. Checking with the super-IAPD program confirms the magnetic core strike values and the calculated core strikes using sun compass values should agree.
I find that the issue with the dosundec function happens when the delta parameter from the Greenwich hour angle calculation function pmag.gha() is really close to the latitude of the paleomagnetic site. Rounding issues or integer casting of the latitude from user inputs will cause the conditional argument if delta < lat in pmag.dosundec() to jump between True and False values, causing the resultant sunaz parameter to have wrong values.
What I expected to happen: @ltauxe Lisa, I am not very familiar with this function, and I am confused about why there is this line that compares the greenwich hour angle with the site latitude. It seems to me that line 4360 and 4361 are not necessary and are causing the issues. My light testing with some example data are shown below in the screenshot and in the example notebook in the zip file. It seems to me that removing those lines fixes the issue. Could you help explain what those lines do? Thanks!
This screenshot shows the true magnetic core strike in the first column, the calculated core strike from sun angle using my modified dosundec() function that removed line 4360 and 4361 in pmag.py in the second column, and the calculated core strike from sun angle using the pmag.dosundec() without modifications in the third column. You can see that the values in the third column are all off by ~15 degrees from the true values.
PmagPy version:
Developer version, main branch, synced to the latest commits.
The text was updated successfully, but these errors were encountered:
What command was run:
pmag.dosundec()
What happened:
The calculated core strike values from shadow angles are incorrect. They are consistently off from the magnetic strike values which are already corrected. Checking with the super-IAPD program confirms the magnetic core strike values and the calculated core strikes using sun compass values should agree.
I find that the issue with the
dosundec
function happens when thedelta
parameter from the Greenwich hour angle calculation functionpmag.gha()
is really close to the latitude of the paleomagnetic site. Rounding issues or integer casting of the latitude from user inputs will cause the conditional argumentif delta < lat
inpmag.dosundec()
to jump between True and False values, causing the resultantsunaz
parameter to have wrong values.What I expected to happen:
@ltauxe Lisa, I am not very familiar with this function, and I am confused about why there is this line that compares the greenwich hour angle with the site latitude. It seems to me that line 4360 and 4361 are not necessary and are causing the issues. My light testing with some example data are shown below in the screenshot and in the example notebook in the zip file. It seems to me that removing those lines fixes the issue. Could you help explain what those lines do? Thanks!
Data file(s):
sun_correction.zip
Screenshot(s):
This screenshot shows the true magnetic core strike in the first column, the calculated core strike from sun angle using my modified
dosundec()
function that removed line 4360 and 4361 in pmag.py in the second column, and the calculated core strike from sun angle using thepmag.dosundec()
without modifications in the third column. You can see that the values in the third column are all off by ~15 degrees from the true values.PmagPy version:
Developer version, main branch, synced to the latest commits.
The text was updated successfully, but these errors were encountered: