def update_lconfigdataset(self):
        runs_are_compatible = self.runs_are_compatible
        big_table_data = self.parent.big_table_data
        _lconfig = big_table_data[self.row, 2]
        if _lconfig is None:
            _lconfig = LConfigDataset()

        if self.is_working_with_data_column:
            _lconfig.data_full_file_anme = self.list_nexus
            _lconfig.data_sets = self.list_run
            _lconfig.data_wks = self.wks
            _lconfig.data_runs_compatible = runs_are_compatible
        else:
            _lconfig.norm_full_file_anme = self.list_nexus
            _lconfig.norm_sets = self.list_run
            _lconfig.norm_wks = self.wks
            _lconfig.norm_runs_compatible = runs_are_compatible

        big_table_data[self.row, 2] = _lconfig
        self.parent.big_table_data = big_table_data
 def update_lconfigdataset(self):
     runs_are_compatible = self.runs_are_compatible
     big_table_data = self.parent.big_table_data
     _lconfig = big_table_data[self.row, 2]
     if _lconfig is None:
         _lconfig = LConfigDataset()
     
     if self.is_working_with_data_column:
         _lconfig.data_full_file_anme = self.list_nexus
         _lconfig.data_sets = self.list_run
         _lconfig.data_wks = self.wks
         _lconfig.data_runs_compatible = runs_are_compatible
     else:
         _lconfig.norm_full_file_anme = self.list_nexus
         _lconfig.norm_sets = self.list_run
         _lconfig.norm_wks = self.wks
         _lconfig.norm_runs_compatible = runs_are_compatible
         
     big_table_data[self.row, 2] = _lconfig
     self.parent.big_table_data = big_table_data
Exemplo n.º 3
0
    def save_reduction(self, 
                       row = -1,
                       workspace = None):
        big_table_data = self.big_table_data
        _config = big_table_data[row, 2]
        if _config is None:
            _config = LConfigDataset()
        mtd_workspace = mtd[workspace]
        
        _config.proton_charge = float(mtd_workspace.getRun().getProperty('gd_prtn_chrg').value)
        _config.reduce_q_axis = mtd_workspace.readX(0)[:]
        _config.reduce_y_axis = mtd_workspace.readY(0)[:]
        _config.reduce_e_axis = mtd_workspace.readE(0)[:]
        _config.q_axis_for_display = mtd_workspace.readX(0)[:]
        _config.y_axis_for_display = mtd_workspace.readY(0)[:]
        _config.e_axis_for_display = mtd_workspace.readE(0)[:]
#        _config.sf_auto_found_match = mtd_workspace.getRun().getProperty('isSFfound').value
        
        big_table_data[row, 2] = _config
        self.big_table_data = big_table_data
Exemplo n.º 4
0
    def getMetadataObject(self, node):
        iMetadata = LConfigDataset()

        _peak_min = self.getNodeValue(node, 'from_peak_pixels')
        _peak_max = self.getNodeValue(node, 'to_peak_pixels')
        iMetadata.data_peak = [_peak_min, _peak_max]

        _back_min = self.getNodeValue(node, 'back_roi1_from')
        _back_max = self.getNodeValue(node, 'back_roi1_to')
        iMetadata.data_back = [_back_min, _back_max]

        _low_res_min = self.getNodeValue(node, 'x_min_pixel')
        _low_res_max = self.getNodeValue(node, 'x_max_pixel')
        iMetadata.data_low_res = [_low_res_min, _low_res_max]

        _back_flag = self.getNodeValue(node, 'background_flag')
        iMetadata.data_back_flag = _back_flag

        _low_res_flag = self.getNodeValue(node, 'x_range_flag')
        iMetadata.data_low_res_flag = _low_res_flag

        _clocking_min = self.getNodeValue(node, 'clocking_from')
        _clocking_max = self.getNodeValue(node, 'clocking_to')
        iMetadata.data_clocking = [_clocking_min, _clocking_max]

        _tof_min = self.getNodeValue(node, 'from_tof_range')
        _tof_max = self.getNodeValue(node, 'to_tof_range')
        if float(_tof_min) < 500:  # ms
            _tof_min = str(float(_tof_min) * 1000)
            _tof_max = str(float(_tof_max) * 1000)
        iMetadata.tof_range = [_tof_min, _tof_max]

        _q_min = self.getNodeValue(node, 'from_q_range')
        _q_max = self.getNodeValue(node, 'to_q_range')
        iMetadata.q_range = [_q_min, _q_max]

        _lambda_min = self.getNodeValue(node, 'from_lambda_range')
        _lambda_max = self.getNodeValue(node, 'to_lambda_range')
        iMetadata.lambda_range = [_lambda_min, _lambda_max]

        iMetadata.tof_units = 'micros'

        _data_sets = self.getNodeValue(node, 'data_sets')
        _data_sets = _data_sets.split(',')
        iMetadata.data_sets = [str(x) for x in _data_sets]

        _tof_auto = self.getNodeValue(node, 'tof_range_flag')
        iMetadata.tof_auto_flag = _tof_auto

        _norm_flag = self.getNodeValue(node, 'norm_flag')
        iMetadata.norm_flag = _norm_flag

        _peak_min = self.getNodeValue(node, 'norm_from_peak_pixels')
        _peak_max = self.getNodeValue(node, 'norm_to_peak_pixels')
        iMetadata.norm_peak = [_peak_min, _peak_max]

        _back_min = self.getNodeValue(node, 'norm_from_back_pixels')
        _back_max = self.getNodeValue(node, 'norm_to_back_pixels')
        iMetadata.norm_back = [_back_min, _back_max]

        _norm_sets = self.getNodeValue(node, 'norm_dataset')
        _norm_sets = _norm_sets.split(',')
        iMetadata.norm_sets = [str(x) for x in _norm_sets]

        _low_res_min = self.getNodeValue(node, 'norm_x_min')
        _low_res_max = self.getNodeValue(node, 'norm_x_max')
        iMetadata.norm_low_res = [_low_res_min, _low_res_max]

        _back_flag = self.getNodeValue(node, 'norm_background_flag')
        iMetadata.norm_back_flag = _back_flag

        _low_res_flag = self.getNodeValue(node, 'norm_x_range_flag')
        iMetadata.norm_low_res_flag = _low_res_flag

        try:
            _data_full_file_name = self.getNodeValue(node,
                                                     'data_full_file_name')
            _data_full_file_name = _data_full_file_name.split(',')
            _data_full_file_name = [str(x) for x in _data_full_file_name]
        except:
            _data_full_file_name = ['']
        iMetadata.data_full_file_name = _data_full_file_name

        try:
            _norm_full_file_name = self.getNodeValue(node,
                                                     'norm_full_file_name')
            _norm_full_file_name = _norm_full_file_name.split(',')
            _norm_full_fil_name = [str(x) for x in _norm_full_file_name]
        except:
            _norm_full_file_name = ['']
        iMetadata.norm_full_file_name = _norm_full_file_name

        return iMetadata
Exemplo n.º 5
0
	def getMetadataObject(parent, node):
		iMetadata = LConfigDataset()
		
		_peak_min = parent.getNodeValue(node, 'from_peak_pixels')
		_peak_max = parent.getNodeValue(node, 'to_peak_pixels')
		iMetadata.data_peak = [_peak_min, _peak_max]
		
		_back_min = parent.getNodeValue(node, 'back_roi1_from')
		_back_max = parent.getNodeValue(node, 'back_roi1_to')
		iMetadata.data_back = [_back_min, _back_max]
		
		_low_res_min = parent.getNodeValue(node, 'x_min_pixel')
		_low_res_max = parent.getNodeValue(node, 'x_max_pixel')
		iMetadata.data_low_res = [_low_res_min, _low_res_max]
		
		_back_flag = parent.getNodeValue(node, 'background_flag')
		iMetadata.data_back_flag = _back_flag
		
		_low_res_flag = parent.getNodeValue(node, 'x_range_flag')
		iMetadata.data_low_res_flag = _low_res_flag
		
		_clocking_min = parent.getNodeValue(node, 'clocking_from')
		_clocking_max = parent.getNodeValue(node, 'clocking_to')
		iMetadata.data_clocking = [_clocking_min, _clocking_max]
		
		_tof_min = parent.getNodeValue(node, 'from_tof_range')
		_tof_max = parent.getNodeValue(node, 'to_tof_range')
		if float(_tof_min) < 500:  # ms
			_tof_min = str(float(_tof_min) * 1000)
			_tof_max = str(float(_tof_max) * 1000)
		iMetadata.tof_range = [_tof_min, _tof_max]
		
		_q_min = parent.getNodeValue(node, 'from_q_range')
		_q_max = parent.getNodeValue(node, 'to_q_range')
		iMetadata.q_range = [_q_min, _q_max]
		
		_lambda_min = parent.getNodeValue(node, 'from_lambda_range')
		_lambda_max = parent.getNodeValue(node, 'to_lambda_range')
		iMetadata.lambda_range = [_lambda_min, _lambda_max]
		
		iMetadata.tof_units = 'micros'
		
		_data_sets = parent.getNodeValue(node, 'data_sets')
		_data_sets = _data_sets.split(',')
		iMetadata.data_sets = [str(x) for x in _data_sets]
		
		_tof_auto = parent.getNodeValue(node, 'tof_range_flag')
		iMetadata.tof_auto_flag = _tof_auto
		
		_norm_flag = parent.getNodeValue(node, 'norm_flag')
		iMetadata.norm_flag = _norm_flag
		
		_peak_min = parent.getNodeValue(node, 'norm_from_peak_pixels')
		_peak_max = parent.getNodeValue(node, 'norm_to_peak_pixels')
		iMetadata.norm_peak = [_peak_min, _peak_max]
		
		_back_min = parent.getNodeValue(node, 'norm_from_back_pixels')
		_back_max = parent.getNodeValue(node, 'norm_to_back_pixels')
		iMetadata.norm_back = [_back_min, _back_max]
		
		_norm_sets = parent.getNodeValue(node, 'norm_dataset')
		_norm_sets = _norm_sets.split(',')
		iMetadata.norm_sets = [str(x) for x in _norm_sets]
	    
		_low_res_min = parent.getNodeValue(node, 'norm_x_min')
		_low_res_max = parent.getNodeValue(node, 'norm_x_max')
		iMetadata.norm_low_res = [_low_res_min, _low_res_max]
	    
		_back_flag = parent.getNodeValue(node, 'norm_background_flag')
		iMetadata.norm_back_flag = _back_flag
		
		_low_res_flag = parent.getNodeValue(node, 'norm_x_range_flag')
		iMetadata.norm_low_res_flag = _low_res_flag
		
		try:
			_data_full_file_name = parent.getNodeValue(node, 'data_full_file_name')
			_data_full_file_name = _data_full_file_name.split(',')
			_data_full_file_name = [str(x) for x in _data_full_file_name]
		except:
			_data_full_file_name = ['']
		iMetadata.data_full_file_name = _data_full_file_name
			
		try:
			_norm_full_file_name = parent.getNodeValue(node, 'norm_full_file_name')
			_norm_full_file_name = _norm_full_file_name.split(',')
			_norm_full_fil_name = [str(x) for x in _norm_full_file_name]
		except:
			_norm_full_file_name = ['']
		iMetadata.norm_full_file_name = _norm_full_file_name
	    
		return iMetadata
Exemplo n.º 6
0
    def save_reduction(self, row=-1, workspace=None):

        big_table_data = self.big_table_data
        _config = big_table_data[row, 2]
        if _config is None:
            _config = LConfigDataset()
        mtd_workspace = mtd[workspace]

        _config.wks = workspace
        _config.proton_charge = float(
            mtd_workspace.getRun().getProperty('gd_prtn_chrg').value)
        _config.reduce_q_axis = mtd_workspace.readX(0)[:]
        _config.reduce_y_axis = mtd_workspace.readY(0)[:]
        _config.reduce_e_axis = mtd_workspace.readE(0)[:]
        _config.q_axis_for_display = mtd_workspace.readX(0)[:]
        _config.y_axis_for_display = mtd_workspace.readY(0)[:]
        _config.e_axis_for_display = mtd_workspace.readE(0)[:]
        try:
            _config.sf_auto_found_match = mtd_workspace.getRun().getProperty(
                'isSFfound').value
            _config.sf_clocking = float(
                mtd_workspace.getRun().getProperty('primary_fraction').value)
            _config.is_sf_clocking_used = True
        except:
            pass
        big_table_data[row, 2] = _config
        self.big_table_data = big_table_data