def get_mult_fact(data_model, qid, ivar=False):
    """Get a map calibration factor depending on the array and 
    map type.

    Parameters
    ----------
    data_model : soapack.DataModel
         DataModel instance to help load raw products
    qid : str
        Map identification string.
    ivar : bool, optional
        If True, load the factor for the inverse-variance map for the
        qid and split. If False, load the factor for the source-free map
        for the same, by default False.

    Returns
    -------
    float
        Calibration factor.
    """
    if ivar:
        return 1/data_model.get_gain(qid)**2
    else:
        return data_model.get_gain(qid)