compareMM_PM module
- compareMM_PM.GetxyzrFromData(data)
- compareMM_PM.compareMM_PM(nside=64, ghVal=100000.0, atol=1e-08, rtol=1e-05, PLOT_DIFFS=True, PLOT_ONLY_SIGNIF=False)
Compare multipole magnetic field calculations by MoonMag and PlanetMag for the same magnetic moments and at the same points.
To compare outputs:
Run print_healpix_locs.py to print a text file of HEALpix locations on a sphere
Run PlanetMag/OutputHEALpixTo_n10.m using Matlab. Requires healpix_locs.txt, expected to be at ~/MoonMag/outData/healpix_locs.txt
Run this script. Requires output data from PlanetMag, expected to be at ~/PlanetMag/out/pureHarmMap_n##m##x.mat, where ## are harmonic indices and x is g or h.
- Parameters:
nside (int, default=2**6) – Resolution of surface for comparison. 12 * nside**2 is the total number of pixels. Must match the nside value used in print_healpics_locs.
ghVal (float, default=1.0*1e5) – Strength of magnetic moments to use in comparison in nT. Must match ghVal from PlanetMag printout script (times 10^5 to convert from G to nT).
atol (float, default=1e-8) – Absolute tolerance to use in comparisons with np.isclose()
rtol (float, default=1e-5) – Relative tolerance to use in comparisons with np.isclose()
PLOT_DIFFS (bool, default=True) – Whether to generate map figures showing differences
PLOT_ONLY_SIGNIF (bool, default=False) – Whether to limit printed maps to those harmonics identified as differing