Skip to content

redplanet.Mag.sh.get_dataset

get_dataset() -> GriddedData

Get the underlying dataset which is currently loaded.

Returns:

Type Description
GriddedData

Instance of RedPlanet's GriddedData class, which stores all coordinate/data/metadata information and accessing/plotting methods.

Raises:

Type Description
ValueError

If the dataset has not been loaded yet (see the load function for this module).

See Also

redplanet.helper_functions.GriddedData

Source code in src/redplanet/Mag/sh/loader.py
@substitute_docstrings
def get_dataset() -> GriddedData:
    """
    {fulldoc.get_dataset_GriddedData}
    """
    if _dat_mag is None:
        raise ValueError('Bouguer dataset not loaded. Use `redplanet.Mag.sh.load(<model_params>)`.')
    return _dat_mag