Esempio n. 1
0
    def test_hull(self):
        inter1 = Interval(0, 10)
        inter2 = Interval(15, 20)

        inter = inter1.hull(inter2)
        assert inter.start == 0
        assert inter.end == 20

        inter = inter2.hull(inter1)
        assert inter.start == 0
        assert inter.end == 20
Esempio n. 2
0
#Temporal margin for measurement discrepancies (1 mm in standard scale)
TMARGIN = int(math.ceil(m2s(40)))

############################################
### Beat Annotations related constraints ###
############################################

RDEFLECTION_MIN_DIST = m2s(80)  #Minimum distance for different annotations

#######################################
### QRS-complex related constraints ###
#######################################

NQRS_DUR = Iv(m2s(15), m2s(200))  #Normal QRS complex duration
VQRS_DUR = Iv(m2s(120), m2s(400))  #Ventricular QRS complex duration
QRS_DUR = NQRS_DUR.hull(VQRS_DUR)  #QRS complex duration
SPIKE_DUR = int(round(m2s(30)))  #Maximum duration of a pace spike.
SPIKE_EDGE_AMP = p2d(0.2)  #Minimum amplitude of each edge of a pace spike.
SPIKE_ECGE_DIFF = p2d(0.1)  #Maximum amplitude differences for spike edges.
#Minimum distances between the begin of the complex and the peak, and between
#the peak and the end
QRS_START_PK = m2s(5)
QRS_PK_END = m2s(40)
#Distances between R-Deflections and the starting of the complex.
QRS_RDEF_DMAX = m2s(80)
#Maximum difference in the amplitude to consider a signal fragment as a missed
#QRS (compared with an actual detected QRS)
MISSED_QRS_MAX_DIFF = 0.5

################################
### P Wave related constants ###