diff --git a/ChangeLog b/ChangeLog index 35adc455..909699b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ changes since 0.13.0 =================================== +NEW 2015-02-19 added a first preliminary user interface for musrFT within musredit. NEW 2015-02-16 changed the data export handling from musrview. It is now more main line and follows the implementation of musrFT. NEW 2015-02-13 first implementation of a standalone Fourier transform/plotter: diff --git a/doc/html/user/MUSR/BmwLibs.html b/doc/html/user/MUSR/BmwLibs.html index 492bc7f1..3ee693e6 100644 --- a/doc/html/user/MUSR/BmwLibs.html +++ b/doc/html/user/MUSR/BmwLibs.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {
Print version

- - - + + +

@@ -144,7 +144,7 @@ pre {
Topic revision: r5 - 10 Jul 2011, wojek
@@ -168,7 +168,7 @@ pre {
  • newtopic Create New Topic
  • index Show All Topics
  • searchtopic Search in Topics -
  • changes Recent Changes +
  • changes Recent Changes
  • notify Define Notifications
  • @@ -181,12 +181,11 @@ pre {

    -

    @@ -195,7 +194,7 @@ pre { - +

    diff --git a/doc/html/user/MUSR/CiteMusrFit.html b/doc/html/user/MUSR/CiteMusrFit.html index fe86b5fd..6db84c60 100644 --- a/doc/html/user/MUSR/CiteMusrFit.html +++ b/doc/html/user/MUSR/CiteMusrFit.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {
    Print version

    - - - + + +

    @@ -142,7 +142,7 @@ Since quite some effort is going into the development and maintenance of the
    Topic revision: r2 - 19 Jun 2012, AndreasSuter
    @@ -166,7 +166,7 @@ Since quite some effort is going into the development and maintenance of the newtopic Create New Topic
  • index Show All Topics
  • searchtopic Search in Topics -
  • changes Recent Changes +
  • changes Recent Changes
  • notify Define Notifications
  • @@ -179,12 +179,11 @@ Since quite some effort is going into the development and maintenance of the

    -

    @@ -193,7 +192,7 @@ Since quite some effort is going into the development and maintenance of the - +

    diff --git a/doc/html/user/MUSR/LibFitPofB.html b/doc/html/user/MUSR/LibFitPofB.html index 734a904d..66a1108f 100644 --- a/doc/html/user/MUSR/LibFitPofB.html +++ b/doc/html/user/MUSR/LibFitPofB.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

    - - - + + +

    @@ -420,7 +420,7 @@ An example XML file looks as follows:
    Topic revision: r16 - 10 Jul 2011, wojek
    @@ -444,7 +444,7 @@ An example XML file looks as follows:
  • newtopic Create New Topic
  • index Show All Topics
  • searchtopic Search in Topics -
  • changes Recent Changes +
  • changes Recent Changes
  • notify Define Notifications
  • @@ -457,12 +457,11 @@ An example XML file looks as follows:

      -
    • +

    -

    @@ -471,7 +470,7 @@ An example XML file looks as follows: - +

    diff --git a/doc/html/user/MUSR/LibZFRelaxation.html b/doc/html/user/MUSR/LibZFRelaxation.html index e0e3358c..6ee6e133 100644 --- a/doc/html/user/MUSR/LibZFRelaxation.html +++ b/doc/html/user/MUSR/LibZFRelaxation.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

    - - - + + +

    @@ -225,7 +225,7 @@ The parameters are:
    Topic revision: r2 - 10 Jul 2011, wojek
    @@ -249,7 +249,7 @@ The parameters are:
    1. newtopic Create New Topic
    2. index Show All Topics
    3. searchtopic Search in Topics -
    4. changes Recent Changes +
    5. changes Recent Changes
    6. notify Define Notifications
    7. @@ -262,12 +262,11 @@ The parameters are:

          -
        • +

        -

        @@ -276,7 +275,7 @@ The parameters are:
          - +

          diff --git a/doc/html/user/MUSR/Msr2Data.html b/doc/html/user/MUSR/Msr2Data.html index d4ace4e6..d290fd3a 100644 --- a/doc/html/user/MUSR/Msr2Data.html +++ b/doc/html/user/MUSR/Msr2Data.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

          - - - + + +

          @@ -349,7 +349,7 @@ For reporting bugs or requesting new features and improvements please use the - @@ -395,7 +395,7 @@ For reporting bugs or requesting new features and improvements please use the newtopic Create New Topic
        1. index Show All Topics
        2. searchtopic Search in Topics -
        3. changes Recent Changes +
        4. changes Recent Changes
        5. notify Define Notifications
        6. @@ -408,12 +408,11 @@ For reporting bugs or requesting new features and improvements please use the Paul Scherrer Institut

            -
          • +

          -

          @@ -422,7 +421,7 @@ For reporting bugs or requesting new features and improvements please use the - +

          diff --git a/doc/html/user/MUSR/MusrFit.html b/doc/html/user/MUSR/MusrFit.html index 42e934d2..395627be 100644 --- a/doc/html/user/MUSR/MusrFit.html +++ b/doc/html/user/MUSR/MusrFit.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

          - - - + + +

          @@ -124,11 +124,12 @@ pre {
        7. 2 Available Executables, Configuration Files and their Basic Usage
        8. 3 Auxiliary Programs
        9. 4 Description of the msr File Format
            @@ -210,7 +211,7 @@ In the menu bar the Musrfit menu can be found. From there some
            Fourier
            performs the Fourier transformation of the selected data and shows the result
            Difference
            shows the difference between the selected data and the fit
            Average
            toggle between the current view and the averaged data view. Useful if the averaged Fourier power spectrum of lots of detectors shall be shown. -
            Save Data
            saves the selected data in a simple multi-column ASCII file +
            Export Data
            saves the selected data in a simple multi-column ASCII file

            Additionally, some functions can be accessed using key-shortcuts:
            @@ -221,8 +222,56 @@ Additionally, some functions can be accessed using key-shortcuts:
            u
            reset the plotting range to the area given in the msr file ("unzoom")

            + +

            2.3 musrFT NEW

            +musrFT is an interactive graphical user interface for the presentation of Fourier transforms of raw μSR histograms. It's purpose is to get a quick overview for high TF-field data, as found e.g. at the HAL-9500 instrument at PSI. It Fourier transforms the raw histogram data, i.e. N(t) rather than A(t), and hence shows the lifetime contribution of the muon. This is no problem for large enough fields, but will be a severe problem at very low fields. musrFT is still in its early stage and should be considered a beta-version. +

            +If called from within a shell it accepts the following parameters:
            +
            <msr_files>
            msr-file name(s). These msr-files are used for the Fourier transform. It can be a list of msr-files, e.g. musrFT 3110.msr 3111.msr +
            -df, --data-file <data-file>
            This allows to feed only μSR data file(s) to perform the Fourier transform. Since the extended <msr-file> information are missing, they will need to be provided by to options, or musrFT tries to guess, based on musrfit_startup.xml settings. +
            --help
            display a help and exit +
            --version
            output version information and exit +
            -g, --graphic-format <graphic-format-extension>
            will produce a graphic-output-file without starting a root session. The name is based either on the <msr-file> or the <data-file>, e.g. 3310.msr -> 3310_0.png. Supported graphic-format-extension: eps, pdf, gif, jpg, png, svg, xpm, root +
            --dump <fln>
            rather than starting a root session and showing Fourier graphs of the data, it will output the Fourier data in an ascii file <fln>. +
            -br, --background-range <start> <end>
            background interval used to estimate the background to be subtracted before the Fourier transform. <start>, <end> to be given in bins. +
            -bg, --background
            gives the background explicit for each histogram. +
            -fo, --fourier-option <fopt>
            <fopt> can be 'real', 'imag', 'real+imag', 'power', or 'phase'. If this is not defined (neither on the command line nor in the musrfit_startup.xml). Default will be 'power'. +
            -ap, --apodization <val>
            <val> can be either 'none', 'weak', 'medium', 'strong'. Default will be 'none'. +
            -fp, --fourier-power <N>
            <N> being the Fourier power, i.e. 2^<N> used for zero padding. Default is -1, i.e. no zero padding will be performed. +
            -u, --units <units>
            <units> is used to define the x-axis of the Fourier transform. One may choose between the fields (Gauss) or (Tesla), the frequency (MHz), and the angular-frequency domain (Mc/s). Default will be 'MHz'. +
            -ph, --phase <val>
            defines the initial phase <val>. This only is of concern for 'real', 'imag', and 'real+imag'. Default will be 0.0. +
            -fr, --fourier-range <start> <end>
            Fourier range. <start>, <end> are interpreted in the units given. Default will be -1.0 for both which means, take the full Fourier range. +
            -tr, --time-range <start> <end>
            time domain range to be used for Fourier transform. <start>, <end> are to be given in (μsec). If nothing is given, the full time range found in the data file(s) will be used. +
            --histo <list>
            give the <list> of histograms to be used for the Fourier transform. E.g. musrFT -df lem15_his_01234.root --histo 1 3, will only be needed together with the option --data-file. If multiple data file are given, <list> will apply to all data-files given. If --histo is not given, all histos of a data file will be used. <list> can be anything like: 2 3 6, or 2-17, or 1-6 9, etc. +
            -a, --average
            show the average of all Fourier transformed data. +
            --t0 <list>
            A list of t0's can be provided. This in conjunction with --data-file and --fourier-option real allows to get the proper initial phase if t0's are known. If a single t0 for multiple histos is given, it is assume, that this t0 is common to all histos. Example: musrFT -df lem15_his_01234.root -fo real --t0 2750 --histo 1 3. +
            -pa, --packing <N>
            if <N> (an integer), the time domain data will first be packed/rebinned by <N>. +
            --title <title>
            give a global title for the plot. +
            --create-msr-file <fln>
            creates a msr-file based on the command line options provided. This will help on the way to a full fitting model. +
            -lc, --lifetimecorrection <fudge>
            try to eliminate muon life time decay. Only makes sense for low transverse fields. <fudge> is a tweaking factor (scaling factor for the estimated t0) and should be kept around 1.0. +
            --timeout <timeout>
            <timeout> given in seconds after which musrFT terminates. If <timeout> <= 0, no timeout will take place. Default <timeout> is 3600 sec. +
            +

            +
            Example 1
            musrFT -df tdc_hifi_2014_00153.mdu --title "MnSi" -tr 0 10 -fr 7.0 7.6 -u Tesla --histo 2-17 -a
            will take time range from t=0..10μsec, will show the Fourier transform in units of Tesla from B=7.0..7.6 Tesla of the detectors 2-17. Rather than showing the 16 individual Fourier transforms, the average of all Fourier spectra will be shown. t0's will be guessed by the maximum of the time domain histogram (assuming a prompt peak). +
            Example 2
            musrFT -df tdc_hifi_2014_00153.mdu -tr 0 10 -fr 7.0 7.6 -u Tesla --histo 2-17 --title "MnSi average, T=50K, B=7.5T" -a -g pdf
            as Example 1 but rather than showing an interactive GUI, the output will be dumped into a pdf-file. The file name will be tdc_hifi_2014_00153.pdf. +
            Example 3
            musrFT -df tdc_hifi_2014_00153.mdu -tr 0 10 -fr 7.0 7.6 -u Tesla --histo 2-17 --title "MnSi average, T=50K, B=7.5T" -a --dump MnSi.dat
            as Example 1 but rather than showing an interactive GUI, the output will be dumped into the ascii file MnSi.dat. +
            +

            +Within the drawn canvas all standard actions applicable to ROOT canvases might be performed. +In the menu bar the MusrFT menu can be found. From there some musrFT-specific actions might be taken:
            +
            Fourier
            allows to switch between different Fourier transform representations 'Power', 'Real', ... +
            Average
            toggle between the current view and the averaged data view. +
            Export Data
            saves the selected data in a simple multi-column ASCII file +
            +

            +Additionally, some functions can be accessed using key-shortcuts:
            +
            q
            quits musrFT +
            a
            toggle between average of the presented data and single Fourier histos, e.g. the averaged Fourier power spectra of various detectors. +
            u
            reset the plotting range to the area given in the msr-file or the form the command line ("unzoom") +
            +

            -

            2.3 musrt0

            +

            2.4 musrt0

            musrt0 is a user interface for the determination of t0 and the time windows of data and background needed to be specified in the RUN blocks of the msr file. It can be operated either as an interactive program or in a non-interactive mode. In the non-interactive mode it accepts the following parameters:
            <msr_file>
            name of an msr file
            -g, --getT0FromPromptPeak [<firstGoodBinOffset>]
            tries to estimate t0 from the prompt peak (maximum entry) in each histogram and writes the corresponding values to the t0 lines in the RUN blocks of the msr file. If an optional number <firstGoodBinOffset> is given, the lower limit of the data range will be set to t0 + <firstGoodBinOffset>. @@ -253,7 +302,7 @@ Using the key Q, musrt0 can be interrupted. No cha Closing a window by clicking the X button is equivalent to pressing Q, i.e. musrt0 is simply terminated.

            -

            2.4 musrfit_startup.xml

            +

            2.5 musrfit_startup.xml

            musrfit_startup.xml is a configuration file located at the musrfit binary path. In this file the following XML tags are allowed to define settings:
            <data_path>PATH_TO_DATA</data_path>
            add the new path PATH_TO_DATA where musrfit and musrview will search for data files
            <write_per_run_block_chisq>y/n</write_per_run_block_chisq>
            if enabled χ2 for each RUN block will be written to the STATISTIC block of the resulting msr file. Additionally, in case a χ2 single-histogram fit is done, also Pearson's χ2 will be added. @@ -309,7 +358,7 @@ An example would look like:

            -

            2.5 msr2msr

            +

            2.6 msr2msr

            msr2msr is a small utility for converting existing WKM msr files into musrfit msr files. It accepts the following parameters:
            <msr_file_in>
            input WKM msr file (mandatory first parameter)
            <msr_file_out>
            converted output musrfit msr file (mandatory second parameter) @@ -321,7 +370,7 @@ A typical example then looks like: If the input file has already the musrfit msr file structure, the output file will be just a copy of the input file.

            -

            2.6 any2many

            +

            2.7 any2many

            any2many is a muSR data file converter. Currently different facilities (PSI, TRIUMF, ISIS, J-PARC) are saving their muSR data files in different formats, or even worse some instruments are using other muSR data formats than others. The aim of any2many is that these files can be converted into each other. Of course only a subset of header information can be converted.

            Currently any2many can convert the following muSR data file formats:
              @@ -367,7 +416,7 @@ Will take the runs 100 through 117 and convert the NeXus input file Will read the two files '2010/lem10_his_0123.root' and '2010/lem10_his_0012.root', rebin them with 25 and export them as LEM ROOT files with adding rebin25 to the name, e.g. 2010/lem10_his_0123_rebin25.root.

              -

              2.7 dump_header

              +

              2.8 dump_header

              dump_header is a little program which tries to read a μSR data file and sends the relevant information (required header info, start of the histos, etc.) to the standard output. Currently the following μSR data file formats are supported: MusrROOT, ROOT (old LEM format), PSI-BIN, PSI-MDU, NeXus (IDF1 and IDF2), MUD, and WKM.

              @@ -1540,20 +1589,8 @@ For reporting bugs or requesting new features and improvements please use the -
              -

              Attachments (2)

              -
              -
               
              -
              - - - - - - -
        10. @@ -1562,9 +1599,9 @@ For reporting bugs or requesting new features and improvements please use the -
          Topic revision: r117 - 18 Dec 2014, AndreasSuter
          +
          Topic revision: r123 - 19 Feb 2015, AndreasSuter
          @@ -1586,7 +1623,7 @@ For reporting bugs or requesting new features and improvements please use the newtopic Create New Topic
        11. index Show All Topics
        12. searchtopic Search in Topics -
        13. changes Recent Changes +
        14. changes Recent Changes
        15. notify Define Notifications
        16. @@ -1599,12 +1636,11 @@ For reporting bugs or requesting new features and improvements please use the Paul Scherrer Institut

            -
          • +

          -

          @@ -1613,7 +1649,7 @@ For reporting bugs or requesting new features and improvements please use the - +

          diff --git a/doc/html/user/MUSR/MusrFitAcknowledgements.html b/doc/html/user/MUSR/MusrFitAcknowledgements.html index 927d0854..1bfe6d00 100644 --- a/doc/html/user/MUSR/MusrFitAcknowledgements.html +++ b/doc/html/user/MUSR/MusrFitAcknowledgements.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

          - - - + + +

          @@ -142,7 +142,7 @@ pre {
          Topic revision: r4 - 10 Jul 2011, wojek
          @@ -166,7 +166,7 @@ pre {
        17. newtopic Create New Topic
        18. index Show All Topics
        19. searchtopic Search in Topics -
        20. changes Recent Changes +
        21. changes Recent Changes
        22. notify Define Notifications
        23. @@ -179,12 +179,11 @@ pre {

            -
          • +

          -

          @@ -193,7 +192,7 @@ pre { - +

          diff --git a/doc/html/user/MUSR/MusrFitSetup.html b/doc/html/user/MUSR/MusrFitSetup.html index bdc0e1e6..e36c8315 100644 --- a/doc/html/user/MUSR/MusrFitSetup.html +++ b/doc/html/user/MUSR/MusrFitSetup.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

          - - - + + +

          @@ -846,7 +846,7 @@ musrview test-histo-ROOT-NPP.msr
          Topic revision: r60 - 25 Oct 2014, AndreasSuter
          @@ -870,7 +870,7 @@ musrview test-histo-ROOT-NPP.msr
        24. newtopic Create New Topic
        25. index Show All Topics
        26. searchtopic Search in Topics -
        27. changes Recent Changes +
        28. changes Recent Changes
        29. notify Define Notifications
        30. @@ -883,12 +883,11 @@ musrview test-histo-ROOT-NPP.msr

            -
          • +

          -

          @@ -897,7 +896,7 @@ musrview test-histo-ROOT-NPP.msr - +

          diff --git a/doc/html/user/MUSR/MusrGui.html b/doc/html/user/MUSR/MusrGui.html index 222bf1a4..c76fb0d9 100644 --- a/doc/html/user/MUSR/MusrGui.html +++ b/doc/html/user/MUSR/MusrGui.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,22 +108,22 @@ pre {

          - - - + + +

          -

          musrgui / musredit

          +

          musredit / (musrgui)

          1 Introduction

          -musrgui and musredit are editors which also provide a graphical user interface to the programs contained in the musrfit suite and are intended to help the user handle musrfit msr files. They are implemented in C++ and use the Qt framework. Principally, musrgui and musredit are doing the same, but are based on different Qt versions. musrgui is based on Qt 3.x and will only be maintained on bug-fixing level since the Qt 3.x licensing is less straight forward than the Qt 4.x one. musredit is based on Qt 4.6 (or above) and this is the program which will be developed further.
          +musredit and musrgui are editors which also provide a graphical user interface to the programs contained in the musrfit suite and are intended to help the user handle musrfit msr files. They are implemented in C++ and use the Qt framework. Principally, musrgui and musredit are doing the same, but are based on different Qt versions. musrgui is based on Qt 3.x and will only be maintained on bug-fixing level since the Qt 3.x licensing is less straight forward than the Qt 4.x one. musredit is based on Qt 4.6 (or above) and this is the program which will be developed further.
          On this documentation page only the features related to musrfit are described—the basic editor functions which should be self-explanatory are not. Before going on using musrgui / musredit it is strongly recommended to read the manual of musrfit first!

          2 Available Executables, Configuration Files and their Basic Usage

          -

          2.1 musrgui / musredit

          -musrgui / musredit are the editor executables. If called from within a shell they accept a few optional parameters:
          +

          2.1 musredit / (musrgui)

          +musredit / musrgui are the editor executables. If called from within a shell they accept a few optional parameters:
          <msr_files>
          file names of the msr files that should be opened in separate editor tabs on startup of musrgui / musredit.
          --help
          displays a small help notice in the shell explaining the basic usage of the program
          --version
          prints the version number of musrgui / musredit @@ -148,10 +148,10 @@ On this documentation page only the features related to musrfit are If called without any parameters an empty editor window opens.

          -

          2.2 musrgui_startup.xml / musredit_startup.xml

          -musrgui_startup.xml / musredit_startup.xml are configuration files located at the musrgui / musredit binary path. It is also possible to have another version of this file in the working directory which then will be used! +

          2.2 musredit_startup.xml / musrgui_startup.xml

          +musredit_startup.xml / musrgui_startup.xml are configuration files located at the musredit / musrgui binary path. It is also possible to have another version of this file in the working directory which then will be used!

          -In this file the following XML tags are allowed to define settings and might proof useful for all users of musrgui / musredit:
          +In this file the following XML tags are allowed to define settings and might proof useful for all users of musredit / musrgui:
          <general></general>
          set the default paths to executables and files in this environment
          <exec_path>PATH_TO_EXEC</exec_path>
          set the path PATH_TO_EXEC where the executables musrfit, musrview, musrt0, etc. can be found (inside the <general> environment)
          <default_save_path>SAV_PATH</default_save_path>
          specify the path SAV_PATH where musrgui / musredit point by default when opening and saving msr files (inside the <general> environment) @@ -291,6 +291,9 @@ The features of musrfit which can be accessed by the graphical fron

          musrt0.png T0 (Alt+t)
          musrt0 <msr_file>
          is called for the <msr_file> selected in the editor. For further information refer to the manual of musrfit.
          +

          +
          musrFT.png Raw Fourier
          musrFT <with-many-options> is called. For a proper documentation of it, check the manual of musrFT. +

          musrprefs.png Preferences (Alt+p)
          Opens a window in which the optional parameters that should be passed to musrfit can be chosen. These options are --keep-mn2-output, --dump ascii, --dump root, and --title-from-data-file. For further information refer to the manual of musrfit. Additionally, the access to musrt0 can be enabled temporarily. @@ -310,9 +313,9 @@ Besides the functions described above and which are mostly interfacing mus

          5 Bugtracking

          -For reporting bugs or requesting new features and improvements please use the PSI Tracker or send an e-mail to A. Suter. +For reporting bugs or requesting new features and improvements please use the Bitbucket Tracker, PSI Tracker (PSI account needed) or send an e-mail to A. Suter.

          --- BMW & AS
          +-- AS & BMW
          @@ -324,8 +327,8 @@ For reporting bugs or requesting new features and improvements please use the -
          Topic revision: r19 - 25 May 2012, AndreasSuter
          +
          Topic revision: r20 - 19 Feb 2015, AndreasSuter
          @@ -370,7 +373,7 @@ For reporting bugs or requesting new features and improvements please use the newtopic Create New Topic
        31. index Show All Topics
        32. searchtopic Search in Topics -
        33. changes Recent Changes +
        34. changes Recent Changes
        35. notify Define Notifications
        36. @@ -383,12 +386,11 @@ For reporting bugs or requesting new features and improvements please use the Paul Scherrer Institut

            -
          • +

          -

          @@ -397,7 +399,7 @@ For reporting bugs or requesting new features and improvements please use the - +

          diff --git a/doc/html/user/MUSR/MusrRoot.html b/doc/html/user/MUSR/MusrRoot.html index c81b5d54..8d53c6cd 100644 --- a/doc/html/user/MUSR/MusrRoot.html +++ b/doc/html/user/MUSR/MusrRoot.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

          - - - + + +

          @@ -1038,7 +1038,7 @@ Result in the RunHeader/SampleEnvironmentInfo: -
          +

          Attachments (2)

           
          @@ -1060,7 +1060,7 @@ Result in the RunHeader/SampleEnvironmentInfo:
          Topic revision: r7 - 29 Mar 2012, AndreasSuter
          @@ -1084,7 +1084,7 @@ Result in the RunHeader/SampleEnvironmentInfo:
        37. newtopic Create New Topic
        38. index Show All Topics
        39. searchtopic Search in Topics -
        40. changes Recent Changes +
        41. changes Recent Changes
        42. notify Define Notifications
        43. @@ -1097,12 +1097,11 @@ Result in the RunHeader/SampleEnvironmentInfo:

            -
          • +

          -

          @@ -1111,7 +1110,7 @@ Result in the RunHeader/SampleEnvironmentInfo:
          - +

          diff --git a/doc/html/user/MUSR/QuickStart.html b/doc/html/user/MUSR/QuickStart.html index 67007c7b..b7f0eccd 100644 --- a/doc/html/user/MUSR/QuickStart.html +++ b/doc/html/user/MUSR/QuickStart.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

          - - - + + +

          @@ -280,7 +280,7 @@ RUN 2008/lem08_his_8472 MUE4 PSI ROOT-NPP (name beamline institute dat
          Topic revision: r7 - 10 Jul 2011, wojek
          @@ -304,7 +304,7 @@ RUN 2008/lem08_his_8472 MUE4 PSI ROOT-NPP (name beamline institute dat
        44. newtopic Create New Topic
        45. index Show All Topics
        46. searchtopic Search in Topics -
        47. changes Recent Changes +
        48. changes Recent Changes
        49. notify Define Notifications
        50. @@ -317,12 +317,11 @@ RUN 2008/lem08_his_8472 MUE4 PSI ROOT-NPP (name beamline institute dat

            -
          • +

          -

          @@ -331,7 +330,7 @@ RUN 2008/lem08_his_8472 MUE4 PSI ROOT-NPP (name beamline institute dat - +

          diff --git a/doc/html/user/MUSR/TutorialSingleHisto.html b/doc/html/user/MUSR/TutorialSingleHisto.html index 34873b08..4a4a5f62 100644 --- a/doc/html/user/MUSR/TutorialSingleHisto.html +++ b/doc/html/user/MUSR/TutorialSingleHisto.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {

          - - - + + +

          @@ -281,7 +281,7 @@ This page only summarizes the very basic features and options of the programs co -
          +

          Attachments (6)

           
          @@ -303,7 +303,7 @@ This page only summarizes the very basic features and options of the programs co
          Topic revision: r9 - 02 Sep 2011, wojek
          @@ -327,7 +327,7 @@ This page only summarizes the very basic features and options of the programs co
        51. newtopic Create New Topic
        52. index Show All Topics
        53. searchtopic Search in Topics -
        54. changes Recent Changes +
        55. changes Recent Changes
        56. notify Define Notifications
        57. @@ -340,12 +340,11 @@ This page only summarizes the very basic features and options of the programs co

            -
          • +

          -

          @@ -354,7 +353,7 @@ This page only summarizes the very basic features and options of the programs co
          - +

          diff --git a/doc/html/user/MUSR/WebHome.html b/doc/html/user/MUSR/WebHome.html index eef6a90e..9318645f 100644 --- a/doc/html/user/MUSR/WebHome.html +++ b/doc/html/user/MUSR/WebHome.html @@ -1,6 +1,6 @@ - + @@ -8,7 +8,7 @@ - + @@ -108,9 +108,9 @@ pre {
          @@ -156,9 +156,9 @@ pre {
          Topic revision: r46 - 18 Dec 2014, AndreasSuter
          +
          Topic revision: r49 - 19 Feb 2015, AndreasSuter
          @@ -180,7 +180,7 @@ pre {
        58. newtopic Create New Topic
        59. index Show All Topics
        60. searchtopic Search in Topics -
        61. changes Recent Changes +
        62. changes Recent Changes
        63. notify Define Notifications
        64. @@ -193,12 +193,11 @@ pre {

            -
          • +

          -

          @@ -207,7 +206,7 @@ pre { - +

          diff --git a/src/musredit/PAdmin.cpp b/src/musredit/PAdmin.cpp index a94b3d70..57f3cff8 100644 --- a/src/musredit/PAdmin.cpp +++ b/src/musredit/PAdmin.cpp @@ -130,7 +130,9 @@ bool PAdminXMLParser::startElement( const QString&, const QString&, } else if (qName == "musr_web_statistic") { fKeyWord = eHelpStatistic; } else if (qName == "musr_web_msr2data") { - fKeyWord = eHelpMsr2Data; + fKeyWord = eHelpMsr2Data; + } else if (qName == "musr_web_musrFT") { + fKeyWord = eHelpMusrFT; } else if (qName == "chain_fit") { fKeyWord = eChainFit; } else if (qName == "write_data_header") { @@ -338,6 +340,9 @@ bool PAdminXMLParser::characters(const QString& str) case eHelpMsr2Data: fAdmin->setHelpUrl("msr2data", str); break; + case eHelpMusrFT: + fAdmin->setHelpUrl("musrFT", str); + break; case eChainFit: if (str == "y") flag = true; diff --git a/src/musredit/PAdmin.h b/src/musredit/PAdmin.h index 2fae7258..e4071085 100644 --- a/src/musredit/PAdmin.h +++ b/src/musredit/PAdmin.h @@ -74,7 +74,7 @@ class PAdminXMLParser : public QXmlDefaultHandler eRecentFile, eBeamline, eInstitute, eFileFormat, eLifetimeCorrection, eMsrDefaultFilePath, eTheoFuncPixmapPath, eFunc, eFuncName, eFuncComment, eFuncLabel, eFuncPixmap, eFuncParams, eHelpMain, eHelpTitle, eHelpParameters, eHelpTheory, eHelpFunctions, - eHelpRun, eHelpCommand, eHelpFourier, eHelpPlot, eHelpStatistic, eHelpMsr2Data, + eHelpRun, eHelpCommand, eHelpFourier, eHelpPlot, eHelpStatistic, eHelpMsr2Data, eHelpMusrFT, eChainFit, eWriteDataHeader, eIgnoreDataHeaderInfo, eWriteColumnData, eRecreateDataFile, eOpenFileAfterFitting, eCreateMsrFileOnly, eFitOnly, eGlobal, eGlobalPlus}; diff --git a/src/musredit/PGetMusrFTOptionsDialog.cpp b/src/musredit/PGetMusrFTOptionsDialog.cpp new file mode 100644 index 00000000..8c05f541 --- /dev/null +++ b/src/musredit/PGetMusrFTOptionsDialog.cpp @@ -0,0 +1,565 @@ +/**************************************************************************** + + PGetMusrFTOptionsDialog.cpp + + Author: Andreas Suter + e-mail: andreas.suter@psi.ch + +*****************************************************************************/ + +/*************************************************************************** + * Copyright (C) 2009-2015 by Andreas Suter * + * andreas.suter@psi.ch * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +#include +#include +#include + +#include "PHelp.h" + +#include "PGetMusrFTOptionsDialog.h" + +#define MUSRFT_OPT_UNDEF 0 +#define MUSRFT_OPT_REAL 1 +#define MUSRFT_OPT_IMAG 2 +#define MUSRFT_OPT_REAL_AND_IMAG 3 +#define MUSRFT_OPT_POWER 4 +#define MUSRFT_OPT_PHASE 5 + +#define MUSRFT_APOD_UNDEF 0 +#define MUSRFT_APOD_WEAK 1 +#define MUSRFT_APOD_MEDIUM 2 +#define MUSRFT_APOD_STRONG 3 + +#define MUSRFT_UNIT_UNDEF 0 +#define MUSRFT_UNIT_GAUSS 1 +#define MUSRFT_UNIT_TESLA 2 +#define MUSRFT_UNIT_FREQ 3 +#define MUSRFT_UNIT_CYCLE 4 + +//---------------------------------------------------------------------------------------------------- +/** + *

          Constructor. + * + * \param currentMsrFile path-file name of the currently active msr-file in musredit + * \param prevCmd list of the last (potential) previously call. + * \param helpUrl help url for the asymmetry run block + */ +PGetMusrFTOptionsDialog::PGetMusrFTOptionsDialog(QString currentMsrFile, QStringList &prevCmd, const QString helpUrl) : + fCurrentMsrFileName(currentMsrFile), fHelpUrl(helpUrl) +{ + setupUi(this); + setModal(true); + + fBkgRangeStartBin_lineEdit->setValidator( new QIntValidator(fBkgRangeStartBin_lineEdit) ); + fBkgRangeEndBin_lineEdit->setValidator( new QIntValidator(fBkgRangeEndBin_lineEdit) ); + fPacking_lineEdit->setValidator( new QIntValidator(fPacking_lineEdit) ); + fTimeRangeStart_lineEdit->setValidator( new QDoubleValidator(fTimeRangeStart_lineEdit) ); + fTimeRangeEnd_lineEdit->setValidator( new QDoubleValidator(fTimeRangeEnd_lineEdit) ); + fFourierPower_lineEdit->setValidator( new QIntValidator(fFourierPower_lineEdit) ); + fLifetimeCorrection_lineEdit->setValidator( new QDoubleValidator(fLifetimeCorrection_lineEdit) ); + fFourierRangeStart_lineEdit->setValidator( new QDoubleValidator(fFourierRangeStart_lineEdit) ); + fFourierRangeEnd_lineEdit->setValidator( new QDoubleValidator(fFourierRangeEnd_lineEdit) ); + fPacking_lineEdit->setText("1"); + + // populate dialog with the previous cmd call + bool msrTag = true; + QString str, str1, line; + int idx; + for (int i=0; isetText(line); + msrTag = false; + } + // collect data-file-names + if (prevCmd[i] == "-df") { + i++; + line = ""; + while (!prevCmd[i].startsWith("-") && (isetText(line); + } + // background-range + if (prevCmd[i] == "-br") { + fBkgRangeStartBin_lineEdit->setText(prevCmd[++i]); + fBkgRangeEndBin_lineEdit->setText(prevCmd[++i]); + } + // fourier-option + if (prevCmd[i] == "-fo") { + if (prevCmd[i+1] == "real") + fFourierOption_comboBox->setCurrentIndex(MUSRFT_OPT_REAL); + else if (prevCmd[i+1] == "imag") + fFourierOption_comboBox->setCurrentIndex(MUSRFT_OPT_IMAG); + else if (prevCmd[i+1] == "real+imag") + fFourierOption_comboBox->setCurrentIndex(MUSRFT_OPT_REAL_AND_IMAG); + else if (prevCmd[i+1] == "power") + fFourierOption_comboBox->setCurrentIndex(MUSRFT_OPT_POWER); + else if (prevCmd[i+1] == "phase") + fFourierOption_comboBox->setCurrentIndex(MUSRFT_OPT_PHASE); + else + fFourierOption_comboBox->setCurrentIndex(MUSRFT_OPT_UNDEF); + i++; + } + // apodization + if (prevCmd[i] == "-ap") { + if (prevCmd[i+1] == "weak") + fApodization_comboBox->setCurrentIndex(MUSRFT_APOD_WEAK); + else if (prevCmd[i+1] == "medium") + fApodization_comboBox->setCurrentIndex(MUSRFT_APOD_MEDIUM); + else if (prevCmd[i+1] == "strong") + fApodization_comboBox->setCurrentIndex(MUSRFT_APOD_STRONG); + else + fApodization_comboBox->setCurrentIndex(MUSRFT_APOD_UNDEF); + i++; + } + // fourier-power + if (prevCmd[i] == "-fp") { + fFourierPower_lineEdit->setText(prevCmd[++i]); + } + // units + if (prevCmd[i] == "-u") { + if (prevCmd[i+1] == "Gauss") + fFourierUnits_comboBox->setCurrentIndex(MUSRFT_UNIT_GAUSS); + else if (prevCmd[i+1] == "Tesla") + fFourierUnits_comboBox->setCurrentIndex(MUSRFT_UNIT_TESLA); + else if (prevCmd[i+1] == "MHz") + fFourierUnits_comboBox->setCurrentIndex(MUSRFT_UNIT_FREQ); + else if (prevCmd[i+1] == "Mc/s") + fFourierUnits_comboBox->setCurrentIndex(MUSRFT_UNIT_CYCLE); + else + fFourierUnits_comboBox->setCurrentIndex(MUSRFT_UNIT_UNDEF); + i++; + } + // phase + if (prevCmd[i] == "-ph") { + // NOT YET IMPLEMENTED + } + // fourier-range + if (prevCmd[i] == "-fr") { + fFourierRangeStart_lineEdit->setText(prevCmd[++i]); + fFourierRangeEnd_lineEdit->setText(prevCmd[++i]); + } + // time-range + if (prevCmd[i] == "-tr") { + fTimeRangeStart_lineEdit->setText(prevCmd[++i]); + fTimeRangeEnd_lineEdit->setText(prevCmd[++i]); + } + // histo list + if (prevCmd[i] == "--histo") { + i++; + line = ""; + while (!prevCmd[i].startsWith("-") && (isetText(line); + } + // average tag + if (prevCmd[i] == "-a") { + fAveragedView_checkBox->setCheckState(Qt::Checked); + } + // t0 list + if (prevCmd[i] == "--t0") { + i++; + line = ""; + while (!prevCmd[i].startsWith("-") && (isetText(line); + } + // packing + if (prevCmd[i] == "-pa") { + fPacking_lineEdit->setText(prevCmd[++i]); + } + // title + if (prevCmd[i] == "--title") { + fFourierTitle_lineEdit->setText(prevCmd[i+1]); + } + // create msr-file tag + if (prevCmd[i] == "--create-msr-file") { + fCreateMsrFileName = prevCmd[++i]; + fCreateMsrFile_checkBox->setCheckState(Qt::Checked); + } + // lifetime correction + if (prevCmd[i] == "-lc") { + fLifetimeCorrection_lineEdit->setText(prevCmd[++i]); + } + } + + // connect all necessary single and slots + connect(fCurrentMsrFile_checkBox, SIGNAL( stateChanged(int) ), this, SLOT( currentMsrFileTagChanged(int) ) ); + connect(fAllMsrFiles_checkBox, SIGNAL( stateChanged(int) ), this, SLOT( allMsrFileTagChanged(int) ) ); + connect(fMsrFileSelector_pushButton, SIGNAL( clicked() ), this, SLOT( selectMsrFileNames() ) ); + connect(fDataFileSelector_pushButton, SIGNAL( clicked() ), this, SLOT( selectDataFileNames() ) ); + connect(fCreateMsrFile_checkBox, SIGNAL( stateChanged(int) ), this, SLOT( createMsrFileChanged(int) ) ); + connect(fMsrFileNameClear_pushButton, SIGNAL (clicked() ), this, SLOT( clearMsrFileNames() ) ); + connect(fDataFileNameClear_pushButton, SIGNAL (clicked() ), this, SLOT( clearDataFileNames() ) ); + connect(fResetAll_pushButton, SIGNAL( clicked() ), this, SLOT( resetAll() ) ); +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          returns the musrFT command line options. + */ +QStringList PGetMusrFTOptionsDialog::getMusrFTOptions() +{ + QStringList cmd; + QString str(""); + QStringList strList; + + // check if currently active msr-file shall be used + if (fCurrentMsrFile_checkBox->checkState() == Qt::Checked) { + cmd << fCurrentMsrFileName; + } else { + // msr-files + for (int i=0; i 0) { + cmd << "-df"; + for (int i=0; itext().length() > 0) && (fBkgRangeEndBin_lineEdit->text().length() > 0)) { + cmd << "-br"; + cmd << fBkgRangeStartBin_lineEdit->text(); + cmd << fBkgRangeEndBin_lineEdit->text(); + } + + // background values + if (fBkgList_lineEdit->text().length() > 0) { + + } + + // fourier-option + if (fFourierOption_comboBox->currentText() != "UnDef") { + cmd << "-fo"; + cmd << fFourierOption_comboBox->currentText(); + } + + // apodization + cmd << "-ap"; + cmd << fApodization_comboBox->currentText(); + + // fourier-power + if (fFourierPower_lineEdit->text().length() > 0) { + cmd << "-fp"; + cmd << fFourierPower_lineEdit->text(); + } + + // units + if (fFourierUnits_comboBox->currentText() != "UnDef") { + cmd << "-u"; + cmd << fFourierUnits_comboBox->currentText(); + } + + // phase + + // fourier-range + if ((fFourierRangeStart_lineEdit->text().length() > 0) && (fFourierRangeEnd_lineEdit->text().length() > 0)) { + cmd << "-fr"; + cmd << fFourierRangeStart_lineEdit->text(); + cmd << fFourierRangeEnd_lineEdit->text(); + } + + // time-range + if ((fTimeRangeStart_lineEdit->text().length() > 0) && (fTimeRangeEnd_lineEdit->text().length() > 0)) { + cmd << "-tr"; + cmd << fTimeRangeStart_lineEdit->text(); + cmd << fTimeRangeEnd_lineEdit->text(); + } + + // histo list + if (fHistoList_lineEdit->text().length() > 0) { + cmd << "--histo"; + strList = fHistoList_lineEdit->text().split(" ", QString::SkipEmptyParts); + for (int i=0; icheckState() == Qt::Checked) + cmd << "-a"; + + // t0 list + if (fT0_lineEdit->text().length() > 0) { + cmd << "--t0"; + strList = fT0_lineEdit->text().split(" ", QString::SkipEmptyParts); + for (int i=0; itext().length() > 0) { + cmd << "-pa"; + cmd << fPacking_lineEdit->text(); + } + + // title + if (fFourierTitle_lineEdit->text().length() > 0) { + cmd << "--title"; + cmd << fFourierTitle_lineEdit->text(); + } + + // create-msr-file + if (fCreateMsrFile_checkBox->checkState() == Qt::Checked) { + cmd << "--create-msr-file"; + cmd << fCreateMsrFileName; + } + + // lifetimecorrection + if (fLifetimeCorrection_lineEdit->text().length() > 0) { + cmd << "-lc"; + cmd << fLifetimeCorrection_lineEdit->text(); + } + + return cmd; +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          SLOT called when fCurrentMsrFile_checkBox is checked/unchecked. If checked, it will clean up + * the msr-file path-file list and the data-file path-file list. + */ +void PGetMusrFTOptionsDialog::currentMsrFileTagChanged(int state) +{ + if (state == Qt::Checked) { + fAllMsrFiles_checkBox->setCheckState(Qt::Unchecked); + + // remove all msr-data-file-names and data-path-file-names + fMsrFilePaths.clear(); + fMsrFileNames.clear(); + fMsrFileSelector_lineEdit->setText(""); + fDataFilePaths.clear(); + fDataFileNames.clear(); + fDataFileSelector_lineEdit->setText(""); + } +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          SLOT called when fAllMsrFiles_checkBox is checked/unchecked. Currently it has no functionality. + */ +void PGetMusrFTOptionsDialog::allMsrFileTagChanged(int state) +{ + if (state == Qt::Checked) { + fCurrentMsrFile_checkBox->setCheckState(Qt::Unchecked); + } +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          SLOT called when fMsrFileSelector_pushButton is clicked. Collects the msr-file path-name list. + */ +void PGetMusrFTOptionsDialog::selectMsrFileNames() +{ + QStringList flns = QFileDialog::getOpenFileNames( this, tr("Open msr-File(s)"), tr( "./" ), + tr( "msr-Files (*.msr);;All Files (*)" )); + + QString str(""), str1(""); + int idx; + if (flns.size() > 0) { + // delete already present elements + fMsrFilePaths.clear(); + fMsrFileNames.clear(); + + // split path-name into path and name + for (int i=0; isetText(str); + } +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          SLOT called when the fMsrFileNameClear_pushButton is clicked. + */ +void PGetMusrFTOptionsDialog::clearMsrFileNames() +{ + fMsrFileSelector_lineEdit->setText(""); + fMsrFilePaths.clear(); + fMsrFileNames.clear(); +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          SLOT called when fDataFileSelector_pushButton is clicked. Collects the data-file path-name list. + */ +void PGetMusrFTOptionsDialog::selectDataFileNames() +{ + QStringList flns = QFileDialog::getOpenFileNames( this, tr("Open msr-File(s)"), tr( "./" ), + tr( "data-Files (*.root *.bin *.msr *.nxs *.mdu);;All Files (*)" )); + + QString str(""), str1(""); + int idx; + if (flns.size() > 0) { + // delete already present elements + fDataFilePaths.clear(); + fDataFileNames.clear(); + + // split path-name into path and name + for (int i=0; isetText(str); + } +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          SLOT called when the fDataFileNameClear_pushButton is clicked. + */ +void PGetMusrFTOptionsDialog::clearDataFileNames() +{ + fDataFileSelector_lineEdit->setText(""); + fDataFilePaths.clear(); + fDataFileNames.clear(); +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          SLOT called when the create-msr-file tag has changed + */ +void PGetMusrFTOptionsDialog::createMsrFileChanged(int state) +{ + if (state == Qt::Checked) { + fCreateMsrFileName = QFileDialog::getSaveFileName(this, tr("Create msr-file"), "./", tr("msr-Files (*.msr);;All Files (*)")); + if (fCreateMsrFileName.length() == 0) + fCreateMsrFile_checkBox->setCheckState(Qt::Unchecked); + } else { + fCreateMsrFileName = ""; + } +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          SLOT called when the Reset All button is pressed. Will remove all settings. + */ +void PGetMusrFTOptionsDialog::resetAll() +{ + fCurrentMsrFile_checkBox->setCheckState(Qt::Unchecked); + fAllMsrFiles_checkBox->setCheckState(Qt::Unchecked); + fMsrFilePaths.clear(); + fMsrFileNames.clear(); + fMsrFileSelector_lineEdit->setText(""); + fDataFilePaths.clear(); + fDataFileNames.clear(); + fDataFileSelector_lineEdit->setText(""); + fBkgRangeStartBin_lineEdit->setText(""); + fBkgRangeEndBin_lineEdit->setText(""); + fBkgList_lineEdit->setText(""); + fApodization_comboBox->setCurrentIndex(MUSRFT_APOD_UNDEF); + fPacking_lineEdit->setText(""); + fTimeRangeStart_lineEdit->setText(""); + fTimeRangeEnd_lineEdit->setText(""); + fHistoList_lineEdit->setText(""); + fT0_lineEdit->setText(""); + fFourierOption_comboBox->setCurrentIndex(MUSRFT_OPT_UNDEF); + fFourierUnits_comboBox->setCurrentIndex(MUSRFT_UNIT_UNDEF); + fFourierPower_lineEdit->setText(""); + fLifetimeCorrection_lineEdit->setText(""); + fFourierRangeStart_lineEdit->setText(""); + fFourierRangeEnd_lineEdit->setText(""); + fAveragedView_checkBox->setCheckState(Qt::Unchecked); + fCreateMsrFile_checkBox->setCheckState(Qt::Unchecked); + fFourierTitle_lineEdit->setText(""); +} + +//---------------------------------------------------------------------------------------------------- +/** + *

          Generates a help content window showing the description for musrFT. + */ +void PGetMusrFTOptionsDialog::helpContent() +{ + if (fHelpUrl.isEmpty()) { + QMessageBox::information(this, "**INFO**", "Will eventually show a help window"); + } else { +#ifdef _WIN32GCC + QMessageBox::information(this, "**INFO**", "If a newer Qt version was available, a help window would be shown!"); +#else + PHelp *help = new PHelp(fHelpUrl); + help->show(); +#endif // _WIN32GCC + } +} diff --git a/src/musredit/PGetMusrFTOptionsDialog.h b/src/musredit/PGetMusrFTOptionsDialog.h new file mode 100644 index 00000000..8d3e0942 --- /dev/null +++ b/src/musredit/PGetMusrFTOptionsDialog.h @@ -0,0 +1,69 @@ +/**************************************************************************** + + PGetMusrFTOptionsDialog.h + + Author: Andreas Suter + e-mail: andreas.suter@psi.ch + +*****************************************************************************/ + +/*************************************************************************** + * Copyright (C) 2010-2015 by Andreas Suter * + * andreas.suter@psi.ch * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _PGETMUSRFTOPTIONSDIALOG_H_ +#define _PGETMUSRFTOPTIONSDIALOG_H_ + +#include +#include + +#include "ui_PGetMusrFTOptionsDialog.h" + +class PGetMusrFTOptionsDialog : public QDialog, private Ui::PGetMusrFTOptionsDialog +{ + Q_OBJECT + + public: + PGetMusrFTOptionsDialog(QString currentMsrFile, QStringList &prevCmd, const QString helpUrl); + QStringList getMusrFTOptions(); + + public slots: + void helpContent(); + + private slots: + void currentMsrFileTagChanged(int state); + void allMsrFileTagChanged(int state); + void selectMsrFileNames(); + void clearMsrFileNames(); + void selectDataFileNames(); + void clearDataFileNames(); + void createMsrFileChanged(int state); + void resetAll(); + + private: + QStringList fMsrFilePaths; ///< list keeping all the paths from the msr-file path-name list + QStringList fMsrFileNames; ///< list keeping all the names from the msr-file path-name list + QStringList fDataFilePaths; ///< list keeping all the paths from the data-file path-name list + QStringList fDataFileNames; ///< list keeping all the names from the data-file path-name list + QString fCreateMsrFileName; ///< keeps the msr-path-file name for msr-file creation + QString fCurrentMsrFileName; ///< keeps the msr-path-file name of the currently active msr-file in musredit. + QString fHelpUrl; ///< help url for the asymmetry run block +}; + +#endif // _PGETMUSRFTOPTIONSDIALOG_H_ diff --git a/src/musredit/PTextEdit.cpp b/src/musredit/PTextEdit.cpp index 08cc9e18..99a603b6 100644 --- a/src/musredit/PTextEdit.cpp +++ b/src/musredit/PTextEdit.cpp @@ -55,6 +55,7 @@ using namespace std; #include #include #include +#include #include @@ -68,6 +69,7 @@ using namespace std; #include "PFitOutputHandler.h" #include "PDumpOutputHandler.h" #include "PPrefsDialog.h" +#include "PGetMusrFTOptionsDialog.h" #include "PGetDefaultDialog.h" #include "PMusrEditAbout.h" #include "PMsr2DataDialog.h" @@ -550,6 +552,12 @@ void PTextEdit::setupMusrActions() menu->addAction(fMusrT0Action); fMusrT0Action->setEnabled(fAdmin->getEnableMusrT0Flag()); + a = new QAction( QIcon( QPixmap (":/images/musrFT.xpm") ), tr( "Raw Fourier" ), this ); + a->setStatusTip( tr("Start musrFT") ); + connect( a, SIGNAL( triggered() ), this, SLOT( musrFT() ) ); + tb->addAction(a); + menu->addAction(a); + a = new QAction( QIcon( QPixmap( ":/images/musrprefs.xpm" ) ), tr( "&Preferences" ), this ); a->setStatusTip( tr("Show Preferences") ); connect( a, SIGNAL( triggered() ), this, SLOT( musrPrefs() ) ); @@ -2223,6 +2231,33 @@ void PTextEdit::musrT0() QString fln = *fFilenames.find( currentEditor() ); } +//---------------------------------------------------------------------------------------------------- +/** + *

          Calls musrFT via selection/option dialog. It will ask the user if he/she wants to overwrite some + * of the default settings. + */ +void PTextEdit::musrFT() +{ + + PGetMusrFTOptionsDialog *dlg = new PGetMusrFTOptionsDialog(*fFilenames.find( currentEditor() ), fMusrFTPrevCmd, fAdmin->getHelpUrl("musrFT")); + + if (dlg == 0) { + QMessageBox::critical(this, "**ERROR** musrFT", "Couldn't invoke musrFT Options Dialog."); + return; + } + + if (dlg->exec() == QDialog::Accepted) { + fMusrFTPrevCmd = dlg->getMusrFTOptions(); + QProcess proc(this); + proc.setStandardOutputFile("musrFT.log"); + proc.setStandardErrorFile("musrFT.log"); + proc.startDetached("musrFT", fMusrFTPrevCmd); + } + + delete dlg; + dlg = 0; +} + //---------------------------------------------------------------------------------------------------- /** *

          Calls the preferences dialog which is used to set some global options. diff --git a/src/musredit/PTextEdit.h b/src/musredit/PTextEdit.h index f565ed61..149ab0bf 100644 --- a/src/musredit/PTextEdit.h +++ b/src/musredit/PTextEdit.h @@ -131,6 +131,7 @@ private slots: void musrMsr2Data(); void musrView(); void musrT0(); + void musrFT(); void musrPrefs(); void musrSwapMsrMlog(); void musrDump(); @@ -157,6 +158,7 @@ private: bool fFileSystemWatcherActive; ///< flag to enable/disable the file system watcher QTimer fFileSystemWatcherTimeout; ///< timer used to re-enable file system watcher. Needed to delay the re-enabling QString fLastDirInUse; ///< string holding the path from where the last file was loaded. + QStringList fMusrFTPrevCmd; QAction *fMusrT0Action; diff --git a/src/musredit/forms/PGetMusrFTOptionsDialog.ui b/src/musredit/forms/PGetMusrFTOptionsDialog.ui new file mode 100644 index 00000000..d2cf38be --- /dev/null +++ b/src/musredit/forms/PGetMusrFTOptionsDialog.ui @@ -0,0 +1,842 @@ + + + PGetMusrFTOptionsDialog + + + Qt::WindowModal + + + + 0 + 0 + 711 + 650 + + + + musrFT Options + + + + + 20 + 400 + 671 + 201 + + + + + 75 + true + + + + Fourier + + + + + 20 + 30 + 641 + 156 + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Options</span></p></body></html> + + + + + + + + UnDef + + + + + real + + + + + imag + + + + + real+imag + + + + + power + + + + + phase + + + + + + + + + + Qt::Horizontal + + + + 218 + 20 + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Units</span></p></body></html> + + + + + + + + UnDef + + + + + Gauss + + + + + Tesla + + + + + MHz + + + + + Mc/s + + + + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Power</span></p></body></html> + + + + + + + + + + + + Qt::Horizontal + + + + 88 + 20 + + + + + + + + + + Lifetime Correction + + + + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Range</span></p></body></html> + + + + + + + + + Start + + + + + + + + + + + + + + End + + + + + + + + + + + + Qt::Horizontal + + + + 118 + 20 + + + + + + + + + + + + Averaged View + + + + + + + Qt::Horizontal + + + + 278 + 20 + + + + + + + + Create msr-File + + + + + + + + + + + Title + + + + + + + + + + + + + + + 20 + 160 + 671 + 231 + + + + + 75 + true + + + + Histo Info + + + + + 20 + 30 + 641 + 188 + + + + + + + + + + 75 + true + + + + Background Range (in Bins) + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">StartBin</p></body></html> + + + + + + + + + + + + + + EndBin: + + + + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Background List</span></p></body></html> + + + + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Apodization</span></p></body></html> + + + + + + + + none + + + + + weak + + + + + medium + + + + + strong + + + + + + + + + + + + Packing + + + + + + + + + + + + Qt::Horizontal + + + + 168 + 20 + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Time Range (usec)</p></body></html> + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Start</p></body></html> + + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">End</p></body></html> + + + + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Histo List</p></body></html> + + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">T0's</p></body></html> + + + + + + + + + + + + + + + 20 + 10 + 671 + 141 + + + + + 75 + true + + + + File Selection + + + + + 19 + 31 + 641 + 96 + + + + + + + + + Current msr-File + + + + + + + ALL msr-Files + + + + + + + Qt::Horizontal + + + + 318 + 20 + + + + + + + + + + + + Select msr-File(s) + + + + + + + + + + clear msr-file name list + + + Clear + + + + + + + + + + + Select data-File(s) + + + + + + + + + + clear data-file name list + + + Clear + + + + + + + + + + + + 20 + 610 + 671 + 29 + + + + + + + Help + + + + + + + Qt::Horizontal + + + + 78 + 20 + + + + + + + + + 75 + true + + + + Reset All + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + fCurrentMsrFile_checkBox + fAllMsrFiles_checkBox + fMsrFileSelector_pushButton + fMsrFileSelector_lineEdit + fMsrFileNameClear_pushButton + fDataFileSelector_pushButton + fDataFileSelector_lineEdit + fDataFileNameClear_pushButton + fBkgRangeStartBin_lineEdit + fBkgRangeEndBin_lineEdit + fBkgList_lineEdit + fApodization_comboBox + fPacking_lineEdit + fTimeRangeStart_lineEdit + fTimeRangeEnd_lineEdit + fHistoList_lineEdit + fT0_lineEdit + fFourierOption_comboBox + fFourierUnits_comboBox + fFourierPower_lineEdit + fLifetimeCorrection_lineEdit + fFourierRangeStart_lineEdit + fFourierRangeEnd_lineEdit + fAveragedView_checkBox + fCreateMsrFile_checkBox + fFourierTitle_lineEdit + fResetAll_pushButton + fHelp_pushButton + buttonBox + + + + + buttonBox + accepted() + PGetMusrFTOptionsDialog + accept() + + + 683 + 611 + + + 157 + 274 + + + + + buttonBox + rejected() + PGetMusrFTOptionsDialog + reject() + + + 689 + 611 + + + 286 + 274 + + + + + fHelp_pushButton + clicked() + PGetMusrFTOptionsDialog + helpContent() + + + 85 + 627 + + + 147 + 624 + + + + + + helpContent() + + diff --git a/src/musredit/images/musrFT.xpm b/src/musredit/images/musrFT.xpm new file mode 100644 index 00000000..406c21dc --- /dev/null +++ b/src/musredit/images/musrFT.xpm @@ -0,0 +1,28 @@ +/* XPM */ +static char *dummy[]={ +"22 22 3 1", +". c None", +"# c #000000", +"a c #ff0000", +"..##....###...##......", +"......................", +"######################", +"......................", +".........a............", +".........a............", +".........a............", +".........a............", +".........aa...........", +"........aaa...........", +"........aaa...........", +"........a.a...........", +"........a.a...........", +".......aa.aa..........", +".......aa..aa.........", +"a.aaa..a....aaa...aa..", +"aa.aaa.a......aaa.aaaa", +"......a..........aa...", +"######################", +"......................", +".#######.####..####...", +"......................"}; diff --git a/src/musredit/musredit.pro b/src/musredit/musredit.pro index 1662fe0b..245e6fdc 100644 --- a/src/musredit/musredit.pro +++ b/src/musredit/musredit.pro @@ -83,6 +83,7 @@ HEADERS = musredit.h \ PFitOutputHandler.h \ PDumpOutputHandler.h \ PPrefsDialog.h \ + PGetMusrFTOptionsDialog.h \ PGetDefaultDialog.h \ PGetTitleBlockDialog.h \ PGetParameterBlockDialog.h \ @@ -106,6 +107,7 @@ SOURCES = PHelp.cpp \ PFitOutputHandler.cpp \ PDumpOutputHandler.cpp \ PPrefsDialog.cpp \ + PGetMusrFTOptionsDialog.cpp \ PGetDefaultDialog.cpp \ PGetTitleBlockDialog.cpp \ PGetParameterBlockDialog.cpp \ @@ -126,6 +128,7 @@ FORMS = forms/PFindDialog.ui \ forms/PGetDefaultDialog.ui \ forms/PMusrEditAbout.ui \ forms/PPrefsDialog.ui \ + forms/PGetMusrFTOptionsDialog.ui \ forms/PGetTitleBlockDialog.ui \ forms/PGetParameterBlockDialog.ui \ forms/PGetTheoryBlockDialog.ui \ diff --git a/src/musredit/musredit.qrc b/src/musredit/musredit.qrc index 10fcf342..808a7ea8 100644 --- a/src/musredit/musredit.qrc +++ b/src/musredit/musredit.qrc @@ -1,40 +1,41 @@ - - images/editcopy.xpm - images/editcut.xpm - images/editfind.xpm - images/editnext.xpm - images/editpaste.xpm - images/editprevious.xpm - images/editredo.xpm - images/editundo.xpm - images/filenew.xpm - images/fileopen.xpm - images/fileprint.xpm - images/filereload.xpm - images/filesave.xpm - images/musrasym.xpm - images/musrcalcchisq.xpm - images/musrfit.xpm - images/musrmsr2data.xpm - images/musrprefs.xpm - images/musrsinglehisto.xpm - images/musrswap.xpm - images/musrt0.xpm - images/musrview.xpm - images/musrdump.xpm - latex_images/abragam.png - latex_images/asymmetry.png - latex_images/bessel.png - latex_images/combiLGKT.png - latex_images/generalExp.png - latex_images/internalBessel.png - latex_images/internalField.png - latex_images/polynom.png - latex_images/simpleExp.png - latex_images/simpleGauss.png - latex_images/statExpKT.png - latex_images/statGssKT.png - latex_images/tfCos.png - + + images/editcopy.xpm + images/editcut.xpm + images/editfind.xpm + images/editnext.xpm + images/editpaste.xpm + images/editprevious.xpm + images/editredo.xpm + images/editundo.xpm + images/filenew.xpm + images/fileopen.xpm + images/fileprint.xpm + images/filereload.xpm + images/filesave.xpm + images/musrasym.xpm + images/musrcalcchisq.xpm + images/musrfit.xpm + images/musrmsr2data.xpm + images/musrprefs.xpm + images/musrsinglehisto.xpm + images/musrswap.xpm + images/musrt0.xpm + images/musrview.xpm + images/musrFT.xpm + images/musrdump.xpm + latex_images/abragam.png + latex_images/asymmetry.png + latex_images/bessel.png + latex_images/combiLGKT.png + latex_images/generalExp.png + latex_images/internalBessel.png + latex_images/internalField.png + latex_images/polynom.png + latex_images/simpleExp.png + latex_images/simpleGauss.png + latex_images/statExpKT.png + latex_images/statGssKT.png + latex_images/tfCos.png + diff --git a/src/musredit/musredit_startup.xml.in b/src/musredit/musredit_startup.xml.in index a921d10f..bdcf0b4e 100644 --- a/src/musredit/musredit_startup.xml.in +++ b/src/musredit/musredit_startup.xml.in @@ -31,6 +31,7 @@ file://@DOCDIR@/html/user/MUSR/MusrFit.html#ThePlotBlock file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheStatisticBlock file://@DOCDIR@/html/user/MUSR/Msr2Data.html + file://@DOCDIR@/html/user/MUSR/MusrFit.html#A_2.3_musrFT Courier New