def show_all_pairs(self): self.calculate_all_pairs() for run in self._data_context.current_runs: for pair_name in self._group_pair_context.pair_names: run_as_string = run_list_to_string(run) name = get_pair_data_workspace_name( self, pair_name, run_as_string, rebin=False) directory = get_base_data_directory( self, run_as_string) self.group_pair_context[ pair_name].show_raw(run, directory + name) if self._do_rebin(): name = get_pair_data_workspace_name( self, pair_name, run_as_string, rebin=True) self.group_pair_context[ pair_name].show_rebin(run, directory + name)
def show_all_pairs(self): self.calculate_all_pairs() for run in self._data_context.current_runs: for pair_name in self._group_pair_context.pair_names: run_as_string = run_list_to_string(run) name = get_pair_data_workspace_name(self, pair_name, run_as_string, rebin=False) directory = get_base_data_directory(self, run_as_string) + get_pair_data_directory(self, run_as_string) self.group_pair_context[pair_name].show_raw(run, directory + name) if self._do_rebin(): name = get_pair_data_workspace_name(self, pair_name, run_as_string, rebin=True) self.group_pair_context[pair_name].show_rebin(run, directory + name)
def calculate_pair(self, pair_name, run, rebin=False): run_as_string = run_list_to_string(run) name = get_pair_data_workspace_name(self, pair_name, run_as_string, rebin=rebin) return calculate_pair_data(self, pair_name, run, rebin, name)
def getWorkspaceNames(self, use_raw): pair_names = list(self.context.group_pair_context.pair_names) group_names = list(self.context.group_pair_context.group_names) run_numbers = self.context.data_context.current_runs final_options = [] for run in run_numbers: final_options += [ wsName.get_raw_data_workspace_name(self.context, run_list_to_string(run), period=str(period + 1)) + " (PhaseQuad)" for period in range(self.context.data_context.num_periods(run)) ] for name in pair_names: final_options.append( wsName.get_pair_data_workspace_name( self.context, str(name), run_list_to_string(run), not use_raw)) for group_name in group_names: final_options.append( wsName.get_group_asymmetry_name(self.context, str(group_name), run_list_to_string(run), not use_raw)) return final_options
def getWorkspaceNames(self): pair_names = list(self.context.pair_names) run_numbers = self.context.current_runs final_options = [] for run in run_numbers: final_options.append(self.context.instrument + str(run[0]) + " (PhaseQuad)") for name in pair_names: final_options.append( wsName.get_pair_data_workspace_name( self.context, str(name), str(run[0]))) return final_options
def get_workspace_names_for_FFT_analysis(self, use_raw=True): pair_names = list(self.group_pair_context.pair_names) group_names = list(self.group_pair_context.group_names) run_numbers = self.data_context.current_runs workspace_options = [] for run in run_numbers: workspace_options += self.phase_context.get_phase_quad(self.data_context.instrument, run_list_to_string(run)) for name in pair_names: workspace_options.append( wsName.get_pair_data_workspace_name(self, str(name), run_list_to_string(run), not use_raw)) for group_name in group_names: workspace_options.append( wsName.get_group_asymmetry_name(self, str(group_name), run_list_to_string(run), not use_raw)) return workspace_options
def getWorkspaceNames(self, use_raw): pair_names = list(self.context.group_pair_context.pair_names) group_names = list(self.context.group_pair_context.group_names) run_numbers = self.context.data_context.current_runs final_options = [] for run in run_numbers: final_options += [ wsName.get_raw_data_workspace_name(self.context, run_list_to_string(run), period=str(period + 1)) + " (PhaseQuad)" for period in range(self.context.data_context.num_periods(run))] for name in pair_names: final_options.append( wsName.get_pair_data_workspace_name(self.context, str(name), run_list_to_string(run), not use_raw)) for group_name in group_names: final_options.append( wsName.get_group_asymmetry_name(self.context, str(group_name), run_list_to_string(run), not use_raw)) return final_options
def get_workspace_names_for_FFT_analysis(self, use_raw=True): pair_names = list(self.group_pair_context.pair_names) group_names = list(self.group_pair_context.group_names) run_numbers = self.data_context.current_runs workspace_options = [] for run in run_numbers: workspace_options += self.phase_context.get_phase_quad(self.data_context.instrument, run_list_to_string(run)) for name in pair_names: workspace_options.append( wsName.get_pair_data_workspace_name(self, str(name), run_list_to_string(run), not use_raw)) for group_name in group_names: workspace_options.append( wsName.get_group_asymmetry_name(self, str(group_name), run_list_to_string(run), not use_raw)) return workspace_options
def show_pair_data(self, pair_name, show=True, rebin=False): for run in self.current_runs: run_as_string = run_list_to_string(run) name = get_pair_data_workspace_name(self, pair_name, run_as_string, rebin) directory = get_base_data_directory( self, run_as_string) + get_pair_data_directory( self, run_as_string) pair_workspace = calculate_pair_data(self, pair_name, run, rebin) if not rebin: self._pairs[pair_name].workspace[str( run)] = MuonWorkspaceWrapper(pair_workspace) if show: self._pairs[pair_name].workspace[str(run)].show(directory + name) else: self._pairs[pair_name].workspace_rebin[str( run)] = MuonWorkspaceWrapper(pair_workspace) if show: self._pairs[pair_name].workspace_rebin[str(run)].show( directory + name)