utils0.median_abs_deviation(): divide by scale instead of multiply#946
utils0.median_abs_deviation(): divide by scale instead of multiply#946yunjunz merged 3 commits intoinsarlab:mainfrom
utils0.median_abs_deviation(): divide by scale instead of multiply#946Conversation
"scale" parameter in median_abs_deviation function should be a divisor for MAD calculation, namely np.nanmedian(...) / scale, in order to derive a cutoff value comparable to the 1-2-3-sigma rule. See the discussion on user forum: https://groups.google.com/d/msgid/mintpy/4db4caa8-fb82-403a-a5b4-abef9310cdddn%40googlegroups.com?utm_medium=email&utm_source=footer.
|
💖 Thanks for opening this pull request! Please check out our contributing guidelines. 💖 |
utils0.median_abs_deviation(): divide by scale instead of multiply
yunjunz
left a comment
There was a problem hiding this comment.
Thank you @yi-chingchen for identifying the bug and fixing it! I updated the description in the comment accordingly.
|
The circle CI test fail is due to a bug in the scipy 1.10.0, and will be fixed in the future scipy 1.10.1 release (scipy/scipy#17740). I will go ahead and merge this PR. |
|
🎉 🎉 🎉 Congrats on merging your first pull request! We here at behaviorbot are proud of you! 🎉 🎉 🎉 |
Description of proposed changes
"scale" parameter in median_abs_deviation function should be a divisor for MAD calculation, namely np.nanmedian(...) / scale, in order to derive a cutoff value comparable to the 1-2-3-sigma rule.
See the discussion on user forum: https://groups.google.com/d/msgid/mintpy/4db4caa8-fb82-403a-a5b4-abef9310cdddn%40googlegroups.com?utm_medium=email&utm_source=footer.
The description of the function, however, hasn't been modified accordingly.
Reminders