Tobyfit userguide

From Tobyfit

Jump to: navigation, search

Contents

Introduction

The original Tobyfit software package is fully described in [1]. It is a simulation and fitting package for single crystal data such as that from neutron scattering experiments on Isis instruments HET, MARI and MAPS[2]. For full details of the data analysis methods used by this package the user should refer to [1]. This guide is directed at how the new user interface to the software works and integrates with grid computing to provide high performance computational analysis of large data sets. A short summary of commands is given in tobyfit command list.

Data analysis

Tobyfit calculates the expected scattering given a model of the scattering function and the instrument on which the experiment is performed. The user can select from a set of predefined models or define a new one of his own. Simulation can then be used to compare the calculated scattering with the measured values. Least squares fitting of one or more parameters can also be made to best fit the experimental results. The computational cost of fitting varies with the amount of data and the complexity of the integration process used in the calculation but can be large for newer high resolution instruments.

Using Grid Computing

Grid computing is essentially tries to give a user a unified interface to a wide range of computational and data storage resources. To exploit these resources requires the use of suitable middle such as the Globus Toolkit [3] which provides a uniform and secure interface many different resources based on digital certificates. Data storage in a grid system can be effectively provided by the Storage Resource Broker (SRB) and these two technologies are used as the main basis of the UK’s National Grid Service (NGS). The original Tobyfit data analysis code has been adapted and re-written to effectively exploit grid computing to allow analysis of much larger data sets and fitting of more complex scattering functions. The underlining data analysis code has been re-formulated to work in parallel using MPI so that is can run efficiently on both shared and distributed memory architectures. The command line Fortran user interface has been replaced by a greatly improved Graphical User Interface (GUI) that runs within the Matlab environment but makes use of Java Swing components. This integrates Matlab plotting functions for 1D and 2D graphs and sections of 3D data.

Starting the GUI

Initialisation

To start the GUI it is necessary to run Matlab (version 7.1 or later). It is assumed that you have installed the Tobyfit package following the instructions in the Installation guide. On Linux systems it is usually necessary to start Matlab from the directory Tobyfit was installed in (default ~/e-science/TobyfitProject). This is to ensure that the correct classpath is loaded. The top level install directory (e.g. C:\e-Science\TobyfitProject or ~/e-science/TobyFitProject) must be in your Matlab path. Then at the Matlab prompt issue the command:

>> tobyfit

Alternatively, if you do not wish to use the grid based machines and have correctly installed the localhost software for your system, you can add an optional argument with the value true to suppress checking for grid access:

>> tobyfit(true)

Generating a proxy certificate

Assuming that you did not use the optional argument, the above should first bring up a window asking for the pass phrase for your grid certificate. It is possible to use the GUI in “local-only” mode if no grid certificate is available. This is adequate for testing and analysis of small to medium data sets. However for large data sets use of the grid is recommended for speed and memory reasons. If you wish to work in local mode, you can cancel the pop-up request for a certificate pass phrase and click through the following dialogues to enable local-only mode.

If you do have a grid certificate, and have created PEM files of your certificate in a directory called .globus, then you can enter the pass phrase and click ‘Ok’. This process will take a few seconds. If you have not created PEM files on the local machine, then there are three other ways to get a valid proxy, which will be offered by clicking on “User another method”. These are:

  • Get a proxy from a MyProxy server. To use this you must have previously stored your certificate proxy in this server. This method may be particularly useful for Teragrid users.
  • Get a proxy from a grid certificate in pkcs12 format. This is the format used when exporting certificates from web browsers, and avoids the need to convert to PEM format.
  • Get a proxy direct from the web browser (IE or Firefox) on the current machine. If you have downloaded a certificate into your web browser you can use this method.

Which ever method is used, you must have a valid proxy to use any grid enabled resource. If you do not have a grid certificate, or if internet connectivity is unavailable, it is possible to use Tobyfit just on the local host for both Windows and Linux, though the latter requires that you download and build the server code for your installation.

At this point a check is made to see that all the grid resources specified on installation are available and recognise your certificate. It is not necessary for all the listed grid resources to recognise your certificate, but you will not be able to send jobs to those that do not. Resources that you do not have access to can be removed from the resources file, which is located in either:

<Matlab_root>\toolbox\GaptkComputeToolbox\lib\Resource.properties or in the directory above the Tobyfit installation. The exact location of this depends on the installation process.

Initial GUI window

After proxy creation, a GUI window should appear as shown in Figure 1. The major areas are:

Figure 1 Cross section tab
Fig 1 - Initial view of GUI in cross section tab
  • The top bar of the screen which offers two drop down menus:
    • The File menu allows loading and saving of TFT files, the update of user models and exiting the program. A TFT file contains all the information required to simulate an experiment including the data files to be used and values of all parameters. The update of user models is described in more detail later.
    • The Help menu gives basic details on the operation of each part on the GUI.
  • The data summary table gives details of each data set. As in the original Tobyfit, up to 10 runs may be fitted each of which may have up to ten separate data sets. As these are loaded they will be listed here. A tick box indicates if a given run and data set is to be included in fitting or simulation operations. The run number, data set number and data file name for each data set are shown in the data summary table.
  • Below the data summary table are the five separate tabs:
    • Cross section model, related to the scattering model to use and parameters to fit.
    • Runs, which allows definition of data sets, spectrometer and chopper information, data removal and background model parameters.
    • Integration Method, controlling the integration method to use and associated parameters.
    • Simulate, to perform and manage simulation jobs and plot results.
    • Fit, to perform and manage fitting jobs and plot results.

Using the menu options, and the various tabs, it is possible to create a new TFT file from scratch or read an existing TFT file into the GUI and modify the options of these files. Having done this it is then possible to perform either simulations or fitting operations on the data. As well as providing a GUI to edit the complex input data, this tool allows the simulation and fitting to be run on any grid enabled resource that the user has access to. These resources give two major advantages, firstly allowing the use of parallel processing giving faster response on large problems, and secondly allowing use of larger memory space so that bigger data sets can be fitted.

Operation of the GUI

The tabs and data panels

Cross section model tab

This tab (as in Figure 1) allows selection of the scattering model to be used. Models are identified by numbers given in the drop down list on the top left of the panel. Negative numbers are used for internal models while positive ones are for user defined ones. A default set of user models are provided.

A model may be selected by changing the value in the drop down list. Information on the selected model is provided via tooltips, which appear when the mouse pointer is held over the lower table. The tooltip gives a short name for the model and also lists the parameters that can be used with that model. Each model has a set of parameters associated with it.

Currently up to 20 parameters, labelled p1 to p20, may be used, though most models use fewer than this. The tooltip lists just those parameters that are active for the selected model.

The ion text box allows input of the magnetic form factor value. The format of the entry is a real number, where the integer part is the atomic number and the decimal part specifies the valence e.g. "25.3" specifies Mn3+. To switch off the magnetic form factor, enter "0.0".

The tick box sharp can be selected to switch from the default broad scattering models to sharp models. This selection will change the set of available models to use in the models selected box.

Within the parameter table there are a number of values that can be set. The first is the clear box which is associated with each parameter. If this is selected for a parameter then subsequent fitting jobs will allow its value to vary, otherwise it will be held constant. Only parameters relevant to the model selected should be cleared. The Value of each parameter is that which will be used in simulation and as the starting point for fitting. The Error value is only set after a fit has been performed and the results loaded back into the GUI.

The remaining four values for each parameter control the fitting process for the given value. The Lower and Upper values are bounds on the parameter value. Zero is used in indicate no bound. To set a bound on a parameter both the lower and upper values should be set non-zero. If a bound of zero is required, a suitably small value close to zero should be used instead. The BindVar allows a parameter to be bound to another variable. This should be an integer value giving the parameter number that this value is bound to. Also required is the ratio of the binding, BindRat. For example to set the first parameter to be twice that of the second, p2, would require BindVar=2 and BindRat=2.0 in the p1 row. Note that a value to bind must also be marked clear for the fitting process to use the binding information.

Runs tab

Figure 2 Runs tab
Fig 2 - View of runs tab

The runs tab (Figure 2) is the most complex part of the GUI and has a number of functions. It allows:

  • Definition of data and parameter files for each run and data set
  • Graphical display of the experimental data
  • Masking (removal) of selected data from any data set
  • Definition of the experimental conditions of each run (instrument, chopper, etc)
  • Definition of the sample information and shape
  • Definition of background models for each data set or run and parameters of these models to fit
Data definition

The definition and inspection of the data which will be used in fitting and simulation is handled near the top of the Runs tab. Data files can be entered by setting the run number and data set number and then using the Browse option to search for and insert the required data and parameter file names. Note that while the browse option allows selection of any file on the local system, all the files need to be in one common data directory. This copy is done automatically and, if defining a completely new run, then the name of the data directory you want to use will be asked for on input of the first data file. The directory path of the data directory will be changed to use the environment variable notation of Tobyfit, for example, demo:demo_a.cut with associated parameter file demo:demo.par. If you load an existing TFT file then some of these values will already be populated.

Each data file is one of:

  • A cut file, a 1D data set, such as demo_a.cut. These can be generated from an SPE format file using the mslice[4] program.
  • A slice file, a 2D data set. Again this may be generated from an SPE file using mslice.
  • A full SPE file, which is a 3D data set.
Data viewing

To visually inspect the currently selected data file, the plot button can be used. This selects an appropriate method depending on the file type, with cut files giving line plots and slice files represented by colour maps. For the case of SPE files the mslice program is used. The plotover button allows cuts to be plotted on top previously plotted data. The colour and other parameters of the cut plots may be altered using the provided drop down lists. To plot different data sets, the appropriate “run number” and “data set number” should be selected using the drop-down lists. Normally a plot of one data set will replace any existing plot window. If you wish to keep several plot windows on display, use the keep button found on the top of the graphics window.

Experimental conditions

Below the file definition area are a set of values related to the experimental conditions. These include the basic parameters spectrometer type, incident energy, chopper type, frequency and temperature. A set of more detailed parameters, associated with the experimental conditions, can be defined in the “Advanced” panel which is brought up by clicking on the Advanced button. This gives the Window shown in Figure 3.

Figure 3 Advanced Panel
Fig 3 - View of Advanced Panel

The parameters in this window are less likely to be altered by the general user. Note that both the Advanced and basic parameters are specific to a given run, and all data sets within the run will use the same values. Data sets with differing parameters should be placed in separate runs.

Any changes made in the advanced pop-up window do not take effect until the OK button is pressed. It is useful to close the pop-up either by using OK, if changes are to be kept or otherwise using Cancel.

If a spectrometer and/or chopper that is not in the list of available types is being used then the custom type of these can be selected in the runs tab and the actual details entered in the advanced pop-up.

Data range selection

The box in the lower lefthand corner of the runs tab allows the user to select which portions of each cut and slice data set will actually be used in fitting. This allows the exclusion of data from bad detectors and others artifacts in the input data. There are two input areas, the first to define data to keep, while the second defines data to remove, typically only one of these may be needed.

Figure 4 Advanced Panel
Fig 4 - View slice with keep(red) and remove(yellow) areas

The selection applies to the currently defined run and data set, so these need to be set first. For a cut the data ranges to keep and remove are defined by pairs on numbers giving ranges along the X-axis. For example, 0.3,0.85;0.9,1.1; represents all points with either 0.3<x<0.85 or 0.9<x<1.1. Such strings can be entered by typing them into the keep or remove boxes. Alternatively, and more easily, the keep and remove ranges can be entered graphically by clicking on the appropriate add button. This will bring up a graphics window with a plot of the cut data. By left clicking on a point in the plot window and then dragging the resulting rubber band box, keeping the mouse button pressed, a area of data to keep or remove can be defined. Note that the height of the defined box is irrelevant in the cut case and when you release the mouse button a box is drawn at full hight of the data. The selected data range is shown in the keep of remove text box.

For a slice the range removal and selection is based on rectangular regions defined by four data points as xmin,xmax,ymib,ymax;. Again these may be entered by typing in the text boxes, or more easily via the graphics window created by clicking on the appropriate add button. The rubber band input method works in a similar manner to that for cuts except that the height of the rectangle is now important.

Keep areas are drawn with a red boundary while remove areas have a yellow boundary.

Integration Methods tab

This tab simply controls the particular integration method to be used and the parameters associated with it. The computational run time increases with the more complex methods, higher iteration counts and lower tolerances. The accuracy of the simulations also improves with more correct integration methods. The Integration panel view is shown in Figure 5.

Integration tab
Fig 5 - View of the Integration Methods tab

The default integration parameters for a method can be selected by the Load Defaults button. If you are using an existing TFT file and change the integration method you will get the parameters set for that method in the TFT file, which may not be sensible.


Simulation tab

The simulation tab is used to submit simulation jobs to either a grid enabled system or to the local machine. It can only be used when one or more data sets have been defined along with the required parameter values. The simulation tab is shown in Figure 6. The three buttons to control job submission are:

  • Do Simulate – this will submit the current data for simulation. A new pop window appears that asks you which resource to submit the job to and the number of processors to use. The destination can be any of the named grid resources or the local processor. When OK is selected the job will be submitted and the current status reported in the table below the submit button. The status field does not automatically update.
  • Query – As noted above, the job status does not automatically update, so to check the progress of jobs you must press the query button. There is no need to select a particular job when doing a query as it will check all jobs. Job status will be updated in the table, the typical sequence is Submitted, Active, Completed. Other possible states are Cancelled, Completed-err and Failed. The cancelled state arises from the use of the cancel button (see below). Completed-err indicates that the job ran but some of the expected output files were not produced. Check the Output and Error files to see if these contain more information. A job Failed message indicates a problem with the set up of the remote system. Grid jobs are often placed in a batch queue and if this is busy they can stay in the Submitted state for some time.
  • Cancel – This can be used to cancel a submitted job. To use it, it is first necessary to select the job to be deleted by clicking on the select box of the job to be cancelled. It is not possible to cancel a job after it is completed.
Simulation tab
Fig 6 - View of the Simulation tab

When a job has completed, a query will cause the data files of that job to be returned. These files can examined in the simulate tab. If you select a job that has status Completed, by clicking on the select box next to it, then the run log file will be displayed in the bottom text window. You can scroll through this window to check that the job ran correctly. The job information view drop-down list allows inspection of any error messages generated by the run, again displaying these in the bottom window.

Plotting of the returned simulation files can be done using the plot and plotover buttons. These work as described in the Runs-tab section. For cut files the line type, colour, msize and marker can be set using the drop-down lists provided. For spe and slice data these options do not apply, nor does plotover.

By default the data returned by the simulation is plotted. To compare this with the original data the drop down menu to the right of the file name can be used. This also allows plots of the residuals and the foreground and background components of the simulation. It can be useful to check that the background model is not providing an unexpected contribution of the signal, particularly when using more complex background models.

Fit tab

The fit tab (Figure 7) is very similar to the simulate tab described above. It allows job submission with least squares fitting of the data. This should be done only after one or more of the model parameters has been marked “clear” (i.e. free this parameter in the fitting process). If no parameters have been freed then an error is reported in the main Matlab window and the fit operation cancelled.

Fit tab
Fig 7 - View of the Fit tab

The fit tab has a button options that brings up a window to control details of the fitting process. This is a table of values that controls the fitting process. Variables that can be altered are:

  • step - this is the step size to be used for numerical differentiation. This step can be varied if there are problems in the fitting.
  • tolerence - stopping condition for Chi2 reduction
  • maxIter - the maximum number of iterations to use in the fit before giving up
  • stream - integer flag, 1 implies use the stream method in fitting, zero implies do not.
  • method - two radio buttons to select Quasi-Newton or Levenburq Marquadt method for the fitting.
  • maxdiv - limit on the number dividond to use,

Results from a fit can be viewed in the same way as results in the simulation tab. One additional button for the fit results is “Load Final TFT”. This causes the TFT file from the fit to be loaded into the GUI. This means that the newly fitted parameter values are displayed for the cross section model, etc., replacing the initial values. In addition the estimated error values of the fitted parameters are loaded into the GUI and displayed next to the actual values.

Loading an existing TFT file

A TFT file defines a set of data and parameter files that are to be used in a fit or simulation run. It also includes the currently selected models and parameter values that are to be used. These files can be generated by the original Tobyfit program or by the GUI version. Some example TFT files are included with this distribution. To load a TFT file use the “File menu” -> “Load TFT”. This will bring up a file browser window which can be used to select a TFT file. An example is demo.tft which can be found in the demo directory in the top level of the Tobyfit installation.

Having selected a TFT it is necessary to define a data directory. The convention used in TFT files is to specify file names using an environment variable, e.g. demo:cut1.cut, where the data file is cut1.cut and the environment variable name is demo. The value of the environment variable has to be set to the path of a local directory containing the data. You will be asked to provide the location of the data directory after you load a new TFT file. The program checks that all the data and parameter files that are referenced by the TFT file exist in the given directory.

The current version of Tobyfit will transfer the whole of this data directory and any subdirectories to the SRB and then onto the remote grid resource. Hence you should only place the data you are actually using in the data directory. Large unused files will slow down the transfers and can lead to timeouts in the parallel code.

Note that only one environment variable name is supported for a given TFT file. The file browser for the data directory starts in the same location as the TFT file was loaded from. If this is the same location as the data files (as for the demo examples), you can just click OK on the browser.

For running grid jobs it is necessary to transfer the data to the Storage Resource Broker (SRB) which was set up as part of the install process. The user is asked if they want to make this transfer when loading a new TFT file. This must be done the first time if grid resources are to be used. It may be skipped if you are sure the data directory has not changed since the last time you submitted this job to the grid. For local jobs you do not need to use SRB and if running in local only mode, you will not be asked about SRB.

Finally the user is asked if they wish to load history information about a previous run of the GUI. If you select yes here, a browser will open in the “history” subdirectory of the Tobyfit installation. History files are labelled by their date and time of creation, for example h20090915T1321mat. Loading a history file is will load information about the previous simulations and fittings of that session into the simulate and fit tabs.

After loading the demo.tft example the runs tab should appear as shown in Figure 2 with the two cut files, demo_a.cut and demo_b.cut listed in the data summary table. The runs tab can be used to plot the data of these two cases. By default the runs tab is set to run 1, data set 1, which corresponds to the first cut. The second cut in this case is stored as run 1, data set 2. You can switch between them using the “data set” drop down menu. In this case there is only one run, so selecting run 2 will show no data. To plot the currently selected cut, just click on “plot”. If you then select the other cut and do the same, the second data set will be drawn. To view both graphs on the screen at the same time, you can use the “Keep” option on the top of the first plot window to retain the view. The second plot will then be made in a new graphics window.

Simulation of data

Having loaded a TFT file, such as the demo.tft case above, it is possible to perform a simulation of the data. The TFT file will have defined both the data files to use, the cross section and background models along with the integration method. To run a simulation, go to the simulate tab and click on Do Simulate. This should bring up a job submission options window similar allowing the selecton of the resource and the number of processors to use.

The resource is a drop down list of grid machines available to you. This list is based on the contents of the file Resource.properties which is defined in the directory GaptkComputeToolbox/lib which is usually in the Matlab toolbox directory or in the Tobyfit installation directory. Only resources that are up and respond to your grid certificate will be shown, along with the local option. Windows users without a certificate will only see the choice Local with a default of two processors, since most machines now come with at least a dual core processor. It is not useful to request more processors than are available on your machine.

When you have selected a resource and a number of processors, accept the options by pressing OK. After a short delay the job should appear in the list of jobs with a status such as “ACTIVE” or “SUBMITTED”. Note that most grid resources use a batch system and if this is heavily loaded then your job will remain at the submitted stage until resources become free. If the status reports “FAILED” then there is some problem with your installation.

The job status field is only updated when you click on the “Query” button, so you may need to do this a few times until this (very short) job completes. This is indicated when the status changes to “COMPLETED” and the results files are returned. At this point you can click on the select box next to the new simulation and then inspect the results files, using the plotting options described in the section on the Simulate tab.

Parameter selection for fitting

It is possible to fit many different parameters using this interface. However it is not sensible to try to fit all possible values, since many are well defined by the experiment. Typically some of the parameters of the scattering model and the background will be freed. For the demo example the scattering model is number -111. To see the model name and a list of the parameters, move the cursor over the table in the cross section tab. After a moment a tool tip should appear giving the model name and a list of parameters. In this case you can free parameters 1,2,3,4,5,7.

Background model parameters are controlled in the runs tab. For the demo case local background models are used for each cut. To free the parameters for the first cut, select run 1, data set 1, then clear background parameters 1,2 and 3. Then select run 1, data set 2 and do the same again. If the cursor is left within the background table a tooltip will again give details of the name and the parameters of the currently selected model. You are now ready to fit the data.

Fitting and comparison with data

Having defined the data and the parameters to free, a fit job can be submitted by clicking the Do fit button in the fit tab. Again the user will be asked for the resource to use and the number of processors. The job will then be queued and run on the specified resource. If you select local the job will run directly on the localhost. The status of the job can be checked using the query button. When this changes to COMPELETED the data will be returned.

Fit plot
Fig 8 - Plot of fit (red), data (green) and background (blue) for demo example

A comparison of the data with the final fit for the first cut should give a graph like that in Figure 7. This was produced by selecting the job - click the select box in the fit tab table next to the completed run - and then clicking on the plot button, to show the fit in red. To compare this to the original data, select data, rather than the default fit in the right hand drop-down menu under plotting, then change the Line options to no line and green. Then press the plotover button. To see the background contribution to the overall fit, select the background component with a suitable line type and do another plotover to give a result as shown in Figure 8.

The parameter values of this fit can be loaded back into the GUI by clicking on the Load final TFT button. This will also fill in the parameter error values into the GUI. These values are also be displayed in bottom window of the fit tab when Output is selected in the Job information drop down list.

Building a new TFT file

It is sometimes easiest to use an existing TFT file to initialise the GUI and then modify the data and parameters as necessary to a new data set. If a suitable starting TFT is not the available, then the data fields can be set up by the user starting from scratch. To do this it is necessary to do:

  • Enter all data files and associated parameters in the runs tab and set the environment variable name for the first data file.
  • Set the associated run values for each data set. This includes the spectrometer, the incident energy, chopper and temperature in the runs tab. Then add the values required in the advanced parameters box.
  • Select the model to use in the cross section box along with the Ion value, sharp/broad flag and initial parameter values. If new scattering or background models are required these should be added as described in 2.9.
  • Set the required integration model in the Integration methods tab.
  • Save the newly defined TFT file for future reference. Note that the GUI saves a TFT file in an extended format. This is backwards compatible with the previous format but contains additional data fields which are only recognised by the GUI.
  • Submit a simulation job to test the definition. If the job fails, inspect the returned output files for any error messages.

History of previous runs

As mentioned in the description of loading TFT files, history information of a session is saved when you exit a Tobyfit session. This save happens when you select “Exit” in the File menu. It does not occur if you exit the program by killing the window.

The data of all active runs is saved to a .mat file in the directory “history” under the Tobyfit installation directory. The file name is given by “h” followed by the date and time of the file creation. The history can be reloaded when reading a TFT file. This allows previous simulations and fits to be viewed in the simulate and fit tabs.

Adding new scattering/background models

Model definitions

One of the major updates that a user may need to make for the analysis of new experiment is the inclusion of a new scattering and/or background models. A set of models is distributed with the GUI and the names of these can be seen by using the drop down menus in the cross section and background windows to select a model number and then wait for the tooltip to appear over the parameters table. To find definitive details of the implementation of these models the user can inspect the Fortran files in the directory tf_models_user located in the installation directory.

To add a new scattering or background model to Tobyfit it is necessary to edit the appropriate files in the directory tf_models_user and then rebuild the server programs using these new models. The models are written in Fortran fixed format, but allowing at least Fortran 95 features. There are three existing subroutines in the above directory that implement a basic set of user models. These return respectively:

  • sqw_broad: S(\bold Q , \omega) for damped dispersion relations or broad scattering functions
  • sqw_sharp: A(\bold{Q}) and \omega_{D}(\bold{Q}) in S(\bold{Q},\omega) = A(\bold{Q})\delta(\omega - \omega_D(\bold{Q})) for a single sharp dispersion relation
  • background: Background intensity.

Details of the parameters and return values are given in Appendix A. The user should ensure the modified routines they use work correctly before including them into this version of Tobyfit, since the server will compile the new routines without any checking for array bound errors, unassigned variables, etc.

Building new models

After editing and testing the new versions of the Fortran functions it is necessary to rebuild them on all the server machines that you will be using. To do this the Tobyfit GUI must be running. There are two ways to perform a rebuild, from the Matlab command line or from the File menu.

From the command line you can use the command tobyfit_update_models. This can take an optional argument of the name of the resource to update, otherwise all available resources are updated. For example to just update the models on the local host you can use the command: tobyfit_update_models('localhost').

From the File menu you can select the option Update models which will attempt to send the new Fortran routines to all available hosts (local as well as grid) and build them there. Details of the progress in compilation are shown on the Matlab command line.

The output of the compilations will be returned to the directory tf_make_logs, under the installation directory. You should check these files for any problems with the compilation before attempting to use the new models.

Using the new models

Note that labels of the new model's name and parameters are only read by the GUI on start up (see Appendix A for details of how these names are included in the Fortran). Hence if you have edited the files after starting the GUI it is necessary to stop and restart the GUI to make the new model numbers visible in the drop down menus.

You should perform simulation tests with known values for the new models to ensure that they are working correctly. When this is complete the new models can be used as any other models in fitting data.


Examples of using Tobyfit

Example 1 – using the GUI with cuts

Example 2 – using the GUI with mixed data files

References

  1. TOBYFIT version 2.0 - Least-Squares Fitting to single crystal data on HET, MARI and MAPS, T.G.Perring (Oct 2000). Available from here.
  2. Information on Isis excitations group and instruments is available here.
  3. Globus Toolkit details available here.
  4. Mslice documentation is available here.

Appendices

Appendix A: user scattering functions

Appendix B: integration methods

Appendix C: calculation of the magnetic form factor

Appendix D: technical FAQ

Personal tools