brmather / pycurious

Python package for computing the Curie depth from the magnetic anomaly
https://brmather.github.io/pycurious/
GNU Lesser General Public License v3.0
38 stars 17 forks source link

[REVIEW] Unused variables on tanaka1999() #23

Closed santisoler closed 5 years ago

santisoler commented 5 years ago

Part of https://github.com/openjournals/joss-reviews/issues/1544.

There are two unused variables on tanaka1999():

https://github.com/brmather/pycurious/blob/759fc520c22503f0b40b6a63faa4e632dd9f1e88/pycurious/grid.py#L607

https://github.com/brmather/pycurious/blob/759fc520c22503f0b40b6a63faa4e632dd9f1e88/pycurious/grid.py#L623

Are they not necessary or are missing on any following line?

rdelhaye commented 5 years ago

Thank you for noticing these - both are indeed superfluous and removed in commit 377d91b.

The Y2E2sum term I believe was mistakenly created in completeness along with the other terms for computation of the weighted line of best fit.

The S2 term is a rescaling of the power spectrum by the spatial frequency, however, at some point we changed to this rescaling in the equations for the rescaled spectrum itself.