import json


def get_mass_calibration(calibration_file, volume):
    """
    This function computes the mass given a calibration curve: mass = a / vol.

    Parameters
    ----------
    calibration_file: str
        filename of the json file with the slope of the calibration curve
    volume: float
        volume of the blob from GC Image

    Returns
    --------
    mass_IS: float
        mass of the compound used as refernece.
    """
    with open(calibration_file) as fp:
        data = json.load(fp)
    slope = float(data["slope"])
    mass_IS = volume / slope
    return mass_IS