PICOcode.DataHandling
- class Event(rundirectory, eventnum, *args, data_series=None, no_err=True, verbose=True)
Load raw data from a PICO event.
Data is loaded from files in rundirectory and/or rundirectory/eventnum. Which data is loaded depends on the loadoptions argument. Each property has at minimum the loaded attribute, which indicates whether it was successfully loaded.
- Parameters:
- rundirectorystr
May be either the run ID if the run data is in a known location (pointed to by the PICOcode.conf file), or the full path to the run data.
- eventnumint or str
The event number for which data is being requested.
- *argstuple of str
Comma-separated optional arguments which specifies the data being requested. Minimum one required. May include any of the following:
event
fastDAQ
slowDAQ
temperature
PLC
DAQsettings
rundata
camdata
images
- data_series{“40l-19-data”, “30l-16-data”, “2l-16-data”}
The name of the data series. Used when searching for data when rundirectory is not a full path.
- no_errbool, default=False
Whether to suppress errors. Mainly useful during processing, when an error may disrupt all other processing.
- verbosebool, default=True
Whether to print extra information when loading data.
Examples
>>> event = Event("20200721_0", 22, 'fastDAQ', 'slowDAQ') # The following accomplishes the same thing. >>> event = Event("20200721_0", 22, ['fastDAQ', 'slowDAQ']) >>> event.slowDAQ.loaded True >>> event.fastDAQ.loaded True >>> event.PLC.loaded False
>>> import matplotlib.pyplot as plt >>> plt.plot( event.slowDAQ.elapsed_time, event.slowDAQ.PT4 ) >>> plt.show()
- Attributes:
- runIDstr
The name of the run.
- eventnumint
The event number within the run.
- rundirectorystr
The directory in which the run data was found. Several locations are checked.
- data_seriesstr
Name of the data series. Should be of the form ‘30l-16-data’ or ‘40l-19-data’.
- event
Property
Info about the event, e.g. livetime, pressure setpoint, etc.
- fastDAQProperty
Data collected by the fastDAQ system, contained in fastDAQ_?.bin files. Includes piezo and Dytran signals.
- slowDAQProperty
Data collected by the pressure cart PLC, contained in the slowDAQ.txt file. Includes signals from pressure and position transducers.
- temperatureProperty
Data collected by the temperature PLC, contained in the temperature.txt file. Includes data from the RTDs and chillers.
- PLCProperty
Data from the pressure cart PLC, which has been logged by the main DAQ via modbus. The logging here is slower than that recorded by the slowDAQ attribute.
- DAQsettingsProperty
Reads the DAQ30l_Setup.xml file, which contains data about the settings for the run, e.g. run type, compression time between events, etc.
- rundataProperty
Reads the runID.txt file in the data directory, which contains data about the run.
- camdataProperty
Currently unimplemented.
- imagesProperty
Load images into memory.
- LoadReconFile
alias of <module ‘PICOcode.DataHandling.LoadReconFile’ from ‘/home/pico/Scripts/picocode-docs/PICOcode/PICOcode/DataHandling/LoadReconFile.py’>
- PICOcode.DataHandling package
- Submodules
- PICOcode.DataHandling.BinaryData module
- PICOcode.DataHandling.BinaryLUT module
- PICOcode.DataHandling.GetEvent module
- PICOcode.DataHandling.LoadReconFile module
- PICOcode.DataHandling.Loaders module
- PICOcode.DataHandling.Utilities module
- PICOcode.DataHandling.XMLhelper module
- PICOcode.DataHandling.config module
- PICOcode.DataHandling.write_reconfile module
- Module contents