Skip to content
Snippets Groups Projects
LoadFullprofResolutionTest.h 46 KiB
Newer Older
      ofile << "!           Sig-2       Sig-1       Sig-0                      "
               "                \n";
      ofile << "SIGMA     514.546      0.00044      0.355                      "
               "                \n";
      ofile << "!           Gam-2       Gam-1       Gam-0                      "
               "                \n";
      ofile << "GAMMA       0.000       0.000       0.000                      "
               "                \n";
      ofile << "!         alph0       beta0       alph1       beta1            "
               "                \n";
      ofile << "ALFBE    0.000008    6.251096    0.000000    0.000000          "
               "                \n";
      ofile << "!         alph0t      beta0t      alph1t      beta1t           "
               "                \n";
      ofile << "ALFBT   0.010156   85.918922    0.000000    0.000000           "
               "                \n";
      ofile << "END                                                            "
               "                \n";
      ofile << "! ----------------------------------------------  Bank 3  CWL "
               "=   0.5339A      \n";
      ofile << "!  Type of profile function: back-to-back exponentials * "
               "pseudo-Voigt          \n";
      ofile << "NPROF 10                                                       "
               "                \n";
      ofile << "!       Tof-min(us)    step      Tof-max(us)                   "
               "                \n";
      ofile << "TOFRG   5000.2300      4.0002  51000.0000                      "
               "                \n";
      ofile << "!          Zero    Dtt1                                        "
               "                \n";
      ofile << "ZD2TOF     -1.00   22580.59157                                 "
               "                \n";
      ofile << "!          Zerot   Dtt1t         Dtt2t    x-cross Width        "
               "                \n";
      ofile << "ZD2TOT  933.50214   22275.21084     1.0290  0.0000002  5.0957  "
               "                \n";
      ofile << "!     TOF-TWOTH of the bank                                    "
               "                \n";
      ofile << "TWOTH     90.00                                                "
               "                \n";
      ofile << "!           Sig-2       Sig-1       Sig-0                      "
               "                \n";
      ofile << "SIGMA     514.546      0.00044      0.355                      "
               "                \n";
      ofile << "!           Gam-2       Gam-1       Gam-0                      "
               "                \n";
      ofile << "GAMMA       0.000       0.000       0.000                      "
               "                \n";
      ofile << "!         alph0       beta0       alph1       beta1            "
               "                \n";
      ofile << "ALFBE    0.000008    7.251096    0.000000    0.000000          "
               "                \n";
      ofile << "!         alph0t      beta0t      alph1t      beta1t           "
               "                \n";
      ofile << "ALFBT   0.010156   85.918922    0.000000    0.000000           "
               "                \n";
      ofile << "END                                                            "
               "                \n";
      ofile << "! ----------------------------------------------  Bank 4  CWL "
               "=   1.3330A\n";
      ofile << "!  Type of profile function: back-to-back exponentials * "
               "pseudo-Voigt    \n";
      ofile << "NPROF 10                                                       "
               "          \n";
      ofile << "!       Tof-min(us)    step      Tof-max(us)                   "
               "          \n";
      ofile << "TOFRG   9800.0000      5.0000   86000.0000                     "
               "          \n";
      ofile << "!       Zero   Dtt1                                            "
               "          \n";
      ofile << "ZD2TOF     0.00  22586.10156                                   "
               "          \n";
      ofile << "!       Zerot    Dtt1t       Dtt2t    x-cross    Width         "
               "          \n";
      ofile << "ZD2TOT -42.76068   22622.76953    0.30    0.3560    2.4135     "
               "          \n";
      ofile << "!     TOF-TWOTH of the bank                                    "
               "          \n";
      ofile << "TWOTH    90.000                                                "
               "          \n";
      ofile << "!       Sig-2     Sig-1     Sig-0                              "
               "          \n";
      ofile << "SIGMA  72.366    10.000     0.000                              "
               "          \n";
      ofile << "!       Gam-2     Gam-1     Gam-0                              "
               "          \n";
      ofile << "GAMMA     0.000     2.742      0.000                           "
               "          \n";
      ofile << "!          alph0       beta0       alph1       beta1           "
               "          \n";
      ofile << "ALFBE        1.500      3.012      5.502      9.639            "
               "          \n";
      ofile << "!         alph0t      beta0t      alph1t      beta1t           "
               "          \n";
      ofile << "ALFBT       86.059     96.487     13.445      3.435            "
               "          \n";
      throw runtime_error("Unable to open file to write.");
    }

    return;
  }
  //----------------------------------------------------------------------------------------------
  /** Generate a 1 bank .irf file for BackToBackExponential fitting function
  */
  void generate1BankIrfBBXFile(string filename) {
    ofstream ofile;
    ofile.open(filename.c_str());

    if (ofile.is_open()) {
      ofile << "  Instrumental resolution function for HRPD/ISIS L. Chapon "
               "12/2003  ireso: 5 \n";
      ofile << "! To be used with function NPROF=9 in FullProf (Res=5)         "
               "              \n";
      ofile << "! ----------------------------------------------------- Bank 2 "
               "              \n";
      ofile << "!  Type of profile function: back-to-back exponentials * "
               "pseudo-Voigt        \n";
      ofile << "NPROF 9                                                        "
               "              \n";
      ofile << "!       Tof-min(us)    step      Tof-max(us)                   "
               "              \n";
      ofile << "TOFRG   15051.898669      7.85    209446.601531                "
               "              \n";
      ofile << "!        Dtt1          Dtt2        Zero                        "
               "              \n";
      ofile << "D2TOF     34841.316           5.950         -5.055             "
               "              \n";
      ofile << "!     TOF-TWOTH of the bank                                    "
               "              \n";
      ofile << "TWOTH     89.58                                                "
               "              \n";
      ofile << "!           Sig-2       Sig-1       Sig-0                      "
               "              \n";
      ofile << "SIGMA     287.174     3865.810     0.005                       "
               "              \n";
      ofile << "!           Gam-2       Gam-1       Gam-0                      "
               "              \n";
      ofile << "GAMMA     0.000       4.991        0.005                       "
               "              \n";
      ofile << "!         alph0       beta0       alph1       beta1            "
               "              \n";
      ofile << "ALFBE    0.000077    0.024760    0.096713    0.006268          "
               "              \n";
      ofile << "END                                                            "
               "              \n";
      throw runtime_error("Unable to open file to write.");
    }

    return;
  }

  /* Return the number of rows the table must have
  */
  int getExpectedNumberOfRows() {
    return 29; // Change this value if you add or remove any rows from the
               // OutputTableWorkspace
private:
  std::string wsName; // For Workspace property
};

#endif /* MANTID_DATAHANDLING_LOADFULLPROFRESOLUTIONTEST_H_ */