def precalculateVars(paramDict):
    """ Get binning, gain and defect files. """
    bin = 2.0 if paramDict['Mode'] == 'Super-resolution' else 1.0
    gain = '' if paramDict['GainReference'] == 'None' else paramDict[
        'GainReference']
    defect = '' if paramDict['DefectFile'] == 'None' else paramDict[
        'DefectFile']
    return bin, gain, defect
