pmag.sundec function gives incorrect results
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia con pmag.py intorno alle righe 4360–4361 e traccia il modo in cui pmag.dosundec() utilizza il delta di pmag.gha() e la latitudine del sito per calcolare sunaz. Riproduci la discrepanza con il notebook di esempio sun_correction.zip fornito, quindi verifica le direzioni delle carote calcolate rispetto ai valori magnetici e ai risultati di super-IAPD.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 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!
Data file(s):
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 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.
- Lingua principale
- Jupyter Notebook
- Stelle
- 81
- Fork
- 45
- Merge medio
- 1g 1h
- PR unite (30g)
- 16
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PmagPy/PmagPy
-
Update - Documentation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
Tutte le issue di PmagPy/PmagPy
Issue simili
-
Add: Arena Sport Premium M3 Apertachannels:add check:passed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
avniproject/avni-webapp#1811 ·
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
ultralytics/ultralytics#26305 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
area:ingestion area:venues bug effort:S level:L3
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mczielinski/ob-analytics#282 ·