def _output_focused_ws(self, processed_spectra, run_details, output_mode=None): """ Takes a list of focused workspace banks and saves them out in an instrument appropriate format. :param processed_spectra: The list of workspace banks to save out :param run_details: The run details associated with this run :param output_mode: Optional - Sets additional saving/grouping behaviour depending on the instrument :return: d-spacing and TOF groups of the processed output workspaces """ if self._inst_settings.save_all: d_spacing_group, tof_group = super(Gem, self)._output_focused_ws(processed_spectra=processed_spectra, run_details=run_details, output_mode=output_mode) else: d_spacing_group, \ tof_group = common_output.split_into_tof_d_spacing_groups(run_details=run_details, processed_spectra=processed_spectra) if self._is_vanadium: return d_spacing_group, tof_group output_paths = self._generate_out_file_paths(run_details=run_details) if "maud_filename" in output_paths: gem_output.save_maud(d_spacing_group, output_paths["maud_filename"]) if "angles_filename" in output_paths: gem_output.save_angles(d_spacing_group, output_paths["angles_filename"]) self._save_gsas_req_files(d_spacing_group, output_paths) return d_spacing_group, tof_group
def _output_focused_ws(self, processed_spectra, run_details, output_mode=None): """ Takes a list of focused workspace banks and saves them out in an instrument appropriate format. :param processed_spectra: The list of workspace banks to save out :param run_details: The run details associated with this run :param output_mode: Optional - Sets additional saving/grouping behaviour depending on the instrument :return: d-spacing and TOF groups of the processed output workspaces """ if self._inst_settings.save_all: d_spacing_group, tof_group = super(Gem, self)._output_focused_ws(processed_spectra=processed_spectra, run_details=run_details, output_mode=output_mode) else: d_spacing_group, \ tof_group = common_output.split_into_tof_d_spacing_groups(run_details=run_details, processed_spectra=processed_spectra) if self._is_vanadium: return d_spacing_group, tof_group output_paths = self._generate_out_file_paths(run_details=run_details) if "maud_filename" in output_paths: gem_output.save_maud(d_spacing_group, output_paths["maud_filename"]) if "angles_filename" in output_paths: gem_output.save_angles(d_spacing_group, output_paths["angles_filename"]) self._save_gsas_req_files(d_spacing_group, output_paths) return d_spacing_group, tof_group
def _output_focused_ws(self, processed_spectra, run_details, output_mode=None): """ Takes a list of focused workspace banks and saves them out in an instrument appropriate format. :param processed_spectra: The list of workspace banks to save out :param run_details: The run details associated with this run :param output_mode: Optional - Sets additional saving/grouping behaviour depending on the instrument :return: d-spacing group of the processed output workspaces """ d_spacing_group, tof_group = common_output.split_into_tof_d_spacing_groups( run_details=run_details, processed_spectra=processed_spectra) output_paths = self._generate_out_file_paths(run_details=run_details) file_ext = run_details.file_extension[ 1:] if run_details.file_extension else "" common_output.save_focused_data( d_spacing_group=d_spacing_group, tof_group=tof_group, output_paths=output_paths, inst_prefix=self._inst_prefix, run_number_string=run_details.output_run_string, file_ext=file_ext) return d_spacing_group, tof_group
def _output_focused_ws(self, processed_spectra, run_details, output_mode=None): """ Takes a list of focused workspace banks and saves them out in an instrument appropriate format. :param processed_spectra: The list of workspace banks to save out :param run_details: The run details associated with this run :param output_mode: Optional - Sets additional saving/grouping behaviour depending on the instrument :return: d-spacing group of the processed output workspaces """ d_spacing_group, tof_group = common_output.split_into_tof_d_spacing_groups(run_details=run_details, processed_spectra=processed_spectra) output_paths = self._generate_out_file_paths(run_details=run_details) file_ext = run_details.file_extension[1:] if run_details.file_extension else "" common_output.save_focused_data(d_spacing_group=d_spacing_group, tof_group=tof_group, output_paths=output_paths, inst_prefix=self._inst_prefix, run_number_string=run_details.output_run_string, file_ext=file_ext) return d_spacing_group, tof_group