parameters: (calibration_dir, calibration, ws_foc)
docstring: Create output files (.prm for GSAS and .nxs of calibration table) from the algorithms in the specified directory
      :param calibration_dir: The directory to save the files into.
      :param calibration: CalibrationInfo object with details of calibration and grouping
      :param ws_foc: focused ceria workspace
docstring_summary: Create output files (.prm for GSAS and .nxs of calibration table) from the algorithms in the specified directory
      :param calibration_dir: The directory to save the files into.
      :param calibration: CalibrationInfo object with details of calibration and grouping
      :param ws_foc: focused ceria workspace
docstring_tokens: Create output files ( . prm for GSAS and . nxs of calibration table ) from the algorithms in the specified directory : param calibration_dir : The directory to save the files into . : param calibration : CalibrationInfo object with details of calibration and grouping : param ws_foc : focused ceria workspace
function: def create_output_files(calibration_dir, calibration, ws_foc):
      """
      Create output files (.prm for GSAS and .nxs of calibration table) from the algorithms in the specified directory
      :param calibration_dir: The directory to save the files into.
      :param calibration: CalibrationInfo object with details of calibration and grouping
      :param ws_foc: focused ceria workspace
      """
      # create calibration dir of not exist
      if not path.exists(calibration_dir):
          makedirs(calibration_dir)
  
      # save grouping ws if custom or cropped
      if not calibration.group.banks:
          calibration.save_grouping_workspace(calibration_dir)
  
      # save prm file(s)
      prm_filepath = path.join(calibration_dir, calibration.generate_output_file_name())
      write_prm_file(ws_foc, prm_filepath)
      calibration.set_prm_filepath(prm_filepath)
      # save pdcal output as nexus
      filepath, ext = path.splitext(prm_filepath)
      nxs_filepath = filepath + '.nxs'
      mantid.SaveNexus(InputWorkspace=calibration.get_calibration_table(), Filename=nxs_filepath)
  
      # if both banks calibrated save individual banks separately as well
      if calibration.group == GROUP.BOTH:
          # output a separate prm for North and South when both banks included
          for ibank, bank in enumerate(calibration.group.banks):
              # get prm filename for individual banks by passing group enum as argument to generate_output_file_name
              prm_filepath_bank = path.join(calibration_dir,
                                            calibration.generate_output_file_name(GROUP(str(ibank + 1))))
              write_prm_file(ws_foc, prm_filepath_bank, spec_nums=[ibank])
              # copy pdcal output nxs for both banks
              filepath, ext = path.splitext(prm_filepath_bank)
              nxs_filepath_bank = filepath + '.nxs'
              copy2(nxs_filepath, nxs_filepath_bank)
      logger.notice(f"\n\nCalibration files saved to: \"{calibration_dir}\"\n\n")
function_tokens: def create_output_files ( calibration_dir , calibration , ws_foc ) : # create calibration dir of not exist if not path . exists ( calibration_dir ) : makedirs ( calibration_dir ) # save grouping ws if custom or cropped if not calibration . group . banks : calibration . save_grouping_workspace ( calibration_dir ) # save prm file(s) prm_filepath = path . join ( calibration_dir , calibration . generate_output_file_name ( ) ) write_prm_file ( ws_foc , prm_filepath ) calibration . set_prm_filepath ( prm_filepath ) # save pdcal output as nexus filepath , ext = path . splitext ( prm_filepath ) nxs_filepath = filepath + '.nxs' mantid . SaveNexus ( InputWorkspace = calibration . get_calibration_table ( ) , Filename = nxs_filepath ) # if both banks calibrated save individual banks separately as well if calibration . group == GROUP . BOTH : # output a separate prm for North and South when both banks included for ibank , bank in enumerate ( calibration . group . banks ) : # get prm filename for individual banks by passing group enum as argument to generate_output_file_name prm_filepath_bank = path . join ( calibration_dir , calibration . generate_output_file_name ( GROUP ( str ( ibank + 1 ) ) ) ) write_prm_file ( ws_foc , prm_filepath_bank , spec_nums = [ ibank ] ) # copy pdcal output nxs for both banks filepath , ext = path . splitext ( prm_filepath_bank ) nxs_filepath_bank = filepath + '.nxs' copy2 ( nxs_filepath , nxs_filepath_bank ) logger . notice ( f"\n\nCalibration files saved to: \"{calibration_dir}\"\n\n" )