Repository navigation
Closed
Labels
Description
A to-do list of the remaining functions from the original C code still left to implement:
- a2m: converting between AHA and WFDB formats
- ad2m: converting between AHA DB and WFDB formats
- ahaconvert: converting between AHA DB and WFDB formats
- ahaecg2mit: converting between AHA .ecg and .txt files and WFDB formats
- m2a: converting between WFDB and AHA formats
- md2a: converting between WFDB and AHA DB formats
- ann2rr: convert annotation files to interval lists
- rr2ann: convert interval lists to annotation files
- bxb: ANSI/AAMI-standard beat-by-beat annotation comparator
- calsig: calibrate signals of a WFDB record
-
coherence: estimate coherence and cross-spectrum of two time series -
dfa: detrended fluctuation analysis -
ecgeval: generate and run ECG analyzer evaluation script -
ecgpuwave: QRS detector and waveform limit locator ECGPUWAVE #75 Waveform limit locator #134 qrs detector improvements #136 - edf2mit: convert between EDF and WFDB-compatible formats
- mit2edf: convert between WFDB-compatible and EDF formats
- rdedfann: extract annotations from an EDF+ file
-
edr: derive a respiration signal from an ECG - epicmp: ANSI/AAMI-standard episode-by-episode annotation comparator
-
fft: fast Fourier transform -
fir: general-purpose FIR filter for WFDB records -
gqfuse: combine QRS annotation files - gqrs: QRS detector
- gqpost: QRS post-processor
-
hrfft: calculate the heart rate FFT -
hrlomb: calculate the heart rate Lomb periodogram -
hrmem: calculate and plot heart rate power spectra -
hrstats: collect and summarize heart rate statistics from an annotation file -
ihr: calculate instantaneous heart rate -
imageplt: plot a greyscale image -
log10: calculate common logarithms of two-column data -
lomb: estimate power spectrum using the Lomb periodogram method -
lwcat: postprocess output of plt to make PostScript, EPS, PDF or PNG -
memse: estimate power spectrum using maximum entropy (all poles) method -
mfilt: general-purpose median filter for WFDB records - mrgann: merge annotation files
- mxm: ANSI/AAMI-standard measurement-by-measurement annotation comparator Writing annotation files for use with mxm.c #245
-
nguess: guess the times of missing normal beats in an annotation file -
nst: noise stress test for ECG analysis programs - parsescp: parse SCP-ECG, optionally save in PhysioBank-compatible format
-
plot2d: make 2-D plots from text files of data, using gnuplot -
plot3d: make 3-D plots from text files of data, using gnuplot -
plotstm: produce scatter plot of ST measurement errors on a PostScript device -
plt: make 2-D plots -
pltf: make function plots -
pnnlist: derive pNNx statistics from an annotation interval list -
pNNx: derive pNNx statistics from annotation file - pnwlogin: provide direct access to PhysioNetWorks for WFDB applications
- pschart: produce annotated 'chart recordings' on a PostScript device
- psfd: produce annotated 'full-disclosure' plots on a PostScript device
- rdann: read a WFDB annotation file
- rdsamp: read WFDB signal files
- rxr: ANSI/AAMI-standard run-by-run annotation comparator
- sampfreq: show sampling frequency for a record
- setwfdb: set WFDB environment variables
- cshsetwfdb: set WFDB environment variables for C-shell
- sigamp: measure signal amplitudes of a WFDB record
- sigavg: calculate averages of annotated waveforms
- signame: print names of signals of a WFDB record
- signum: print signal numbers of a WFDB record having specified names
- skewedit: edit skew fields of header file(s)
- snip: copy an excerpt of a WFDB record
- sortann: rearrange annotations in canonical order
- sqrs: single-channel QRS detector
-
sqrs125: single-channel QRS detector designed for 125 Hz input -
stepdet: single-channel step change detector - sumann: summarize the contents of a WFDB annotation file
- sumstats: derive aggregate statistics from bxb, rxr, etc., line-format output
-
tach: heart rate tachometer - time2sec: convert WFDB standard time format into seconds
-
wabp: arterial blood pressure (ABP) pulse detector - wav2mit: convert between .wav and WFDB-compatible formats
- mit2wav: convert between WFDB-compatible and .wav formats
- wave: waveform analyzer, viewer, and editor
- wfdb-config: print WFDB library version and configuration info
- wfdb2mat: convert WFDB-compatible signal file to Matlab .mat file
- wfdbcat: copy WFDB files to standard output
- wfdbcollate: collate WFDB records into a multi-segment record
- wfdbdesc: read signal specifications
- wfdbmap: make a synoptic map of a WFDB record Remaining functions to implement #222
- wfdbtime: convert time to sample number, elapsed, and absolute time
- wfdbwhich: find a WFDB file and print its pathname
- ~~wqrs: single-channel QRS detector based on length transform How to easily generate wfdb record from dataframe? #173 ~~
- wrann: write a WFDB annotation file
- wrsamp: write WFDB signal files
- xform: sampling frequency, amplitude, and format conversion for WFDB records
Activity
alistairewj commentedon May 27, 2020
Quite a list! I'm not sure they are all worth implementing though; especially as there are other tools in the Python ecosystem. My thoughts are that wfdb-python should focus on the I/O between WFDB compatible records and Python. Looking at the list:
plot2d,plot3d,plotstm,plt,pltf,imageplt,lwcat,pschart,psfdcan all be done by existing tools once the data is in Python (or aren't relevant if using Python)coherence,dfa,nguess,sqrs125,tach,ecgpuwave,ecgeval,wave,wabp- all various types of ECG signal processing, which again seems like it could be separate from this packagefft,fir,lomb,mfilt,memse- scipy signal processing functions which I know already existAbdulAlkurdi commentedon May 27, 2020
I am interested in the
wfdbmapfunction. But I am not sure if I can do the implementation. I would like some guidance as I have never done anything like this before. Like, where do I find the source code, lol?Lucas-Mc commentedon May 27, 2020
Hey @AbdulAlkurdi, thanks for the suggestion! Here is where you can find the documentation and source code if you want a go at it! 👍
Lucas-Mc commentedon May 28, 2020
I agree @alistairewj, too many which can be easily done in Python instead of C or from external packages after the conversion! I'll add check marks to the ones you stated though I think
ecgpuwavehas gained some interest here #75 #134 #136. Any thoughts?alistairewj commentedon May 28, 2020
Hmm, feels like it would be better served by a dedicated package to ECG analysis, e.g. something like ecg-kit (MATLAB) but in Python.
The closest one I know of is BioSPPy - have only briefly used it myself but seems to fulfill the role!
We do have an energy based QRS detector (mostly because @cx1111 was interested in implementing one), so we could consider adding a wavelet based QRS detector. I'd say it's not at all a necessity, just a fun side project, so it's really only worth it if it interests you.
JanCBrammer commentedon May 30, 2020
@Lucas-Mc, @alistairewj, there are a number of packages dedicated to biosignal processing (including ECG and PPG). Neurokit presents a comprehensive overview. Maybe pointing users to those packages would be an option to prevent feature creep in
wfdb(i.e., adding non-IO related features)?Lucas-Mc commentedon Jun 1, 2020
Hey @JanCBrammer, it looks like you are a developer for
Neurokit.. do you have any functions off the top of your head that would cover any of these before I look at the overview?JanCBrammer commentedon Jun 2, 2020
@Lucas-Mc, the overview I was referring to is an attempt to gather all packages in the Python and Matlab ecosystem that deal with biosignal processing. I don't know from the top of my head where in those packages to locate the signal processing functions that you listed above. But I'm sure that collectively the packages cover a lot of ground :)
alistairewj commentedon Jun 2, 2020
Yeah I agree something like
ecgpuwaveis useful but it feels out of scope as mentioned by @JanCBrammer. So probably what makes the most sense is the following:Given this, looking back at your list, I'd check off the following as being out of scope:
ecgpuwave,edr,gqfuse,hrfft,hrlomb,hrmem,hrstats,ihr,log10,nst,pnnlist,pNNx,stepdet,wqrsLucas-Mc commentedon Jun 3, 2020
Awesome, thanks @alistairewj, this brings us down to 40 functions! I didn't know about
awesome repositoriesand that's going to save a lot of time when trying to find packages to link to! Also, thanks @JanCBrammer for your suggestions as well! 👍Lucas-Mc commentedon Mar 31, 2021
I'm going to close
wfdbmapsince theplot_wfdbfunction is close enough and I can't seem to getpltto compile on Mac anyway.Lucas-Mc commentedon Apr 1, 2021
I think it's also safe to say that AHA format isn't really used anymore so I'll remove all of those!
fabbra commentedon Nov 3, 2021
Is there a timeline / expected date when the
bxbfunction will be implemented in Python?Is there any work already ongoing?
bemoody commentedon Nov 3, 2021
cx1111 commentedon Jun 15, 2022
Going to close this. We can use individual issues for high-yield functions to be ported over.