$$\renewcommand\AA{\unicode{x212B}}$$

## Summary¶

Load log data from within Muon Nexus files into a workspace.

## Properties¶

Name

Direction

Type

Default

Description

Workspace

InOut

MatrixWorkspace

Mandatory

The name of the workspace to which the log data will be added.

Filename

Input

string

Mandatory

The filename (including its full or relative path) of the Muon Nexus file.

## Description¶

The Algorithm is very similar to LoadLog v1, except that the source of the data is a Muon Nexus file.

LoadMuonLog loads all the time series logs in the top level of a muon Nexus file (version 1). These are NX_LOG entries under the main NX_ENTRY (usually called run). Each entry is added to the given workspace’s run object as a time series property.

These logs are various time series properties added to the file by SECI. They include magnetic fields, temperatures, status codes, count rate and beam logs. (In version 2 muon Nexus files, these are incorporated into the Nexus definition instead).

In the file, times are stored relative to the Unix epoch. The algorithm corrects these relative to the start time of the run (run/start_time) before adding the properties to the workspace.

The algorithm also sets the workspace’s sample name from the Nexus file (run/sample/name).

### Parent Algorithm¶

LoadMuonLog is also a child algorithm of LoadMuonNexus v1, i.e. it gets called whenever LoadMuonNexus (version 1) is executed.

## Usage¶

Note

# Create a dummy workspace and load in the log data from a file.
fake_musr_ws = CreateSampleWorkspace()

# Extract a property from the log.
time_series_prop = fake_musr_ws.run().getLogData("BEAMLOG_FREQ")

print("BEAMLOG_FREQ is a TimeSeriesProperty with {} entries.".format(time_series_prop.size()))
print("The first entry is {:.6f}.".format(time_series_prop.firstValue()))


Output:

BEAMLOG_FREQ is a TimeSeriesProperty with 10 entries.
The first entry is 50.000000.


Categories: AlgorithmIndex | DataHandling\Logs | Muon\DataHandling