This is a Python binding to the C++ class Mantid::API::MultipleFileProperty.
Multiple file loading allows users to specify lists / ranges of files to load (and optionally sum together) into Mantid.
This functionality is offered via the Filename property of Load v1, and so is available by calling the algorithm or by using the LoadDialog window in the usual way. IntArrayProperty accepts similar syntax for specifying ranges.
The syntax for multi file loading involves the use of several context-sensitive operators. Here is a run-down of those operators in order of descending precedence with some simple examples:
Precedence | Name | Usage | Description | Example Input | Example Result |
---|---|---|---|---|---|
1 | Added Range | <run>-<run> | Used to specify a range of runs that are to be loaded and then summed together | INST1-4.ext | Load and sum runs 1, 2, 3 and 4 |
Stepped Added Range | <run>-<run>:<step_size> | Used to specify a ‘’stepped’’ range of runs that are to be loaded and then summed together | INST1-5:2.ext | Load and sum runs 1, 3 and 5 | |
Range | <run>:<run> | Used to specify a range of runs to load. Cannot be summed | INST1:4.ext | Load runs 1, 2, 3 and 4 | |
Stepped Range | <run>:<run>:<step_size> | Used to specify a ‘’stepped’’ range of runs to load. Cannot be summed | INST1:5:2.ext | Load runs 1, 3 and 5 | |
2 | Plus | <run>+<run> | Used to specify which runs or added ranges are to be loaded and then summed together | INST1+2+3.ext | Load and sum runs 1, 2 and 3 |
3 | List | <run>,<run> | Used to list runs, ranges or sums | INST1,2,3.ext | Load runs 1, 2 and 3 |
Some information relating to the files can be left out, and the algorithm will attempt to fill in the details:
The basic syntax outlined above can be combined in a variety of ways:
# Loads the Raw files 1, 2, 3, and 4 for TOSCA, but sums together runs 3 and 4.
Load(Filename='TSC1,2,3+4.raw', OutputWorkspace='Files')
# Loads the Raw files 1, 2 and 3 for TOSCA and 4, 5 and 6 for IRIS.
# The IRIS runs are added together.
Load(Filename='TSC1:3.raw,IRS4-6.raw', OutputWorkspace='Files')
# For TOSCA, adds together run 1 (found in c:/files/) and run 2 (found in c:/store/).
Load(Filename='c:/files/TSC1.raw+c:/store/TSC2.raw', OutputWorkspace='Files')
# For TOSCA, adds together runs 1, 4, 5 and 6.
Load(Filename='TSC1+4-5.raw', OutputWorkspace='Files')
# For IRIS, adds together runs 1, 2, 3, 7, 8 and 9.
Load(Filename='IRS1-3+7-9.raw', OutputWorkspace='Files')
When you load a range of files from the Load Dialog and then reopen the dialog, the files that were loaded previously will now appear in a comma and plus separated list of fully resolved filenames.
bases: mantid.api.VectorVectorStringPropertyWithValue
__init__( (object)arg1, (str)name, (int)action [, (object)extensions=None [, (bool)allow_empty=False]]) -> object
A list of allowed values
Input, Output, InOut or Unknown. See the Direction class
The property’s doc string
Get the default value as a string
Return the ‘group’ of the property, that is, the header in the algorithm’s list of properties.
Is the property set at the default value
An empty string if the property is valid, otherwise it contains an error message.
The name of the property
Return the object managing this property’s settings
Returns a string identifier for the type
The units attached to this property
The value of the property as a formatted string. If maxLength is defined then the output may not contain the full contents of the property. The maxLength and collapseLists arguments do not work for all property types
The value of the property as a string. For some property types, e.g. Workspaces, it is useful to be able to refer to the string value directly
Category: Concepts