MainWindow¶
- The MainWindow module is the main class that provides interaction between gui and use. From this
- class all others are controlled.
Base class plotting widget based on PyQwt.
Parameters: | parent – |
---|
When a plot is cleared a signal is emitted in order to allow the FhrPlot to reinit
Not used so far.
Get margins of x axis of this plot - length (in pixels) between end of an axis and end of plot widget.
Return type: | int,int |
---|
Get margins of y axis of this plot - length (in pixels) between end of an axis and end of plot widget.
Return type: | int,int |
---|
Plot data. Numpy arrays should be used instead of list, the plotting speed is about 20x faster. Time string is used for plotting time on X axis. Prior plotting either minutes or hours are located based on user preference.
Parameters: |
|
---|
Locates time points at the X axis. The points could be minutes or hours. If both equal to -1 the time is guessed.
Set scale of X axis. First get width of this plot. Then use preset cm/min ratio and use it to compute X axis scale.
Parameters: | centerPoint (int) – user’s clicked point at PyQwtNavigationPlot |
---|
Set scale of Y axis. First get height of this plot. Then use preset bmp/cm ratio and use it to compute y axis scale
Parameters: | height (int) – height of the widget |
---|
Return sizeof canvas, i.e. the size of actual plot. When this class is initialized use build in function QWidget.size() instead of getMarginsXPx()
Return type: | QSize(width, height) |
---|
Update X and Y axis. Replot after both axes were set.
Returns a maximum sample that will be plotted. The calculation of max samples is based on preset dpi and bpm/cm ratio
Return type: | int |
---|
set the x axis label
set the y axis label. The font is based on application font
Subclass of QwtScaleDraw because of time axis. Note: function axisScaleDiv will invalidate manually set ticks.
Parameters: | plot (PyQwtWidgetGui) – parent |
---|
Get a time axis.
Return type: | list() |
---|
Set a time string used for X axis.
Parameters: |
|
---|
Plot/paper speed enum - defines cm/min ratio.
Plot/paper bpm size enum - defines bpm/cm ratio.
txt: mb: loading csv directly from TXT/CSV file generated from BDI
Class EnumVariableName contains description and names of variables in a matlab file that can be used in python
Examples of variables in mat-file (others not supported yet):
Parameters: |
|
---|
save(‘temp.mat’,’fhr’,’uc’,’timestamp’)
Load data from various types of files
load data from txt file (generated from BDI file), the structure of csv is expected as: timestamp, fhr, uc (fields: 1, 4, 11)
load data from csv file, the structure of csv is expected as: timestamp, fhr, uc
read a signal in matlab format, for specification of matlab file see EnumVariableName
Read a file header in physionet format
Parameters: | inFile (string) – filename to read |
---|
:return lHeader :rtype lHeader list of dict
Read a physionet header when the name of signal is provided
Parameters: | inFile (string) – filename of signal, which header is desired |
---|
:return list of parameters
read a signal in physionet format, only format 16 is supported
write data into csv file. the function is not using the python csv module because of unable to setup float precision