def calibrate_magnitude(instr_mag, airmass, ref_color, 
        zero, extinct, color, instr=None):
    """
    Calibrate instrumental magnitude to a standard photometric system.
    This assumes that ref_color has already been adjusted for any
    non-linearities between the instrumental magnitudes and the 
    photometric system. Otherwise use `~calibrate_magnitude_full`
    """
    if instr is None:
        result = instr_mag-extinct*airmass+zero+color*ref_color
    else:
        result = instr*(instr_mag-extinct*airmass)+zero+color*ref_color
    return result