def getFlatFieldData(flatFieldFilename, badChannelFilename):
    ''' remove bad channels from flat field raw data file, return a list of bad channel corrected raw data
        arguments: 1. flat field raw data file name
                   2. bad channel file name
    '''
    bad_channel_list = getBadChannelList(badChannelFilename)
    if flatFieldFilename is None:
        return None
    return badChannelCorrection(flatFieldFilename, bad_channel_list)
Пример #2
0
def getFlatFieldData(flatFieldFilename, badChannelFilename):
    ''' remove bad channels from flat field raw data file, return a list of bad channel corrected raw data
        arguments: 1. flat field raw data file name
                   2. bad channel file name
    '''
    bad_channel_list = getBadChannelList(badChannelFilename)
    if flatFieldFilename is None:
        return None
    return badChannelCorrection(flatFieldFilename, bad_channel_list)
 def process(self, rawDataFile, detectorPosition):
     '''
     perform data reduction processes that convert RAW data (channel versus count) to PROCESSED data (angle versus count channel)
     inputs: 1. raw data file to be corrected,
             2. the detector position at which the raw data are collected.
     outputs: dataset which contains a list of tuple (angle, count, error, channel)
     '''
     bad_channel_corrected_data = badChannelCorrection(rawDataFile, getBadChannelList(self.badChannelFile))
     calculate_flat_field_scaling_factors = calculateFlatFieldScalingFactors(getFlatFieldData(self.flatFieldFile, self.badChannelFile))
     flat_field_corrected_data = flatFieldCorrection(bad_channel_corrected_data, calculate_flat_field_scaling_factors)
     data = applyAngularConversion(self.angularCalibrationFile, detectorPosition, flat_field_corrected_data)
     return data
Пример #4
0
 def process(self, rawDataFile, detectorPosition):
     '''
     perform data reduction processes that convert RAW data (channel versus count) to PROCESSED data (angle versus count channel)
     inputs: 1. raw data file to be corrected,
             2. the detector position at which the raw data are collected.
     outputs: dataset which contains a list of tuple (angle, count, error, channel)
     '''
     bad_channel_corrected_data = badChannelCorrection(
         rawDataFile, getBadChannelList(self.badChannelFile))
     calculate_flat_field_scaling_factors = calculateFlatFieldScalingFactors(
         getFlatFieldData(self.flatFieldFile, self.badChannelFile))
     flat_field_corrected_data = flatFieldCorrection(
         bad_channel_corrected_data, calculate_flat_field_scaling_factors)
     data = applyAngularConversion(self.angularCalibrationFile,
                                   detectorPosition,
                                   flat_field_corrected_data)
     return data