docutils.nodesdocument)}}(reporterNsymbol_footnote_startKcurrent_sourceN footnote_refs}transform_messages](hsystem_message)}}( rawsourcechildren]h paragraph)}}(parenthhhh]hTextKHyperlink target "adding-a-custom-delineation-algorithm" is not referenced.}}(hhhhuba attributes}(ids]classes]backrefs]names]dupnames]utagnamehubah$}(h(]source=D:\Mariano\misc\ecg-kit\help\sphinx\source\ECGdelineation.rstlevelKh*]h&]h.]typeINFOh,]lineK5uh0h ubh)}}(hhh]h)}}(hh>hhh]h`__ algorithm.h](hGAutomatic wave segmentation or delineation is exclusively performed by }}(hhhGAutomatic wave segmentation or delineation is exclusively performed by ubh reference)}}(hhh$}(h(]namewavedeth*]h&]h.]h,]refuriGhttp://diec.unizar.es/~laguna/personal/publicaciones/wavedet_tbme04.pdfuhU`wavedet `__h]hwavedet}}(hhhhubah0hubh algorithm.}}(hhh algorithm.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK hhubeh$}(h&] descriptionah(]h*]h,] descriptionah.]uhh4h0hhK hhubh)}}(hhhhh](h)}}(hj hInput Argumentsh$}(h&]h(]h*]h,]h.]uh]hInput Arguments}}(hjhjubahh4h0hhKhhubh)}}(hj h5The properties that this task uses are the following:h]h5The properties that this task uses are the following:}}(hjhj!ubah$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubh)}}(hj hY``progress_handle`` — Used to track the progress within your function. ``[] (default)``h](hliteral)}}(hj/h``progress_handle``h]hprogress_handle}}(hj6hhubah$}(h&]h(]h*]h,]h.]uh0j3ubh6 — Used to track the progress within your function. }}(hj/h6 — Used to track the progress within your function. ubj4)}}(hj/h``[] (default)``h]h [] (default)}}(hjLhhubah$}(h&]h(]h*]h,]h.]uh0j3ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubh block_quote)}}(hj hhh]h)}}(hjdhprogress\_handle, is a handle to a :doc:`progress\_bar ` object, that can be used to track the progress within your function.h](h"progress_handle, is a handle to a }}(hjhh#progress\_handle, is a handle to a ubsphinx.addnodes pending_xref)}}(hjhh#:doc:`progress\_bar `h]j4)}}(hjvhjxh]h progress_bar}}(hj{hhubah$}(h&]h(](xrefdoceh*]h,]h.]uh0j3ubah$}(refdocECGdelineationh(] reftarget progress_barh*]reftypejh&]h.] refdomainhrefwarn refexplicith,]uhh4h0jshKubhE object, that can be used to track the progress within your function.}}(hjhhE object, that can be used to track the progress within your function.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKubah$}(h&]h(]h*]h,]h.]uhh4h0jahNhhubh)}}(hj hJ``tmp_path`` — The path to store temporary data. ``tempdir() (default)``h](j4)}}(hjh ``tmp_path``h]htmp_path}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh' — The path to store temporary data. }}(hjh' — The path to store temporary data. ubj4)}}(hjh``tempdir() (default)``h]htempdir() (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubjb)}}(hj hhh]h)}}(hjh/Full path to a directory with write privileges.h]h/Full path to a directory with write privileges.}}(hjhjubah$}(h&]h(]h*]h,]h.]uhh4h0hhKubah$}(h&]h(]h*]h,]h.]uhh4h0jahNhhubh)}}(hj hY``delineators`` — The ECG delineation algorithms to use ``'all-delineators' (default)``h](j4)}}(hjh``delineators``h]h delineators}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh+ — The ECG delineation algorithms to use }}(hjh+ — The ECG delineation algorithms to use ubj4)}}(hjh``'all-delineators' (default)``h]h'all-delineators' (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubjb)}}(hj hhh](h)}}(hj(hgThis property controls which algorithms are used. A cell string or char with any of the following namesh]hgThis property controls which algorithms are used. A cell string or char with any of the following names}}(hj,hj.ubah$}(h&]h(]h*]h,]h.]uhh4h0hhKubh bullet_list)}}(hj(h$}(h(]bullet-h*]h&]h.]h,]uhhh](h list_item)}}(hj>h$}(h&]h(]h*]h,]h.]uh*'all-delineators'* h]h)}}(hjLh*'all-delineators'*h]hemphasis)}}(hjWhjYh]h'all-delineators'}}(hj^hhubah$}(h&]h(]h*]h,]h.]uh0j[ubah$}(h&]h(]h*]h,]h.]uhh4h0hhK ubah0jIubjJ)}}(hj>h$}(h&]h(]h*]h,]h.]uhZ`'wavedet' `__ h]h)}}(hjshW`'wavedet' `__h]h)}}(hj~h$}(h(]name 'wavedet'h*]h&]h.]h,]hGhttp://diec.unizar.es/~laguna/personal/publicaciones/wavedet_tbme04.pdfuhjh]h 'wavedet'}}(hjhhubah0hubah$}(h&]h(]h*]h,]h.]uhh4h0hhK"ubah0jIubeh0j;ubeh$}(h&]h(]h*]h,]h.]uhNh0jahNhhubh)}}(hj hB``only_ECG_leads`` — Process only ECG signals ``true (default)``h](j4)}}(hjh``only_ECG_leads``h]honly_ECG_leads}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh — Process only ECG signals }}(hjh — Process only ECG signals ubj4)}}(hjh``true (default)``h]htrue (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK&hhubjb)}}(hj hhh]h)}}(hjh]Boolean value. Find out which signals are ECG based on their ``ECG_header.desc`` description.h](h=Boolean value. Find out which signals are ECG based on their }}(hjh=Boolean value. Find out which signals are ECG based on their ubj4)}}(hjh``ECG_header.desc``h]hECG_header.desc}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh description.}}(hjh description.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK(ubah$}(h&]h(]h*]h,]h.]uhh4h0jahNhhubh)}}(hj hV``wavedet_config`` — A structure for configuring wavedet algorithm. ``[] (default)``h](j4)}}(hjh``wavedet_config``h]hwavedet_config}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh4 — A structure for configuring wavedet algorithm. }}(hjh4 — A structure for configuring wavedet algorithm. ubj4)}}(hjh``[] (default)``h]h [] (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK+hhubjb)}}(hj hhh]h)}}(hj4h=Undocumented yet, use it only if you know what you are doing.h]h=Undocumented yet, use it only if you know what you are doing.}}(hj8hj:ubah$}(h&]h(]h*]h,]h.]uhh4h0hhK-ubah$}(h&]h(]h*]h,]h.]uhh4h0jahNhhubh)}}(hj h>``payload`` — An arbitrary format variable. ``[] (default)``h](j4)}}(hjNh ``payload``h]hpayload}}(hjShhubah$}(h&]h(]h*]h,]h.]uh0j3ubh# — An arbitrary format variable. }}(hjNh# — An arbitrary format variable. ubj4)}}(hjNh``[] (default)``h]h [] (default)}}(hjihhubah$}(h&]h(]h*]h,]h.]uh0j3ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK/hhubjb)}}(hj hhh]h)}}(hjhThis variable can be useful for passing data to your own delineation function (described :ref:`below `) or to provide visually audited QRS detections to the delineation algorithm.h](hYThis variable can be useful for passing data to your own delineation function (described }}(hjhYThis variable can be useful for passing data to your own delineation function (described ubjt)}}(hjh4:ref:`below `h]hinline)}}(hjhjh]hbelow}}(hjhhubah$}(h&]h(](jstdstd-refeh*]h,]h.]uh0jubah$}(jjh(]j%adding_a_custom_delineation_algorithmh*]reftyperefh&]h.] refdomainjj refexplicith,]uhh4h0jshK1ubhM) or to provide visually audited QRS detections to the delineation algorithm.}}(hjhM) or to provide visually audited QRS detections to the delineation algorithm.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK1ubah$}(h&]h(]h*]h,]h.]uhh4h0jahNhhubhtarget)}}(hj h*.. _Adding_a_custom_delineation_algorithm:h]h$}(h(]h*]h&]h.]refid%adding-a-custom-delineation-algorithmh,]uhh4h0jhK5hhubeh$}(h&]input-argumentsah(]h*]h,]input argumentsah.]uhh4h0hhKhhubh)}}(hhhhh](h)}}(hjh%Adding a custom delineation algorithmh$}(h&]h(]h*]h,]h.]uh]h%Adding a custom delineation algorithm}}(hjhjubahh4h0hhK8hhubh)}}(hjhjAdding your own delineator to the kit is very simple. Ensure that your function implements this interface:h]hjAdding your own delineator to the kit is very simple. Ensure that your function implements this interface:}}(hjhjubah$}(h&]h(]h*]h,]h.]uhh4h0hhK:hhubh literal_block)}}(hjhfunction [positions_single_lead, position_multilead] = your_ECG_delineation( ECG_matrix, ECG_header, progress_handle, payload_in)h]hfunction [positions_single_lead, position_multilead] = your_ECG_delineation( ECG_matrix, ECG_header, progress_handle, payload_in)}}(hjhfunction [positions_single_lead, position_multilead] = your_ECG_delineation( ECG_matrix, ECG_header, progress_handle, payload_in)ubah$}(h(]codeah*]h&]h.] xml:spacepreserveh,]uhh4h0jhKChhubh)}}(hjhwhere the arguments are:h]hwhere the arguments are:}}(hjhjubah$}(h&]h(]h*]h,]h.]uhh4h0hhKDhhubjb)}}(hjhhh](h)}}(hj$hF**ECG\_matrix**, is a matrix size [ECG\_header.nsamp ECG\_header.nsig]h](hstrong)}}(hj(h**ECG\_matrix**h]h ECG_matrix}}(hj/hhubah$}(h&]h(]h*]h,]h.]uh0j,ubh5, is a matrix size [ECG_header.nsamp ECG_header.nsig]}}(hj(h7, is a matrix size [ECG\_header.nsamp ECG\_header.nsig]ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKFubj)}}(hj$h.. _ECG_header_description:h]h$}(h(]h*]h&]h.]jecg-header-descriptionh,]uh0jhKHubh)}}(hj$hE**ECG\_header**, is a struct with info about the ECG signal, such as:h](j-)}}(hjWh**ECG\_header**h]h ECG_header}}(hj\hhubah$}(h&]h(]h*]h,]h.]uh0j,ubh6, is a struct with info about the ECG signal, such as:}}(hjWh6, is a struct with info about the ECG signal, such as:ubeh$}(h&]jTah(]h*]h,]ecg_header_descriptionah.]uhh4expect_referenced_by_id}jTjKsexpect_referenced_by_name}jvjKsh0hhKJubjb)}}(hj$hhh](j<)}}(hj}h$}(h(]jBjCh*]h&]h.]h,]uhhh](jJ)}}(hjh$}(h&]h(]h*]h,]h.]uh9*freq*, is the sampling frequency of ECG\_matrix signal. h]h)}}(hjh8*freq*, is the sampling frequency of ECG\_matrix signal.h](j\)}}(hjh*freq*h]hfreq}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j[ubh1, is the sampling frequency of ECG_matrix signal.}}(hjh2, is the sampling frequency of ECG\_matrix signal.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKLubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh=*desc*, description strings about each of the leads/signals. h]h)}}(hjh<*desc*, description strings about each of the leads/signals.h](j\)}}(hjh*desc*h]hdesc}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j[ubh6, description strings about each of the leads/signals.}}(hjh6, description strings about each of the leads/signals.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKNubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh1*nsamp* is the number of samples of ECG\_matrix. h]h)}}(hjh0*nsamp* is the number of samples of ECG\_matrix.h](j\)}}(hjh*nsamp*h]hnsamp}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j[ubh( is the number of samples of ECG_matrix.}}(hjh) is the number of samples of ECG\_matrix.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKPubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh9*nsig* is the amount of leads or signals of ECG\_matrix. h]h)}}(hjh8*nsig* is the amount of leads or signals of ECG\_matrix.h](j\)}}(hjh*nsig*h]hnsig}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j[ubh1 is the amount of leads or signals of ECG_matrix.}}(hjh2 is the amount of leads or signals of ECG\_matrix.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKRubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uhS*gain* is a vector of [nsig × 1] with the gain of each lead ( ADCsamples / μV ). h]h)}}(hj;hR*gain* is a vector of [nsig × 1] with the gain of each lead ( ADCsamples / μV ).h](j\)}}(hjFh*gain*h]hgain}}(hjKhhubah$}(h&]h(]h*]h,]h.]uh0j[ubhL is a vector of [nsig × 1] with the gain of each lead ( ADCsamples / μV ).}}(hjFhL is a vector of [nsig × 1] with the gain of each lead ( ADCsamples / μV ).ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKTubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uhR*adczero* is a vector of [nsig × 1] with the offset of each lead in ADC samples. h]h)}}(hjghQ*adczero* is a vector of [nsig × 1] with the offset of each lead in ADC samples.h](j\)}}(hjrh *adczero*h]hadczero}}(hjwhhubah$}(h&]h(]h*]h,]h.]uh0j[ubhH is a vector of [nsig × 1] with the offset of each lead in ADC samples.}}(hjrhH is a vector of [nsig × 1] with the offset of each lead in ADC samples.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKVubah0jIubeh0j;ubh)}}(hj}hiand others described in the `Physionet header `__.h](hand others described in the }}(hjhand others described in the ubh)}}(hjh$}(h(]namePhysionet headerh*]h&]h.]h,]h5http://www.physionet.org/physiotools/wag/header-5.htmuhL`Physionet header `__h]hPhysionet header}}(hjhhubah0hubh.}}(hjh.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKXubeh$}(h&]h(]h*]h,]h.]uh0jaubh)}}(hj$h**progress\_handle**, is a handle to a :doc:`progress\_bar ` object, that can be used to track the progress within your function.h](j-)}}(hjh**progress\_handle**h]hprogress_handle}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j,ubh, is a handle to a }}(hjh, is a handle to a ubjt)}}(hjh#:doc:`progress\_bar `h]j4)}}(hjhjh]h progress_bar}}(hjhhubah$}(h&]h(](jdoceh*]h,]h.]uh0j3ubah$}(jjh(]j progress_barh*]reftypejh&]h.] refdomainhj refexplicith,]uhh4h0jshKZubhE object, that can be used to track the progress within your function.}}(hjhE object, that can be used to track the progress within your function.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKZubh)}}(hj$h**payload\_in**, is a user variable, of arbitrary format, allowed to be sent to your function. It is sent via the :ref:`payload property ` of this class, for example:h](j-)}}(hj h**payload\_in**h]h payload_in}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j,ubhc, is a user variable, of arbitrary format, allowed to be sent to your function. It is sent via the }}(hj hc, is a user variable, of arbitrary format, allowed to be sent to your function. It is sent via the ubjt)}}(hj h&:ref:`payload property `h]j)}}(hj$hj&h]hpayload property}}(hj)hhubah$}(h&]h(](jstdstd-refeh*]h,]h.]uh0jubah$}(jjh(]j payload_proph*]reftyperefh&]h.] refdomainj4j refexplicith,]uhh4h0jshK]ubh of this class, for example:}}(hj h of this class, for example:ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK]ubeh$}(h&]h(]h*]h,]h.]uhh4h0jahNhhubj)}}(hjhX% One variable this_ECG_wrapper.ECGtaskHandle.payload = your_variable; % Several variables with a cell container this_ECG_wrapper.ECGtaskHandle.payload = {your_var1 your_var2}; % Or the result of a previous task, in this case QRS manual correction (if available) % or the automatic detection if not. cached_filenames = this_ECG_wrapper.GetCahchedFileName({'QRS_corrector' 'QRS_detection'}); this_ECG_wrapper.ECGtaskHandle.payload = load(cached_filenames);h]hX% One variable this_ECG_wrapper.ECGtaskHandle.payload = your_variable; % Several variables with a cell container this_ECG_wrapper.ECGtaskHandle.payload = {your_var1 your_var2}; % Or the result of a previous task, in this case QRS manual correction (if available) % or the automatic detection if not. cached_filenames = this_ECG_wrapper.GetCahchedFileName({'QRS_corrector' 'QRS_detection'}); this_ECG_wrapper.ECGtaskHandle.payload = load(cached_filenames);}}(hjWhX% One variable this_ECG_wrapper.ECGtaskHandle.payload = your_variable; % Several variables with a cell container this_ECG_wrapper.ECGtaskHandle.payload = {your_var1 your_var2}; % Or the result of a previous task, in this case QRS manual correction (if available) % or the automatic detection if not. cached_filenames = this_ECG_wrapper.GetCahchedFileName({'QRS_corrector' 'QRS_detection'}); this_ECG_wrapper.ECGtaskHandle.payload = load(cached_filenames);ubah$}(h(]j ah*]h&]h.]jjh,]uhh4h0jhKmhhubh)}}(hjh(and the output of your function must be:h]h(and the output of your function must be:}}(hjhhjjubah$}(h&]h(]h*]h,]h.]uhh4h0hhKnhhubj)}}(hjh.. _delineation_struct:h]h$}(h(]h*]h&]h.]jdelineation-structh,]uhh4h0jhKphhubjb)}}(hjhhh](h)}}(hjh**positions\_single\_lead**, is an **structure array** of ``ECG_header.nsig`` elements with *at least* the following wave fiducial points as fields:h](j-)}}(hjh**positions\_single\_lead**h]hpositions_single_lead}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j,ubh, is an }}(hjh, is an ubj-)}}(hjh**structure array**h]hstructure array}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j,ubh of }}(hjh of ubj4)}}(hjh``ECG_header.nsig``h]hECG_header.nsig}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh elements with }}(hjh elements with ubj\)}}(hjh *at least*h]hat least}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j[ubh. the following wave fiducial points as fields:}}(hjh. the following wave fiducial points as fields:ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKrubj<)}}(hjh$}(h(]jBjCh*]h&]h.]h,]uhhh](jJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'Pon'`` P wave onseth]h)}}(hjhjh](j4)}}(hjh ``'Pon'``h]h'Pon'}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh P wave onset}}(hjh P wave onsetubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKtubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'P'`` P wave peakh]h)}}(hj hj(h](j4)}}(hj+h``'P'``h]h'P'}}(hj/hhubah$}(h&]h(]h*]h,]h.]uh0j3ubh P wave peak}}(hj+h P wave peakubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKuubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'Poff'`` P wave offseth]h)}}(hjKhjSh](j4)}}(hjVh ``'Poff'``h]h'Poff'}}(hjZhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh P wave offset}}(hjVh P wave offsetubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKvubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'QRSon'`` QRS complex onseth]h)}}(hjvhj~h](j4)}}(hjh ``'QRSon'``h]h'QRSon'}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh QRS complex onset}}(hjh QRS complex onsetubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKwubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh:``'qrs'`` QRS fiducial point, obtained from QRS detection.h]h)}}(hjhjh](j4)}}(hjh ``'qrs'``h]h'qrs'}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh1 QRS fiducial point, obtained from QRS detection.}}(hjh1 QRS fiducial point, obtained from QRS detection.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKxubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'Q'`` Q wave peakh]h)}}(hjhjh](j4)}}(hjh``'Q'``h]h'Q'}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh Q wave peak}}(hjh Q wave peakubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKyubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'R'`` R wave peakh]h)}}(hjhjh](j4)}}(hjh``'R'``h]h'R'}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh R wave peak}}(hjh R wave peakubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKzubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'S'`` S wave peakh]h)}}(hj"hj*h](j4)}}(hj-h``'S'``h]h'S'}}(hj1hhubah$}(h&]h(]h*]h,]h.]uh0j3ubh S wave peak}}(hj-h S wave peakubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK{ubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'QRSoff'`` QRS complex offseth]h)}}(hjMhjUh](j4)}}(hjXh ``'QRSoff'``h]h'QRSoff'}}(hj\hhubah$}(h&]h(]h*]h,]h.]uh0j3ubh QRS complex offset}}(hjXh QRS complex offsetubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK|ubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'Ton'`` T wave onseth]h)}}(hjxhjh](j4)}}(hjh ``'Ton'``h]h'Ton'}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh T wave onset}}(hjh T wave onsetubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK}ubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'T'`` T wave peakh]h)}}(hjhjh](j4)}}(hjh``'T'``h]h'T'}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh T wave peak}}(hjh T wave peakubeh$}(h&]h(]h*]h,]h.]uhh4h0hhK~ubah0jIubjJ)}}(hjh$}(h&]h(]h*]h,]h.]uh``'Toff'`` T wave offset h]h)}}(hjh``'Toff'`` T wave offseth](j4)}}(hjh ``'Toff'``h]h'Toff'}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j3ubh T wave offset}}(hjh T wave offsetubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKubah0jIubeh0j;ubh)}}(hjh**position\_multilead**, is a single structure with *at least* the wave fiducial points described above. This delineation is commonly calculated from the single lead delineations, in order to obtain a unique wave fiducial point per heartbeat.h](j-)}}(hjh**position\_multilead**h]hposition_multilead}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0j,ubh, is a single structure with }}(hjh, is a single structure with ubj\)}}(hjh *at least*h]hat least}}(hj hhubah$}(h&]h(]h*]h,]h.]uh0j[ubh the wave fiducial points described above. This delineation is commonly calculated from the single lead delineations, in order to obtain a unique wave fiducial point per heartbeat.}}(hjh the wave fiducial points described above. This delineation is commonly calculated from the single lead delineations, in order to obtain a unique wave fiducial point per heartbeat.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKubeh$}(h&]jah(]h*]h,]delineation_structah.]uhh4jx}jjxsjz}j5 jxsh0jahNhhubeh$}(h&](jid1eh(]h*]h,](%adding a custom delineation algorithm%adding_a_custom_delineation_algorithmeh.]uhh4jx}jjsjz}j@ jsh0hhK8hhubh)}}(hhhhh](h)}}(hjE hExamplesh$}(h&]h(]h*]h,]h.]uh]hExamples}}(hjI hjK ubahh4h0hhKhhubh)}}(hjE h.Create the *ECGtask\_ECG\_delineation* object.h](h Create the }}(hjY h Create the ubj\)}}(hjY h*ECGtask\_ECG\_delineation*h]hECGtask_ECG_delineation}}(hjd hhubah$}(h&]h(]h*]h,]h.]uh0j[ubh object.}}(hjY h object.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubj)}}(hjE h% with the task name ECG_w.ECGtaskHandle = 'ECG_delineation'; % or create an specific handle to have more control ECGt = ECGtask_ECG_delineation();h]h% with the task name ECG_w.ECGtaskHandle = 'ECG_delineation'; % or create an specific handle to have more control ECGt = ECGtask_ECG_delineation();}}(hj h% with the task name ECG_w.ECGtaskHandle = 'ECG_delineation'; % or create an specific handle to have more control ECGt = ECGtask_ECG_delineation();ubah$}(h(]j ah*]h&]h.]jjh,]uhh4h0jhKhhubh)}}(hjE hpand then you are ready to set the algorithms to use. In the following example you have several possible set-ups.h]hpand then you are ready to set the algorithms to use. In the following example you have several possible set-ups.}}(hj hj ubah$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubj)}}(hjE hXi% select an specific algorithm. Default: Run all detectors         ECGt.delineators = 'wavedet'; % Wavedet algorithm based on         % "your_delineator_func_name" can be your own delineator. ECGt.delineators = 'user:your_delineator_func_name';         ECGt.delineators = {'wavedet' 'user:your_delineator_func_name'};h]hXi% select an specific algorithm. Default: Run all detectors         ECGt.delineators = 'wavedet'; % Wavedet algorithm based on         % "your_delineator_func_name" can be your own delineator. ECGt.delineators = 'user:your_delineator_func_name';         ECGt.delineators = {'wavedet' 'user:your_delineator_func_name'};}}(hj hXi% select an specific algorithm. Default: Run all detectors         ECGt.delineators = 'wavedet'; % Wavedet algorithm based on         % "your_delineator_func_name" can be your own delineator. ECGt.delineators = 'user:your_delineator_func_name';         ECGt.delineators = {'wavedet' 'user:your_delineator_func_name'};ubah$}(h(]j ah*]h&]h.]jjh,]uhh4h0jhKhhubh)}}(hjE hAFinally set the task to the wrapper object, and execute the task.h]hAFinally set the task to the wrapper object, and execute the task.}}(hj hj ubah$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubj)}}(hjE h:ECG_w.ECGtaskHandle= ECGt; % set the ECG task ECG_w.Run();h]h:ECG_w.ECGtaskHandle= ECGt; % set the ECG task ECG_w.Run();}}(hj h:ECG_w.ECGtaskHandle= ECGt; % set the ECG task ECG_w.Run();ubah$}(h(]j ah*]h&]h.]jjh,]uhh4h0jhKhhubh)}}(hjE hYou can check the result of this task, with either the :doc:`delineator corrector ` or the :doc:`visualization functions `.h](h7You can check the result of this task, with either the }}(hj h7You can check the result of this task, with either the ubjt)}}(hj h7:doc:`delineator corrector `h]j4)}}(hj hj h]hdelineator corrector}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0j3ubah$}(jjh(]jECG_delineation_correctorh*]reftypej h&]h.] refdomainhj refexplicith,]uhh4h0jshKubh or the }}(hj h or the ubjt)}}(hj h/:doc:`visualization functions `h]j4)}}(hj hj h]hvisualization functions}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0j3ubah$}(jjh(]jplot_ecg_striph*]reftypej h&]h.] refdomainhj refexplicith,]uhh4h0jshKubh.}}(hj hjubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubh)}}(hjE hSAlso check this :ref:`example ` for further information.h](hAlso check this }}(hj- hAlso check this ubjt)}}(hj- h*:ref:`example `h]j)}}(hj8 hj: h]hexample}}(hj= hhubah$}(h&]h(](jstdstd-refeh*]h,]h.]uh0jubah$}(jjh(]jecg_automatic_delineationh*]reftyperefh&]h.] refdomainjH j refexplicith,]uhh4h0jshKubh for further information.}}(hj- h for further information.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubj)}}(hjE h.. _Delineation_result_format:h]h$}(h(]h*]h&]h.]jdelineation-result-formath,]uhh4h0jhKhhubeh$}(h&]examplesah(]h*]h,]examplesah.]uhh4h0hhKhhubh)}}(hhhhh](h)}}(hjy hResults formath$}(h&]h(]h*]h,]h.]uh]hResults format}}(hj} hj ubahh4h0hhKhhubh)}}(hjy hXjThe result file will have a ``struct`` variable with the name of the algorithm (only *wavedet* at the time of writing this). Inside this, it will contain one :ref:`delineation struct ` per ECG lead in the ``ECG_header.desc`` field, plus another called ``multilead`` which is a delineation accounting with the information present in all leads.h](hThe result file will have a }}(hj hThe result file will have a ubj4)}}(hj h ``struct``h]hstruct}}(hj hhubah$}(h&]h(]h*]h,]h.]uh0j3ubh/ variable with the name of the algorithm (only }}(hj h/ variable with the name of the algorithm (only ubj\)}}(hj h *wavedet*h]hwavedet}}(hj hhubah$}(h&]h(]h*]h,]h.]uh0j[ubh@ at the time of writing this). Inside this, it will contain one }}(hj h@ at the time of writing this). Inside this, it will contain one ubjt)}}(hj h.:ref:`delineation struct `h]j)}}(hj hj h]hdelineation struct}}(hj hhubah$}(h&]h(](jstdstd-refeh*]h,]h.]uh0jubah$}(jjh(]jdelineation_structh*]reftyperefh&]h.] refdomainj j refexplicith,]uhh4h0jshKubh per ECG lead in the }}(hj h per ECG lead in the ubj4)}}(hj h``ECG_header.desc``h]hECG_header.desc}}(hj hhubah$}(h&]h(]h*]h,]h.]uh0j3ubh field, plus another called }}(hj h field, plus another called ubj4)}}(hj h ``multilead``h]h multilead}}(hj hhubah$}(h&]h(]h*]h,]h.]uh0j3ubhM which is a delineation accounting with the information present in all leads.}}(hj hM which is a delineation accounting with the information present in all leads.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubeh$}(h&](results-formatjn eh(]h*]h,](results formatdelineation_result_formateh.]uhh4jx}jn je sjz}j# je sh0hhKhhubh)}}(hhhhh](h)}}(hj( h More Abouth$}(h&]h(]h*]h,]h.]uh]h More About}}(hj, hj. ubahh4h0hhKhhubh)}}(hj( hThis publication describes the `wavedet `__ algorithm.h](hThis publication describes the }}(hj< hThis publication describes the ubh)}}(hj< h$}(h(]namewavedeth*]h&]h.]h,]hGhttp://diec.unizar.es/~laguna/personal/publicaciones/wavedet_tbme04.pdfuhU`wavedet `__h]hwavedet}}(hjG hhubah0hubh algorithm.}}(hj< h algorithm.ubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKhhubeh$}(h&] more-aboutah(]h*]h,] more aboutah.]uhh4h0hhKhhubh)}}(hhhhh](h)}}(hjn hSee Alsoh$}(h&]h(]h*]h,]h.]uh]hSee Also}}(hjr hjt ubahh4h0hhKhhubjb)}}(hjn hhh]h)}}(hj h^:doc:`ECGtask ` \| :doc:`QRS detection ` \| :doc:`examples `h](jt)}}(hj h:doc:`ECGtask `h]j4)}}(hj hj h]hECGtask}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0j3ubah$}(jjh(]jECGtaskh*]reftypej h&]h.] refdomainhj refexplicith,]uhh4h0jshKubh | }}(hj h \| ubjt)}}(hj h$:doc:`QRS detection `h]j4)}}(hj hj h]h QRS detection}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0j3ubah$}(jjh(]j QRS_detectionh*]reftypej h&]h.] refdomainhj refexplicith,]uhh4h0jshKubh | }}(hj h \| ubjt)}}(hj h:doc:`examples `h]j4)}}(hj hj h]hexamples}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0j3ubah$}(jjh(]jexamplesh*]reftypej h&]h.] refdomainhj refexplicith,]uhh4h0jshKubeh$}(h&]h(]h*]h,]h.]uhh4h0hhKubah$}(h&]h(]h*]h,]h.]uhh4h0jahNhhubeh$}(h&]see-alsoah(]h*]h,]see alsoah.]uhh4h0hhKhhubeh$}(h&]ecg-delineationah(]h*]h,]ecg delineationah.]uhh4h0hhKhhubaautofootnote_refs]settingsdocutils.frontendValues)}}(envNhNconfigN source_urlNauto_id_prefixid generatorNtrim_footnote_reference_space toc_backlinksentryexit_status_levelKdump_pseudo_xmlNgettext_compactwarning_streamN _destinationNoutput_encodingutf-8 language_codeenstrip_commentsN sectnum_xformKsyntax_highlightlong docinfo_xformKpep_referencesN rfc_base_urlhttps://tools.ietf.org/html/error_encoding_error_handlerbackslashreplacesectsubtitle_xform dump_settingsN datestampNdump_transformsNrfc_referencesN pep_base_url https://www.python.org/dev/peps/debugN strip_classesN halt_levelK smart_quotesstrict_visitorN raw_enabledKpep_file_url_templatepep-%04d _config_files]strip_elements_with_classesNinput_encoding_error_handlerstrictfootnote_backlinksKerror_encodingcp850 report_levelKinput_encoding utf-8-sig_disable_configN traceback id_prefixhcloak_email_addresses tab_widthKoutput_encoding_error_handlerjG file_insertion_enabledexpose_internalsNrecord_dependenciesN_sourceh4dump_internalsNembed_stylesheetdoctitle_xform source_linkNub current_lineN citation_refs}parse_messages]substitution_names}h$}(h(]sourceh4h*]h&]h.]h,]u citations]hhids}(j jy jTjWjjj; jj jn jg j( jn jy jj j hjhjjjr jE urefnames}refids}(jT]jKaj]jajn ]je aj]jxausymbol_footnote_refs]symbol_footnotes]substitution_defs}id_startKnameids}(j j j# jn j" j jjjjj@ jj? j; j5 jj j jvjTjk jg jv jr u nametypes}(j Nj# j" NjNjNj@ j? Nj5 j Njvjk Njv Nuautofootnote_startKindirect_targets] autofootnotes] footnotes]ub.