wave_generator
Functions
sin_wave_generator(start, stop, duration, duration_counter, waves)
Helper function for QRS complex
Parameters:
-
start(float) –Start position
-
stop(float) –Stop position
-
duration(NDArray) –Duration of wave
-
duration_counter(int) –Duration index
-
waves(NDArray) –Wave singla
Returns:
Source code in physiokit/ecg/synthetic/wave_generator.py
syn_p_wave(p_length=100, p_voltage=0.25, p_biphasic=False, p_biphasic_ratio=1.5, p_lean=0.8, flipper=1)
P wave generator
Parameters:
-
p_length(float, default:100) –Length of p wave in mS. Defaults to 100.
-
p_voltage(float, default:0.25) –Magnitude of p wave in mV. Defaults to 0.25.
-
p_biphasic(bool, default:False) –Whether p wave is biphasic. Defaults to False.
-
p_biphasic_ratio(float, default:1.5) –Magnitude of second peak as a multiple of first peak. Defaults to 1.5.
-
p_lean(float, default:0.8) –Skew of p wave < 1 skews left, > 1 skews right. Defaults to 0.8.
-
flipper(float, default:1) –Voltage multiplier applied uniformly to wave (1: no, -1: flips). Defaults to 1.
Returns:
Source code in physiokit/ecg/synthetic/wave_generator.py
syn_qrs_complex(qrs_duration=80, q_depth=0.2, q_to_qr_duration_ratio=0.2, r_height=1, r_1_upswing_ratio=0.5, r_1_downswing_ratio=0.25, r_prime_present=True, r_to_r_prime_duration_ratio=1, r_prime_height=1, r_2_upswing_ratio=0.5, r_2_downswing_ratio=0.25, s_prime_height=0.2, s_present=True, s_to_qrs_duration_ratio=0.1, s_depth=0.1, flipper=1, j_point=0)
QRS complex generator
Parameters:
-
qrs_duration(float, default:80) –Length of QRS complex in mS. Defaults to 80.
-
q_depth(float, default:0.2) –Magnitude of Q wave in mV. Defaults to 0.2.
-
q_to_qr_duration_ratio(float, default:0.2) –Ratio of Q wave duration to QR complex duration. Defaults to 0.2.
-
r_height(float, default:1) –Magnitude of R wave in mV. Defaults to 1.
-
r_1_upswing_ratio(float, default:0.5) –Dur of R wave upswing as fraction of total. Defaults to 0.5.
-
r_1_downswing_ratio(float, default:0.25) –Dur of initial R wave downswing as frac of total. Defaults to 0.25.
-
r_prime_present(float, default:True) –Boolean denoting presence of R' wave. Defaults to True.
-
r_to_r_prime_duration_ratio(float, default:1) –Ratio of duration of R : R'. Defaults to 1.
-
r_prime_height(float, default:1) –Magnitude of R' wave in mV. Defaults to 1.
-
r_2_upswing_ratio(float, default:0.5) –Dur of R' wave upswing as frac of total R'. Defaults to 0.5.
-
r_2_downswing_ratio(float, default:0.25) –Dur of initial R' wave downswing as frac of total R'. Defaults to 0.25.
-
s_prime_height(float, default:0.2) –If S wave is "W", mag of pos mid-wave inflection in mV. Defaults to 0.2.
-
s_present(bool, default:True) –Boolean denoting presence of S wave. Defaults to True.
-
s_to_qrs_duration_ratio(float, default:0.1) –Ratio of S wave duration to QRS complex duration. Defaults to 0.1.
-
s_depth(float, default:0.1) –Magnitude of S wave in mV. Defaults to 0.1.
-
flipper(float, default:1) –Voltage multiplier applied uniformly (-1: flip). Defaults to 1.
-
j_point(float, default:0) –Magnitude of J point in mV. Defaults to 0.
Returns:
Source code in physiokit/ecg/synthetic/wave_generator.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
syn_st_segment(j_point=0, st_delta=0, st_length=50, t_height=0.5, flipper=1)
ST segment generator
Parameters:
-
j_point(float, default:0) –magnitude of J point in mV. Defaults to 0.
-
st_delta(float, default:0) –Change in mag of ST segment over wave in mV (0.1: up, -0.1: down). Defaults to 0.
-
st_length(float, default:50) –Duration of ST segment in mS. Defaults to 50.
-
t_height(float, default:0.5) –Not used. Defaults to 0.5.
-
flipper(float, default:1) –Voltage multiplier applied uniformly (1: no effect, -1: flips wave). Defaults to 1.
Returns:
Source code in physiokit/ecg/synthetic/wave_generator.py
syn_t_wave(st_end=0, t_height=0.5, t_length=150, flipper=1, t_lean=1)
T wave generator
Parameters:
-
st_end(float, default:0) –Magnitude of the end of the ST segment in mV. Defaults to 0.
-
t_height(float, default:0.5) –Magnitude of the T wave in mV. Defaults to 0.5.
-
t_length(int, default:150) –Duration of the T wave in mS. Defaults to 150.
-
flipper(float, default:1) –Voltage multiplier applied uniformly (-1: flips wave). Defaults to 1.
-
t_lean(float, default:1) –Skews T wave in order to increase variation in morphology. Defaults to 1.
Returns: