This 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.
The syntax for multi file loading involves the use of several context-sensitive operators. Here is a run-down of those operators with some simple examples:
Name | Usage | Description | Example Input | Example Result |
---|---|---|---|---|
List | <run>,<run> | Used to list runs | INST1,2,3.ext | Load and sum runs 1, 2 and 3 |
Plus | <run>+<run> | Used to specify which runs that are to be loaded and then summed together | INST1+2+3.ext | Load and sum runs 1, 2 and 3 |
Range | <run>:<run> | Used to specify a range of runs to load | 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 | INST1:5:2.ext | Load runs 1, 3 and 5 |
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 then 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 then sum runs 1, 3 and 5 |
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')
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]) -> 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 string. For some property types, e.g. Workspaces, it is useful to be able to refer to the string value directly
Category: Concepts