Skip to content

redplanet.Mag.depth.get_dataset

get_dataset(
    as_dict: bool = False, _extras: bool = False
) -> pandas.core.frame.DataFrame | list[dict]

Get the full magnetic source depth dataset.

Data (0.038 MiB) is provided by Gong and Wieczorek (2021b). The full paper discusses/analyzes the models in detail (Gong & Wieczorek, 2021a).

Parameters:

Name Type Description Default
as_dict bool

If True, return the data as a list of dictionaries. Default is False.

False
_extras bool

Please ignore this, it is used for internal purposes only.

False

Returns:

Type Description
pd.DataFrame | list[dict]

Information about all 412 dipoles. Columns are:

  • lon : float
    • Longitude in range [-180, 180].
  • lat : float
    • Latitude in range [-90, 90].
  • chi_reduced : float
    • "reduced chi^2 value of the best fitting model"
  • cap_radius_km : list[float]
    • "angular radii of the magnetized caps (best-fit, and 1-sigma lower/upper limits)"
  • depth_km : list[float]
    • "magnetization depth (best-fit, and 1-sigma lower/upper limits)"
  • dipole_mment_Am2 : list[float]
    • "square root of the metric NV^2 [in A m^2] (best-fit, and 1-sigma lower/upper limits)"

Note that the 1-sigma lower/upper values are NaN when the minimum reduced chi^2 value of the best fitting model is outside the 1-sigma confidence level of the reduced chi^2 that were obtained from Monte Carlo simulations.

References
  1. Gong, S., & Wieczorek, M. (2021a). Depth of Martian Magnetization From Localized Power Spectrum Analysis. Journal of Geophysical Research: Planets, 126(8), e2020JE006690. https://doi.org/10.1029/2020JE006690
  2. Gong, S., & Wieczorek, M. (2021b). Supplementary Data for Depth of Martian Magnetization From Localized Power Spectrum Analysis [Dataset]. Zenodo. https://doi.org/10.5281/zenodo.4686358
Source code in src/redplanet/Mag/depth/loader.py
@substitute_docstrings
def get_dataset(
    as_dict: bool = False,
    _extras: bool = False,
) -> pd.DataFrame | list[dict]:
    """
    Get the full magnetic source depth dataset.

    Data (0.038 MiB) is provided by {@Gong2021_data.n}. The full paper discusses/analyzes the models in detail ({@Gong2021_paper.p}).


    Parameters
    ----------
    as_dict : bool, optional
        If True, return the data as a list of dictionaries. Default is False.
    _extras : bool, optional
        Please ignore this, it is used for internal purposes only.


    Returns
    -------
    pd.DataFrame | list[dict]
        Information about all 412 dipoles. Columns are:

        - `lon` : float
            - Longitude in range [-180, 180].
        - `lat` : float
            - Latitude in range [-90, 90].
        - `chi_reduced` : float
            - "reduced chi^2 value of the best fitting model"
        - `cap_radius_km` : list[float]
            - "angular radii of the magnetized caps (best-fit, and 1-sigma lower/upper limits)"
        - `depth_km` : list[float]
            - "magnetization depth (best-fit, and 1-sigma lower/upper limits)"
        - `dipole_mment_Am2` : list[float]
            - "square root of the metric N<M^2>V^2 [in A m^2] (best-fit, and 1-sigma lower/upper limits)"

        Note that the 1-sigma lower/upper values are NaN when the minimum reduced chi^2 value of the best fitting model is outside the 1-sigma confidence level of the reduced chi^2 that were obtained from Monte Carlo simulations.
    """
    if _dat_depths is None:
        _load()
    if as_dict:
        return _dat_depths.to_dict(orient='records')
    if _extras:
        return (_dat_depths, _dat_nearest_dipole)
    return _dat_depths