Table of Contents
This user interface allows for batch processing of data reduction for reflectometry data. The actual data reduction is performed with ReflectometryReductionOne. Wherever possible, this interface attempts to use reasonable defaults, either loaded from the instruments’ parameter files, or calculated from the provided data, to minimise the amount of user input required. This interface also strives to be transparent, making it clear how your data is being processed, and easy to adjust any of the options used.
Integration with data archives is also provided, allowing for data to be located and prepared for reduction automatically.
IPython notebooks which document the processing steps and output relevant plots can also be produced from the interface.
Information on how to resolve common problems can be found in the Troubleshooting section of this document.
To follow this example you will need the ISIS reflectometry example materials:
These can be downloaded as part of the ISIS example data.
Once they are downloaded, place the nxs files in one of Mantid’s user directories. To see a list of directories, click on File -> Manage User Directories. INTER_NR_test2.tbl can be saved anywhere you like, as long as you know where it is.
Open MantidPlot, and open the ISIS Reflectometry (Polref) interface. Interfaces -> Reflectometry -> ISIS Reflectometry (Polref)
Within the interface, we first want to import the tbl file as a TableWorkspace. To do this, click on Reflectometry -> Import .TBL. A LoadReflTBL dialog will open. Select INTER_NR_test2.tbl as the file, and enter MyTable as the output workspace.
A table workspace called MyTable should now exist in the ADS (Analysis Data Service). To open the table workspace go to Reflectometry -> Open Table -> MyTable. The processing table (shown below) should now contain four rows (13460, 13462, 13469, 13470).
Let’s process the first group, which consists of the first two rows of the table (13460 and 13462). The simplest way to do this is simply to select the two rows we want to process, and then click on Process.
Tip
If you receive an error, consult the Troubleshooting section of this document for guidance on fixing it.
You should now have eleven workspaces in the ADS.
Amongst them should be:
The processing table is where the bulk of the work takes place. It is used to specify which runs to process, the properties that should be used to process them, and how the different runs should be joined together.
Each row represents a single reduction (i.e. execution of ReflectometryReductionOne). Rows may be grouped together by setting their Group column to the same value. Rows that are grouped together will have their output stitched together using Stitch1D.
Above the processing table is a tool bar containing various actions for manipulating the processing table.
Below the table is a progress bar, which shows the current progress of any processing that is in progress. And at the bottom, near the Process button is the processing instrument selector. The processing instrument is used to help identify the correct data to load when processing runs.
Next to the Process button there is a checkbox which allows enabling and disabling output to an ipython notebook. If the checkbox is enabled, a dialog window will ask for a save location for the notebook after processing is complete. A generated notebook contains python code to repeat the processing steps and output relevant plots.
This table details the behaviour of the actions in the tool bar, from left to right.
Action | Effect |
---|---|
Process | Processes the selected runs, or, if no runs are selected, all of the runs in the table. |
Expand Selection | Expands your selection such that any rows in the same group as a row you have selected are added to your selection. |
Plot Selected Rows | Creates a plot of the IvsQ workspaces generated by any of the selected rows. |
Plot Selected Groups | Creates a plot of the stitched IvsQ workspaces generated by any of the selected groups. |
Insert Row | Adds a new row after the first selected row, or at the end of the table if no rows are selected. |
Delete Row | Deletes any selected rows. If no rows are selected, nothing happens. |
Group Rows | Takes all the selected rows and places them in a group together, separate from any other group. |
Copy Rows | Copies the selected rows to the clipboard. In the clipboard, each column’s value is separated by a tab, and each row is placed on a new line. |
Cut Rows | Copies the selected rows, and then deletes them. |
Paste Rows | Pastes the contents of the clipboard into the selected rows. If no rows are selected, new rows are inserted. |
Clear Rows | Resets the cells in any selected rows to their initial value, in other words, blank. |
Help | Opens this documentation for viewing. |
What’s This | Provides guidance on what various parts of the interface are for. |
Column Title | Required? | Description |
---|---|---|
Run(s) | Yes | Contains the sample runs to be processed. Runs may be given as run numbers or workspace names. Multiple runs may be added together by separating them with a ‘+’. Example: 1234+1235+1236 |
Angle | No | Contains the angle used during the run, in degrees. If left blank, this is set to the last value for THETA in the run’s sample log. If multiple runs were given in the Run(s) column, the first listed run’s sample log will be used. Example: 0.7 |
Transmission Run(s) | No | Contains the transmission run(s) used to normalise the sample runs. To specify two transmission runs, separate them with a comma. If left blank, the sample runs will be normalised by monitor only. Example: 1234,1235 |
Q min | No | Contains the minimum value of Q to be used in Å−1. Data with a value of Q lower than this will be discarded. If left blank, this is set to the lowest Q value found. This is useful for discarding noisy data. Example: 0.1 |
Q max | No | Contains the maximum value of Q to be used in Å−1. Data with a value of Q higher than this will be discarded. If left blank, this is set to the highest Q value found. This is useful for discarding noisy data. Example: 0.9 |
dQ/Q | No | Contains the resolution used when rebinning output workspaces. If left blank, this is calculated for you using the CalculateResolution algorithm. Example: 0.9 |
Scale | Yes | Contains the factor used to scale output IvsQ workspaces. The IvsQ workspaces are scaled by 1/i where i is the value of this column. Example: 1.0 |
Group | Yes | Contains the group number used for stitching output workspaces. The value of this column determines which other rows this row’s output will be stitched with. All rows with the same group number are stitched together. |
Options | No | Contains options that allow you to override ReflectometryReductionOne’s properties. To override a property, just use the property’s name as a key, and the desired value as the value. Options are specified in key=value pairs, separated by commas. Values containing commas must be quoted. Example: StrictSpectrumChecking=0, RegionOfDirectBeam="0,2", Params="1,2,3" |
To search for runs, select the instrument the runs are from, enter the id of the investigation the runs are part of, and click on Search.
In the table below, valid runs and their descriptions will be listed. You can then transfer runs to the processing table by selecting the runs you wish to transfer, and click the Transfer button. You can also right-click on one of the selected runs and select Transfer in the context menu that appears.
Description based search transfer uses the descriptions associated with raw files from the experiment.
If a run’s description contains the text in 0.7 theta, or th=0.7, or th:0.7, then the interface will deduce that the run’s angle (also known as theta), was 0.7, and enter this value into the angle column for you. This holds true for any numeric value.
When multiple runs are selected and transferred simultaneously, the interface will attempt to organise them appropriately in the processing table. The exact behaviour of this is as follows:
Measure based search transfer uses the log-values within nexus files from the experiment to assemble the batch. Since the files themselves are required, not just the overview metadata, the files must be accessible by mantid. One way of doing this is to mount the archive and set the user property icatDownload.mountPoint to your mount point. It may end up looking something like this icatDownload.mountPoint=/Volumes/inst$. Alternately, you can download the files to your local disk and simply add that directory to the managed search directories in Manage User Directories.
When transferring a run from the Search table to the Processing table there may exist invalid runs. For example, if a Measure-based run has an invalid measurement id. In the image below we select two runs from the Search table that we wish to transfer to the processing table.
Attempting to transfer an invalid run will result in that run not being transferred to the processing table. If the transfer was not successful then that specific run will be highlighted in the Search table.
Hovering over the highlighted run with your cursor will allow you to see why the run was invalid.
Through the options menu, a small number of options may be configured to adjust the behaviour of the interface.
To open the options menu, click on Reflectometry -> Options.
Name | Description |
---|---|
Warn when processing all rows | When the Process button is pressed with no rows selected, all rows will be processed. If this is enabled, you will be asked if you’re sure you want to process all rows first. |
Warn when processing only part of a group | If this is enabled and you press Process with only a subset of a group’s rows selected, you will be asked if you’re sure you that’s what you intended to do. |
Warn when discarding unsaved changes | If this is enabled and you try to open an existing table, or start a new table, with unsaved changes to the current table, you will be asked if you’re sure you want to discard the current table. |
Rounding | When a column is left blank, the Reflectometry interface will try to fill it with a sensible value for you. This option allows you to configure whether the value should be rounded, and if so, to how many decimal places. |
This occurs when Mantid is unable to load a run. If the run was given as a workspace name, check the spelling. If the run was given as a number, check that the run number is correct. If the run number is incorrect, check the number given in the Run(s) or Transmission Run(s) columns. If the run number is correct, check the instrument named in the error message is correct. If the instrument is incorrect, check that the processing instrument selector (at the bottom right of the interface) is correct.
If the run still isn’t loading check Mantid’s user directories are set correctly, and that the desired run is in one of the given directories. To manage the user directories, open File -> Manage User Directories.
This occurs when the contents of the options column are invalid. Key value pairs must be given in the form key = value, and if the value contains commas it must be quoted, like so: key = "v,a,l,u,e".
Stitching is controlled by the group a row is in. For stitching to occur, the rows must be in the same group, and be processed simultaneously.
An easy way to check the runs are in the same group is to select one of the rows you want stitched, and then in the menu bar select Edit -> Expand Selection. All the rows in that group will be selected. If you have another row that you would like to add to the group, you can do this easily by adding it to the selection, and then in the menu bar selecting Edit -> Group Selected.
Categories: Interfaces | Reflectometry