resunet/utils.py
def load_data(arrname, cmbmaps):
    """
    Loads data from a '.npz' file into a dictionary.

    The data is loaded into a dictionary with the array names as the keys and the
    arrays as the values.

    Parameters
    ----------
    arrname : str
        '.npz' file with saved arrays that are named.
    cmbmaps :
        List of CMB maps to retrieve from arrname.

        If used with the ResUNet-CMB data pipeline, format must be '{map letter}_{len or unl}'.
        In the case of phi or kappa: '{tru or rec}_{phi or kappa}'.
        Example list format: ['q_unl', 'e_len', 'unl_e']

        If used for general purposes then cmbmaps is a list of the array names, as strings, in the
        '.npz' file that will be retrieved.

    Returns
    -------
    datadic :
        Dictionary with data from arrname. Key values of saved dictionary are the names
        from cmbmaps list which are the names of the saved arrays. The values in the
        dictionary are the retrieved arrays.
    """

    datadic = {}
    with np.load(arrname) as data:
        for i in cmbmaps:
            datadic[i] = data[i]
    return datadic

    Loads data from a '.npz' file into a dictionary.

    The data is loaded into a dictionary with the array names as the keys and the
    arrays as the values.

    Parameters
    ----------
    arrname : str
        '.npz' file with saved arrays that are named.
    cmbmaps :
        List of CMB maps to retrieve from arrname.

        If used with the ResUNet-CMB data pipeline, format must be '{map letter}_{len or unl}'.
        In the case of phi or kappa: '{tru or rec}_{phi or kappa}'.
        Example list format: ['q_unl', 'e_len', 'unl_e']

        If used for general purposes then cmbmaps is a list of the array names, as strings, in the
        '.npz' file that will be retrieved.

    Returns
    -------
    datadic :
        Dictionary with data from arrname. Key values of saved dictionary are the names
        from cmbmaps list which are the names of the saved arrays. The values in the
        dictionary are the retrieved arrays.
    
Loads data from a '.npz' file into a dictionary.
The data is loaded into a dictionary with the array names as the keys and the
arrays as the values.

Parameters

arrname : str
'.npz' file with saved arrays that are named.
cmbmaps :
List of CMB maps to retrieve from arrname.

If used with the ResUNet-CMB data pipeline, format must be '{map letter}_{len or unl}'.
In the case of phi or kappa: '{tru or rec}_{phi or kappa}'.

If used for general purposes then cmbmaps is a list of the array names, as strings, in the
'.npz' file that will be retrieved.

Returns

datadic :
Dictionary with data from arrname. Key values of saved dictionary are the names
from cmbmaps list which are the names of the saved arrays. The values in the
dictionary are the retrieved arrays.
Loads data from a ' . npz ' file into a dictionary . The data is loaded into a dictionary with the array names as the keys and the arrays as the values . Parameters arrname : str ' . npz ' file with saved arrays that are named . cmbmaps : List of CMB maps to retrieve from arrname . If used with the ResUNet - CMB data pipeline format must be ' { map letter } _ { len or unl } ' . In the case of phi or kappa : ' { tru or rec } _ { phi or kappa } ' . If used for general purposes then cmbmaps is a list of the array names as strings in the ' . npz ' file that will be retrieved . Returns datadic : Dictionary with data from arrname . Key values of saved dictionary are the names from cmbmaps list which are the names of the saved arrays . The values in the dictionary are the retrieved arrays .
def load_data(arrname, cmbmaps):
    datadic = {}
    with np.load(arrname) as data:
        for i in cmbmaps:
            datadic[i] = data[i]
    return datadic
def load_data ( arrname , cmbmaps ) : datadic = { } with np . load ( arrname ) as data : for i in cmbmaps : datadic [ i ] = data [ i ] return datadic
Loads data from a '.npz' file into a dictionary.
Loads data from a ' . npz ' file into a dictionary .
"""
    Loads data from a '.npz' file into a dictionary.

    The data is loaded into a dictionary with the array names as the keys and the
    arrays as the values.

    Parameters
    ----------
    arrname : str
        '.npz' file with saved arrays that are named.
    cmbmaps :
        List of CMB maps to retrieve from arrname.

        If used with the ResUNet-CMB data pipeline, format must be '{map letter}_{len or unl}'.
        In the case of phi or kappa: '{tru or rec}_{phi or kappa}'.
        Example list format: ['q_unl', 'e_len', 'unl_e']

        If used for general purposes then cmbmaps is a list of the array names, as strings, in the
        '.npz' file that will be retrieved.

    Returns
    -------
    datadic :
        Dictionary with data from arrname. Key values of saved dictionary are the names
        from cmbmaps list which are the names of the saved arrays. The values in the
        dictionary are the retrieved arrays.
    """
arrname
cmbmaps