Data loading
Loading user data
- EVA.core.data_loading.load_data.load_comment(run_num, file_path)
Loads data from comment.dat at specified path.
- Parameters:
run_num (
str
) – run number to read forfile_path (
str
) – path to comment file
- Return type:
tuple
[list
[str
],int
]- Returns:
Returns a list containing [start time, end time, number of events, full comment str] and an integer success flag. If no data was found, the list will be equal to
[" ", " ", " ", " "]
.
- EVA.core.data_loading.load_data.load_run(run_num, working_directory, energy_corrections, normalisation, binning)
Loads the specified run by searching for the run in the working directory. Creates Spectrum objects to store data from each detector. Calls load_comment() to get run info and stores metadata and lists of Spectrum objects (for each detector) in a Run object. Calls normalise() and energy_correction() to normalise the data and stores the normalised data under run.data.
- Parameters:
run_num (
str
) – run number to load forconfig – Config object
- Return type:
tuple
[Run
,dict
]- Returns:
Returns a tuple containing the Run object and a dict containing error status, with keys
no_files_found
,comment_not_found
,norm_by_spills_error