Package: icolyzer
ICOlyzerAuxiliary set of tools to analyze data from theICOtronic system:ICOplotter: Visualize data and calculate signal to noise ratioICOanalyzer: Measures packet lossICOconverter: Convert HDF5 measurement files into other formatsRequirementsPythonSetup InstructionsInstallYou can install the latest version of the tools fromPyPIusing the command:pipinstallicolyzerTo install the latest development version use:pipinstall--upgradegit+https://github.com/mytoolit/ICOlyzerRemovepipuninstall-yicolyzerICOplotterMeasures signal to noise ratio (SNR) value of a measurementOpens a plotter window visualizing the recorded signalPlots the power spectral density graph for the recorded signalPrints the IFT value of the signalAdds optional red lines for time periods containing missing data valuesUsageThe ICOplotter script looks for alog.hdf5file in the current working directory by default. After using the command:icoplotterthe script will load this file and open the graph of the recording:The calculated SNR will be written to the standard output.SNR:
  X: -106.50 dB @ 9.40 kHzWith closing the plotter the script will finish and the command line will be ready for a new command. For running the script with another input-file use one of the parameters described below.Positional ParametersFilepathTo change the HDF filepath fromlog.hdf5in the current working directory, please specify the filepath as positional argument.Example:icoplotterHDF5/log-x.hdf5Optional Parameters-h,--helpPrints the help menu of the command-l,--lossHighlight periods containing lost data using red lines:-p,--printStore the plotter output as PDF file instead of displaying it on the screen. The output is stored in the same location as the the input file with the extension.pdf.-s,--scatterUse a scatter plot (instead of a line plot) to visualize the measurement dataICOanalyzerMeasures packet-loss of the recorded signalPrint number of sample points/channelMeasures how many datapoints are outside of a given minimum and maximum valuePrints warnings about long durations (more than 1 second) between consecutive timestampsUsageThe ICOanalyzer script looks for the filelog.hdf5in the current working directory (usually this will be the root of this repository) by default. After you use the command:icoanalyzerthe script will run and analyzelog.hdf5. The script will then list the packet loss and values outside of the given range (default is -1g and 1g):Input: log.hdf5
Packet Loss: 0.61%
Data Points:
  X-Axis: 282021 Samples - 127772 Samples were over 1g or below -1g (45.31%)
Measurement Date: 2021-12-20T11:00:21.489537
Runtime: 29.996 secondsIf you want to change the file the script analyzes or the minimum and maximum values you have to provide some extra parameters. Using multiple parameters is also possible.Parameters-h,--helpThis argument calls the help menu of the script instead of running the script.FilepathWith theinputpositional parameter:icoanalyzerexamples/log-xz.hdf5you can change the file the script analyzes:Input: examples/log-xz.hdf5
Packet Loss: 24.67%
Data Points:
  X-Axis: 106992 Samples - 106992 Samples were over 1g or below -1g (100.0%)
  Z-Axis: 106992 Samples - 106992 Samples were over 1g or below -1g (100.0%)
Measurement Date: 2022-01-03T07:52:29.573573
Runtime: 29.993 secondsThe tool also supports multiple input files. For example, if you want to analyze all.hdf5files in the current directory, then you can use the following command:icoanalyzer*.hdf5-d,--detailsWith-d:icoanalyzer-dyou can activate a more detailed information about the packet loss:Input: log.hdf5
 64 Packets lost after  2.979 seconds - No values for 0.3 milliseconds
 64 Packets lost after  3.274 seconds - No values for 0.3 milliseconds
 64 Packets lost after  7.089 seconds - No values for 0.3 milliseconds
 64 Packets lost after 11.192 seconds - No values for 0.3 milliseconds
 64 Packets lost after 16.931 seconds - No values for 0.3 milliseconds
 64 Packets lost after 22.149 seconds - No values for 0.3 milliseconds
 64 Packets lost after 22.782 seconds - No values for 0.2 milliseconds
 64 Packets lost after 25.781 seconds - No values for 0.3 milliseconds
 64 Packets lost after 29.623 seconds - No values for 0.2 milliseconds
Packet Loss: 0.61%
Data Points:
  X-Axis: 282021 Samples - 127772 Samples were over 1g or below -1g (45.31%)
Measurement Date: 2021-12-20T11:00:21.489537
Runtime: 29.996 secondsNot only will it show the percentage of data loss for the file, it will now also show how many packets were lost in each packet loss event.-m,--minWith "-m VALUE" you can change the minimal value for datapoints to be checked. All values below this parameter will be counted as out of the borders.-v,--maxWith "-v VALUE":icoanalyzer-m-0.42-v2.55you can change the maximum value for datapoints to be checked. All values above this parameter will be counted as out of the borders.Input: log-x.hdf5
Packet Loss: 0.61%
Data Points:
  X-Axis: 282021 Samples - 269420 Samples were over 2.55g or below -0.42g (95.53%)
Measurement Date: 2021-12-20T11:00:21.489537
Runtime: 29.996 secondsICOconverterConverts HDF5 measurement files (.hdf5) into.csv(Comma-Separated Values) or.xlsx(Excel) filesUsageThe ICOconverter script looks for the filelog.hdf5in the current working directory by default. After you use the command:icoconverterthe script will run and analyzelog.hdf5. The script will then convert the .hdf5 file and createlog.csvand save it into the same directory. Attention: When there is already an file with the name of the converted .csv it will be overwritten.> icoconverter
Starting the conversion process
Converting “log.hdf5” to “log.csv”
Finished the conversion processIf you want to change the file the script converts or the format it should convert to you have to provide some extra parameters. Using multiple parameters is also possible.Parameters-h,--helpThis argument calls the help menu of the script instead of running the script.FilepathWith theinputspositional parameter you can change the file the script converts.icoconverter ~/Downloads/log.hdf5
Starting the conversion process
Converting “/Users/rene/Downloads/log.hdf5” to “/Users/rene/Downloads/log.csv”
Finished the conversion processThis path can be given as a relative or an absolute path. If the given path is a folder the script will convert ALL .hdf5 files inside the given folder.icoconverter ~/Downloads/TEST-LOGS-HDF5
Starting the conversion process
Converting “/Users/rene/Downloads/TEST-LOGS-HDF5/log-z.hdf5” to “/Users/rene/Downloads/TEST-LOGS-HDF5/log-z.csv”
Converting “/Users/rene/Downloads/TEST-LOGS-HDF5/log-xy.hdf5” to “/Users/rene/Downloads/TEST-LOGS-HDF5/log-xy.csv”
Converting “/Users/rene/Downloads/TEST-LOGS-HDF5/log-xyz.hdf5” to “/Users/rene/Downloads/TEST-LOGS-HDF5/log-xyz.csv”
Converting “/Users/rene/Downloads/TEST-LOGS-HDF5/log-xz.hdf5” to “/Users/rene/Downloads/TEST-LOGS-HDF5/log-xz.csv”
Converting “/Users/rene/Downloads/TEST-LOGS-HDF5/log-x.hdf5” to “/Users/rene/Downloads/TEST-LOGS-HDF5/log-x.csv”
Converting “/Users/rene/Downloads/TEST-LOGS-HDF5/log-yz.hdf5” to “/Users/rene/Downloads/TEST-LOGS-HDF5/log-yz.csv”
Converting “/Users/rene/Downloads/TEST-LOGS-HDF5/log-y.hdf5” to “/Users/rene/Downloads/TEST-LOGS-HDF5/log-y.csv”
Finished the conversion process-e,--excelWith "-e" you can change the format the script converts to to excel sheets. Instead of .csv it now creates .xlsx files.icoconverter ~/Downloads/*.hdf5 -e
Starting the conversion process
Starting the conversion of: /Users/rene/Downloads/log.hdf5
Starting the conversion of: /Users/rene/Downloads/Measurement_2022-03-31_10-20-16.hdf5
Finished the conversion process