*docutils.nodesdocument)}}(reporterNsymbol_footnote_startKcurrent_sourceN footnote_refs}transform_messages]hsystem_message)}}( rawsourcechildren]h paragraph)}}(parenthhhh]hText=Hyperlink target "arbitrary-result-format" is not referenced.}}(hhhhuba attributes}(ids]classes]backrefs]names]dupnames]utagnamehubah$}(h(]source>D:\Mariano\misc\ecg-kit\help\sphinx\source\Arbitrary_tasks.rstlevelKh*]h&]h.]typeINFOh,]lineM uh0h ubah0h decorationN transformerNhhh]hsection)}}(hhhhh](htitle)}}(hhChArbitrary tasksh$}(h&]h(]h*]h,]h.]uh]hArbitrary tasks}}(hhIhhKubasourceh4h0hFlineKhhubh)}}(hhChCThis document describes how to use arbitrary tasks with the ECGkit.h]hCThis document describes how to use arbitrary tasks with the ECGkit.}}(hh[hh]ubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYKhhubhA)}}(hhChhh](hG)}}(hhkh Descriptionh$}(h&]h(]h*]h,]h.]uh]h Description}}(hhohhqubahXh4h0hFhYK hhubh)}}(hhkhXSometimes the task you need to perform on ECG signals is too simple to develop a new ECGtask, like computing some statistics, or apply a linear filter, or any type of transformation you may need to perform to the signal. For those cases you may found arbitrary tasks useful.h]hXSometimes the task you need to perform on ECG signals is too simple to develop a new ECGtask, like computing some statistics, or apply a linear filter, or any type of transformation you may need to perform to the signal. For those cases you may found arbitrary tasks useful.}}(hhhhubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYK hhubeh$}(h&] descriptionah(]h*]h,] descriptionah.]uhXh4h0h@hYK hhubhA)}}(hhChhh](hG)}}(hhhInput Argumentsh$}(h&]h(]h*]h,]h.]uh]hInput Arguments}}(hhhhubahXh4h0hFhYKhhubh)}}(hhh5The properties that this task uses are the following:h]h5The properties that this task uses are the following:}}(hhhhubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYKhhubh)}}(hhhY``progress_handle`` — Used to track the progress within your function. ``[] (default)``h](hliteral)}}(hhh``progress_handle``h]hprogress_handle}}(hhhhubah$}(h&]h(]h*]h,]h.]uh0hubh6 — Used to track the progress within your function. }}(hhh6 — Used to track the progress within your function. ubh)}}(hhh``[] (default)``h]h [] (default)}}(hhhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKhhubh block_quote)}}(hhhhh]h)}}(hhhprogress\_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 }}(hhh#progress\_handle, is a handle to a ubsphinx.addnodes pending_xref)}}(hhh#:doc:`progress\_bar `h]h)}}(hjhjh]h progress_bar}}(hjhhubah$}(h&]h(](xrefdoceh*]h,]h.]uh0hubah$}(refdocArbitrary_tasksh(] reftarget progress_barh*]reftypejh&]h.] refdomainhrefwarn refexplicith,]uhXh4h0hhYKubhE object, that can be used to track the progress within your function.}}(hhhE object, that can be used to track the progress within your function.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubh)}}(hhhJ``tmp_path`` — The path to store temporary data. ``tempdir() (default)``h](h)}}(hj8h ``tmp_path``h]htmp_path}}(hj=hhubah$}(h&]h(]h*]h,]h.]uh0hubh' — The path to store temporary data. }}(hj8h' — The path to store temporary data. ubh)}}(hj8h``tempdir() (default)``h]htempdir() (default)}}(hjShhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKhhubh)}}(hhhhh]h)}}(hjih/Full path to a directory with write privileges.h]h/Full path to a directory with write privileges.}}(hjmhjoubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYKubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubh)}}(hhhB``only_ECG_leads`` — Process only ECG signals ``true (default)``h](h)}}(hjh``only_ECG_leads``h]honly_ECG_leads}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh — Process only ECG signals }}(hjh — Process only ECG signals ubh)}}(hjh``true (default)``h]htrue (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK hhubh)}}(hhhhh]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 ubh)}}(hjh``ECG_header.desc``h]hECG_header.desc}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh description.}}(hjh description.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK"ubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubh)}}(hhh\``payload`` — An arbitrary format variable to be passed to your function. ``[] (default)``h](h)}}(hjh ``payload``h]hpayload}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubhA — An arbitrary format variable to be passed to your function. }}(hjhA — An arbitrary format variable to be passed to your function. ubh)}}(hjh``[] (default)``h]h [] (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK$hhubh)}}(hhhhh]h)}}(hjhBThis variable can be useful for passing data to your own function.h]hBThis variable can be useful for passing data to your own function.}}(hjhjubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYK&ubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubh)}}(hhhf``signal_payload`` — Consider the result of your arbitrary function as a signal. ``false (default)``h](h)}}(hj0h``signal_payload``h]hsignal_payload}}(hj5hhubah$}(h&]h(]h*]h,]h.]uh0hubhA — Consider the result of your arbitrary function as a signal. }}(hj0hA — Consider the result of your arbitrary function as a signal. ubh)}}(hj0h``false (default)``h]hfalse (default)}}(hjKhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK(hhubh)}}(hhhhh]h)}}(hjah\Boolean value that indicates the ECGwrapper to produce a signal instead of a result payload.h]h\Boolean value that indicates the ECGwrapper to produce a signal instead of a result payload.}}(hjehjgubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYK*ubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubh)}}(hhhT``lead_idx`` — The signal indexes that your function will affect. ``[] (default)``h](h)}}(hj{h ``lead_idx``h]hlead_idx}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh8 — The signal indexes that your function will affect. }}(hj{h8 — The signal indexes that your function will affect. ubh)}}(hj{h``[] (default)``h]h [] (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK,hhubh)}}(hhhhh]h)}}(hjhCA positive integer array with values from 1 to ``ECG_header.nsig``.h](h/A positive integer array with values from 1 to }}(hjh/A positive integer array with values from 1 to ubh)}}(hjh``ECG_header.nsig``h]hECG_header.nsig}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh.}}(hjh.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK.ubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubh)}}(hhhQ``function_pointer`` — The pointer to your arbitrary function. ``[] (default)``h](h)}}(hjh``function_pointer``h]hfunction_pointer}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh- — The pointer to your arbitrary function. }}(hjh- — The pointer to your arbitrary function. ubh)}}(hjh``[] (default)``h]h [] (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK0hhubh)}}(hhh)Your function must follow this prototype:h]h)Your function must follow this prototype:}}(hjhjubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYK2hhubh literal_block)}}(hhhUfunction result = your_function( ECG_matrix, ECG_header, progress_handle, payload_in)h]hUfunction result = your_function( ECG_matrix, ECG_header, progress_handle, payload_in)}}(hj hj"ubah$}(h(]codeah*]h&]h.] xml:spacepreserveh,]uhXh4h0jhYK8hhubh)}}(hhhwhere the arguments are:h]hwhere the arguments are:}}(hj3hj5ubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYK9hhubh)}}(hhhhh](h)}}(hjChJ**ECG\_matrix**, is a matrix size ``[ECG\_header.nsamp ECG\_header.nsig]``h](hstrong)}}(hjGh**ECG\_matrix**h]h ECG_matrix}}(hjNhhubah$}(h&]h(]h*]h,]h.]uh0jKubh, is a matrix size }}(hjGh, is a matrix size ubh)}}(hjGh(``[ECG\_header.nsamp ECG\_header.nsig]``h]h$[ECG\_header.nsamp ECG\_header.nsig]}}(hjdhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK;ubh)}}(hjChE**ECG\_header**, is a struct with info about the ECG signal, such as:h](jL)}}(hjzh**ECG\_header**h]h ECG_header}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jKubh6, is a struct with info about the ECG signal, such as:}}(hjzh6, is a struct with info about the ECG signal, such as:ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK=ubh)}}(hjChhh](h bullet_list)}}(hjh$}(h(]bullet-h*]h&]h.]h,]uhhh](h list_item)}}(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](hemphasis)}}(hjh*freq*h]hfreq}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jubh1, is the sampling frequency of ECG_matrix signal.}}(hjh2, is the sampling frequency of ECG\_matrix signal.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYK?ubah0jubj)}}(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.]uh0jubh6, description strings about each of the leads/signals.}}(hjh6, description strings about each of the leads/signals.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKAubah0jubj)}}(hjh$}(h&]h(]h*]h,]h.]uh1*nsamp* is the number of samples of ECG\_matrix. h]h)}}(hj h0*nsamp* is the number of samples of ECG\_matrix.h](j)}}(hjh*nsamp*h]hnsamp}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jubh( is the number of samples of ECG_matrix.}}(hjh) is the number of samples of ECG\_matrix.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKCubah0jubj)}}(hjh$}(h&]h(]h*]h,]h.]uh9*nsig* is the amount of leads or signals of ECG\_matrix. h]h)}}(hj5h8*nsig* is the amount of leads or signals of ECG\_matrix.h](j)}}(hj@h*nsig*h]hnsig}}(hjEhhubah$}(h&]h(]h*]h,]h.]uh0jubh1 is the amount of leads or signals of ECG_matrix.}}(hj@h2 is the amount of leads or signals of ECG\_matrix.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKEubah0jubj)}}(hjh$}(h&]h(]h*]h,]h.]uhS*gain* is a vector of [nsig × 1] with the gain of each lead ( ADCsamples / μV ). h]h)}}(hjahR*gain* is a vector of [nsig × 1] with the gain of each lead ( ADCsamples / μV ).h](j)}}(hjlh*gain*h]hgain}}(hjqhhubah$}(h&]h(]h*]h,]h.]uh0jubhL is a vector of [nsig × 1] with the gain of each lead ( ADCsamples / μV ).}}(hjlhL is a vector of [nsig × 1] with the gain of each lead ( ADCsamples / μV ).ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKGubah0jubj)}}(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)}}(hjhQ*adczero* is a vector of [nsig × 1] with the offset of each lead in ADC samples.h](j)}}(hjh *adczero*h]hadczero}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jubhH is a vector of [nsig × 1] with the offset of each lead in ADC samples.}}(hjhH is a vector of [nsig × 1] with the offset of each lead in ADC samples.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKIubah0jubeh0jubh)}}(hjhiand others described in the `Physionet header `__.h](hand others described in the }}(hjhand others described in the ubh reference)}}(hjh$}(h(]namePhysionet headerh*]h&]h.]h,]refuri5http://www.physionet.org/physiotools/wag/header-5.htmuhL`Physionet header `__h]hPhysionet header}}(hjhhubah0jubh.}}(hjhjubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKKubeh$}(h&]h(]h*]h,]h.]uh0hubh)}}(hjCh**progress\_handle**, is a handle to a :doc:`progress\_bar ` object, that can be used to track the progress within your function.h](jL)}}(hjh**progress\_handle**h]hprogress_handle}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jKubh, is a handle to a }}(hjh, is a handle to a ubj)}}(hjh#:doc:`progress\_bar `h]h)}}(hjhjh]h progress_bar}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0hubah$}(jjh(]j progress_barh*]reftypejh&]h.] refdomainhj" refexplicith,]uhXh4h0hhYKMubhE 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.]uhXh4h0hhYKMubh)}}(hjCh**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](jL)}}(hj1h**payload\_in**h]h payload_in}}(hj6hhubah$}(h&]h(]h*]h,]h.]uh0jKubhc, is a user variable, of arbitrary format, allowed to be sent to your function. It is sent via the }}(hj1hc, is a user variable, of arbitrary format, allowed to be sent to your function. It is sent via the ubj)}}(hj1h&:ref:`payload property `h]hinline)}}(hjLhjNh]hpayload property}}(hjShhubah$}(h&]h(](jstdstd-refeh*]h,]h.]uh0jPubah$}(jjh(]j payload_proph*]reftyperefh&]h.] refdomainj^j" refexplicith,]uhXh4h0hhYKPubh of this class, for example:}}(hj1h of this class, for example:ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKPubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubj)}}(hhhX% 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);}}(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);ubah$}(h(]j+ah*]h&]h.]j/j0h,]uhXh4h0jhYKahhubh)}}(hhhand the output of your function must be a struct variable **result**, or if it is a signal, ensure to make ``true`` the ``signal_payload`` property.h](h:and the output of your function must be a struct variable }}(hjh:and the output of your function must be a struct variable ubjL)}}(hjh **result**h]hresult}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jKubh', or if it is a signal, ensure to make }}(hjh', or if it is a signal, ensure to make ubh)}}(hjh``true``h]htrue}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh the }}(hjh the ubh)}}(hjh``signal_payload``h]hsignal_payload}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh property.}}(hjh property.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKbhhubh)}}(hhho``finish_func_pointer`` — A pointer to your arbitrary finish function. ``@default_finish_function (default)``h](h)}}(hjh``finish_func_pointer``h]hfinish_func_pointer}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh2 — A pointer to your arbitrary finish function. }}(hjh2 — A pointer to your arbitrary finish function. ubh)}}(hjh&``@default_finish_function (default)``h]h"@default_finish_function (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKehhubh)}}(hhhX+A function that will operate over the whole result of your arbitrary function, after the payloads resulting of each iteration were concatenated. This is only used when the result of your ``function_pointer`` is **not** a signal (``signal_payload = false``). Your function must follow this prototype:h](hA function that will operate over the whole result of your arbitrary function, after the payloads resulting of each iteration were concatenated. This is only used when the result of your }}(hjhA function that will operate over the whole result of your arbitrary function, after the payloads resulting of each iteration were concatenated. This is only used when the result of your ubh)}}(hjh``function_pointer``h]hfunction_pointer}}(hj!hhubah$}(h&]h(]h*]h,]h.]uh0hubh is }}(hjh is ubjL)}}(hjh**not**h]hnot}}(hj7hhubah$}(h&]h(]h*]h,]h.]uh0jKubh a signal (}}(hjh a signal (ubh)}}(hjh``signal_payload = false``h]hsignal_payload = false}}(hjMhhubah$}(h&]h(]h*]h,]h.]uh0hubh,). Your function must follow this prototype:}}(hjh,). Your function must follow this prototype:ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKghhubj)}}(hhh3payload = your_finish_function(payload, ECG_header)h]h3payload = your_finish_function(payload, ECG_header)}}(hjihjkubah$}(h(]j+ah*]h&]h.]j/j0h,]uhXh4h0jhYKohhubh)}}(hhhwhere the arguments are:h]hwhere the arguments are:}}(hjyhj{ubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYKphhubh)}}(hhhhh](h)}}(hjh%**payload**, is the complete payload.h](jL)}}(hjh **payload**h]hpayload}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jKubh, is the complete payload.}}(hjh, is the complete payload.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKrubh)}}(hjhU**ECG\_header**, is a struct with info about the ECG signal, see above for reference.h](jL)}}(hjh**ECG\_header**h]h ECG_header}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jKubhF, is a struct with info about the ECG signal, see above for reference.}}(hjhF, is a struct with info about the ECG signal, see above for reference.ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKtubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubh)}}(hhhuand this function will change the payload variable as according to your needs and return it to the ECGwrapper object.h]huand this function will change the payload variable as according to your needs and return it to the ECGwrapper object.}}(hjhjubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYKvhhubh)}}(hhh|``concate_func_pointer`` — The pointer to your arbitrary concatenate function. ``@default_concatenate_function (default)``h](h)}}(hjh``concate_func_pointer``h]hconcate_func_pointer}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh9 — The pointer to your arbitrary concatenate function. }}(hjh9 — The pointer to your arbitrary concatenate function. ubh)}}(hjh+``@default_concatenate_function (default)``h]h'@default_concatenate_function (default)}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKxhhubh)}}(hhhA function that will concatenate or integrate the information produced in each part of your recording, when the result of your ``function_pointer`` is **not** a signal (``signal_payload = false``). Your function must follow this prototype:h](hA function that will concatenate or integrate the information produced in each part of your recording, when the result of your }}(hjhA function that will concatenate or integrate the information produced in each part of your recording, when the result of your ubh)}}(hjh``function_pointer``h]hfunction_pointer}}(hj!hhubah$}(h&]h(]h*]h,]h.]uh0hubh is }}(hjh is ubjL)}}(hjh**not**h]hnot}}(hj7hhubah$}(h&]h(]h*]h,]h.]uh0jKubh a signal (}}(hjh a signal (ubh)}}(hjh``signal_payload = false``h]hsignal_payload = false}}(hjMhhubah$}(h&]h(]h*]h,]h.]uh0hubh,). Your function must follow this prototype:}}(hjh,). Your function must follow this prototype:ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKzhhubj)}}(hhh-payload = your_concatenate_function(plA, plB)h]h-payload = your_concatenate_function(plA, plB)}}(hjihjkubah$}(h(]j+ah*]h&]h.]j/j0h,]uhXh4h0jhYKhhubh)}}(hhhwhere the arguments are:h]hwhere the arguments are:}}(hjyhj{ubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYKhhubh)}}(hhhhh]h)}}(hjh7**plA** and **plB** are the two payloads to concatenateh](jL)}}(hjh**plA**h]hplA}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jKubh and }}(hjh and ubjL)}}(hjh**plB**h]hplB}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jKubh$ are the two payloads to concatenate}}(hjh$ are the two payloads to concatenateubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubh)}}(hhhand this function will integrate or concatenate both payloads into the resulting payload. This resulting payload, will be plA in the next iteration of concatenation. The ``default_concatenate_function`` just concatenate payloads:h](hand this function will integrate or concatenate both payloads into the resulting payload. This resulting payload, will be plA in the next iteration of concatenation. The }}(hjhand this function will integrate or concatenate both payloads into the resulting payload. This resulting payload, will be plA in the next iteration of concatenation. The ubh)}}(hjh ``default_concatenate_function``h]hdefault_concatenate_function}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubh just concatenate payloads:}}(hjh just concatenate payloads:ubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKhhubj)}}(hhh% The default behavior of the concatenate function is to concatenate % payloads vertically or row-wise. if( isempty(plA) ) payload = plB; else payload = [plA; plB]; endh]h% The default behavior of the concatenate function is to concatenate % payloads vertically or row-wise. if( isempty(plA) ) payload = plB; else payload = [plA; plB]; end}}(hjh% The default behavior of the concatenate function is to concatenate % payloads vertically or row-wise. if( isempty(plA) ) payload = plB; else payload = [plA; plB]; endubah$}(h(]j+ah*]h&]h.]j/j0h,]uhXh4h0jhYKhhubeh$}(h&]input-argumentsah(]h*]h,]input argumentsah.]uhXh4h0h@hYKhhubhA)}}(hhChhh](hG)}}(hj hExamplesh$}(h&]h(]h*]h,]h.]uh]hExamples}}(hjhjubahXh4h0hFhYKhhubhenumerated_list)}}(hj hhh]j)}}(hj h2Arbitrary task producing a **signal** as a result h$}(h&]h(]h*]h,]h.]uh]h)}}(hj$h1Arbitrary task producing a **signal** as a resulth](hArbitrary task producing a }}(hj/hArbitrary task producing a ubjL)}}(hj/h **signal**h]hsignal}}(hj:hhubah$}(h&]h(]h*]h,]h.]uh0jKubh as a result}}(hj/h as a resultubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKubahXh4h0jhYNhhubah$}(enumtypearabich(]suffixjh*]h&]h.]prefixhh,]uhXh4h0jhYKhhubh)}}(hj hhh](h)}}(hj`hThis example is used in the QRScorrector function to perform template-matching on an ECGwrapper (arbitrary big recording) object.h]hThis example is used in the QRScorrector function to perform template-matching on an ECGwrapper (arbitrary big recording) object.}}(hjdhjfubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYKubj)}}(hj`hXaux_w = ECGwrapper('recording_name', 'your_path/recname'); aux_w.ECGtaskHandle = 'arbitrary_function'; % This is in case you want always to recalculate results, no caching aux_w.cacheResults = false; % Use first and third columns-signals aux_w.ECGtaskHandle.lead_idx = [1 3]; % Produce a signal as a result aux_w.ECGtaskHandle.signal_payload = true; % Add a user-string to identify the run aux_w.ECGtaskHandle.user_string = ['similarity_calc_for_lead_' num2str(sort(lead_idx)) ]; % add your function pointer aux_w.ECGtaskHandle.function_pointer = @similarity_calculation; % and any data your function may need. aux_w.ECGtaskHandle.payload = pattern2detect; % and you are ready to go ! aux_w.Runh]hXaux_w = ECGwrapper('recording_name', 'your_path/recname'); aux_w.ECGtaskHandle = 'arbitrary_function'; % This is in case you want always to recalculate results, no caching aux_w.cacheResults = false; % Use first and third columns-signals aux_w.ECGtaskHandle.lead_idx = [1 3]; % Produce a signal as a result aux_w.ECGtaskHandle.signal_payload = true; % Add a user-string to identify the run aux_w.ECGtaskHandle.user_string = ['similarity_calc_for_lead_' num2str(sort(lead_idx)) ]; % add your function pointer aux_w.ECGtaskHandle.function_pointer = @similarity_calculation; % and any data your function may need. aux_w.ECGtaskHandle.payload = pattern2detect; % and you are ready to go ! aux_w.Run}}(hjthXaux_w = ECGwrapper('recording_name', 'your_path/recname'); aux_w.ECGtaskHandle = 'arbitrary_function'; % This is in case you want always to recalculate results, no caching aux_w.cacheResults = false; % Use first and third columns-signals aux_w.ECGtaskHandle.lead_idx = [1 3]; % Produce a signal as a result aux_w.ECGtaskHandle.signal_payload = true; % Add a user-string to identify the run aux_w.ECGtaskHandle.user_string = ['similarity_calc_for_lead_' num2str(sort(lead_idx)) ]; % add your function pointer aux_w.ECGtaskHandle.function_pointer = @similarity_calculation; % and any data your function may need. aux_w.ECGtaskHandle.payload = pattern2detect; % and you are ready to go ! aux_w.Runubah$}(h(]j+ah*]h&]h.]j/j0h,]uh0jubeh$}(h&]h(]h*]h,]h.]uhXNh0hhYNhhubj)}}(hj hhh]j)}}(hjh1Arbitrary task producing an **arbitrary result** h$}(h&]h(]h*]h,]h.]uh]h)}}(hjh0Arbitrary task producing an **arbitrary result**h](hArbitrary task producing an }}(hjhArbitrary task producing an ubjL)}}(hjh**arbitrary result**h]harbitrary result}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0jKubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKubahXh4h0jhYNhhubah$}(jVjWh(]jYjh*]h&]h.]j]hh,]startKuhXh4h0jhYKhhubh)}}(hj hhh](h)}}(hjhJThis is achieved by defining 3 properties (function handles) that perform:h]hJThis is achieved by defining 3 properties (function handles) that perform:}}(hjhjubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYKubj)}}(hjh$}(h(]jjh*]h&]h.]h,]uhhh](j)}}(hjh$}(h&]h(]h*]h,]h.]uhLThe arbitrary task, which produces an arbitrary result ``function_pointer`` h]h)}}(hjhKThe arbitrary task, which produces an arbitrary result ``function_pointer``h](h7The arbitrary task, which produces an arbitrary result }}(hjh7The arbitrary task, which produces an arbitrary result ubh)}}(hjh``function_pointer``h]hfunction_pointer}}(hjhhubah$}(h&]h(]h*]h,]h.]uh0hubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYKubah0jubj)}}(hjh$}(h&]h(]h*]h,]h.]uh. Otherwise, the results depends on the user-defined output of}}(hj h>. Otherwise, the results depends on the user-defined output ofubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYMhhubeh$}(h&](results-formatj eh(]h*]h,](results formatarbitrary_result_formateh.]uhXh4expect_referenced_by_id}j j sexpect_referenced_by_name}j< j sh0h@hYM hhubhA)}}(hhChhh](hG)}}(hjC hSee Alsoh$}(h&]h(]h*]h,]h.]uh]hSee Also}}(hjG hjI ubahXh4h0hFhYMhhubh)}}(hjC hhh]h)}}(hjW h:doc:`ECGtask ` \| :doc:`QRS detection ` \| :doc:`ECG delineation ` \| :doc:`examples `h](j)}}(hj[ h:doc:`ECGtask `h]h)}}(hj` hjb h]hECGtask}}(hje hhubah$}(h&]h(](jdoceh*]h,]h.]uh0hubah$}(jjh(]jECGtaskh*]reftypejp h&]h.] refdomainhj" refexplicith,]uhXh4h0hhYMubh | }}(hj[ h \| ubj)}}(hj[ h$:doc:`QRS detection `h]h)}}(hj hj h]h QRS detection}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0hubah$}(jjh(]j QRS_detectionh*]reftypej h&]h.] refdomainhj" refexplicith,]uhXh4h0hhYMubh | }}(hj[ h \| ubj)}}(hj[ h':doc:`ECG delineation `h]h)}}(hj hj h]hECG delineation}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0hubah$}(jjh(]jECGdelineationh*]reftypej h&]h.] refdomainhj" refexplicith,]uhXh4h0hhYMubh | }}(hj[ h \| ubj)}}(hj[ h:doc:`examples `h]h)}}(hj hj h]hexamples}}(hj hhubah$}(h&]h(](jdoceh*]h,]h.]uh0hubah$}(jjh(]jexamplesh*]reftypej h&]h.] refdomainhj" refexplicith,]uhXh4h0hhYMubeh$}(h&]h(]h*]h,]h.]uhXh4h0hhYMubah$}(h&]h(]h*]h,]h.]uhXh4h0hhYNhhubj )}}(hjC hG.. _`MIT format`: http://www.physionet.org/physiotools/wag/signal-5.htmh] referencedKh$}(h(]jj! h*]h&] mit-formatah.]h,] mit formatauhXh4h0j hYMhhubeh$}(h&]see-alsoah(]h*]h,]see alsoah.]uhXh4h0h@hYMhhubeh$}(h&]arbitrary-tasksah(]h*]h,]arbitrary tasksah.]uhXh4h0h@hYKhhubaautofootnote_refs]settingsdocutils.frontendValues)}}(envNhFNconfigN 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_handlerjO file_insertion_enabledexpose_internalsNrecord_dependenciesN_sourceh4dump_internalsNembed_stylesheetdoctitle_xform source_linkNub current_lineN citation_refs}parse_messages]h)}}(hj hhh]h)}}(hjj hhh]h:Enumerated list start value not ordinal-1: "2" (ordinal 2)}}(hjn hhubah$}(h&]h(]h*]h,]h.]uh0hubah$}(h(]sourceh4levelKh*]h&]h.]typeh:h,]lineKuhXh4h0h hYKhhubasubstitution_names}h$}(h(]sourceh4h*]h&]h.]h,]u citations]hhids}(j7 j j j jhj j hhkj hCj j j jC urefnames} mit format]j asrefids}j ]j assymbol_footnote_refs]symbol_footnotes]substitution_defs}id_startKnameids}(j j j< j jjj; j7 hhj j j j j j u nametypes}(j Nj< jNj; NhNj Nj Nj uautofootnote_startKindirect_targets] autofootnotes] footnotes]ub.