Skip to content
Snippets Groups Projects
RetrieveRunInfo-v1.rst 2.18 KiB
Newer Older
.. algorithm::

.. summary::

.. alias::

.. properties::

Description
-----------

Strips the log property values of "inst\_abrv", "run\_number",
"user\_name", "run\_title" and "hd\_dur" from the specified run files,
and compiles a TableWorkspace of the result.

Uses multiple calls to
:ref:`algm-CreateLogPropertyTable` create the final
result table.

.. figure:: /images/ConvertToEnergyInfoTable.png
   :alt: Output workspace generated by inspecting runs 12218-12229 and having the default instrument set to TOSCA.

   Output workspace generated by inspecting runs 12218-12229 and having
   the default instrument set to TOSCA.
Limitations
-----------

Currently, only ISIS instruments with runs that have the *full* list of
log properties are supported.
:ref:`algm-CreateLogPropertyTable` is available to
those users who wish to "brew their own" version of this algorithm.

Usage
-----

**Example - Creating an Information Table For a Single Run**

.. include:: ../usagedata-note.txt

.. testsetup:: ExSingleRun

   old_inst = config['default.instrument']
   old_facility = config['default.facility']

.. testcode:: ExSingleRun

   # The algorithm takes note of your default facililty/instrument.
   # You can change these settings in the interface, or change them
   # programmatically as follows:
   config['default.instrument'] = 'IRIS'
   config["default.facility"] = "ISIS"

   # Get the information for IRIS runs 21360 and 26173.
   info_table = RetrieveRunInfo(Runs="IRS21360,IRS26173")
   print("The table contains information about {} runs.".format(info_table.rowCount()))
Brandon Hewer's avatar
Brandon Hewer committed
   print("The first has run number {}.".format(info_table.cell("run_number", 0)))
   print("The second has run number {}.".format(info_table.cell("run_number", 1)))
   print("The title of the second run is \"{}.\"".format(info_table.cell("run_title", 1).strip()))
.. testcleanup:: ExSingleRun

   config['default.instrument'] = old_inst
   config['default.facility'] = old_facility

Output:

.. testoutput:: ExSingleRun

   The table contains information about 2 runs.
   The first has run number 21360.
   The second has run number 26173.
   The title of the second run is "Vanadium cylinder standard   PG002."