def autointerpret_specimen(self, specimen, step_size, calculation_type):
        """In Dev"""
        if self.COORDINATE_SYSTEM == 'geographic':
            block = self.Data[specimen]['zijdblock_geo']
        elif self.COORDINATE_SYSTEM == 'tilt-corrected':
            block = self.Data[specimen]['zijdblock_tilt']
        else:
            block = self.Data[specimen]['zijdblock']
        if step_size == None:
            step_size = int(len(block)/10 + .5)
            if step_size < 3:
                step_size = 3
        temps = []
        mads = []
        for i in range(len(block)-step_size):
            if block[i][5] == 'b':
                return
            try:
                mpars = pmag.domean(block, i, i+step_size, calculation_type)
            except (IndexError, TypeError) as e:
                return
            if 'specimen_mad' in list(mpars.keys()):
                temps.append(block[i][0])
                mads.append(mpars['specimen_mad'])
        if mads == []:
            return

        peaks = find_peaks_cwt(array(mads), arange(5, 10))
        len_temps = len(self.Data[specimen]['zijdblock_steps'])
        peaks = [0] + peaks + [len(temps)]

        prev_peak = peaks[0]
        for peak in peaks[1:]:
            if peak - prev_peak < 3:
                prev_peak = peak
                continue
            tmin = self.Data[specimen]['zijdblock_steps'][prev_peak]
            tmax = self.Data[specimen]['zijdblock_steps'][peak]
            self.add_fit(specimen, None, tmin, tmax, calculation_type)
            prev_peak = peak+1
def autointerpret_specimen ( self , specimen , step_size , calculation_type ) : if self . COORDINATE_SYSTEM == 'geographic' : block = self . Data [ specimen ] [ 'zijdblock_geo' ] elif self . COORDINATE_SYSTEM == 'tilt-corrected' : block = self . Data [ specimen ] [ 'zijdblock_tilt' ] else : block = self . Data [ specimen ] [ 'zijdblock' ] if step_size == None : step_size = int ( len ( block ) / 10 + .5 ) if step_size < 3 : step_size = 3 temps = [ ] mads = [ ] for i in range ( len ( block ) - step_size ) : if block [ i ] [ 5 ] == 'b' : return try : mpars = pmag . domean ( block , i , i + step_size , calculation_type ) except ( IndexError , TypeError ) as e : return if 'specimen_mad' in list ( mpars . keys ( ) ) : temps . append ( block [ i ] [ 0 ] ) mads . append ( mpars [ 'specimen_mad' ] ) if mads == [ ] : return peaks = find_peaks_cwt ( array ( mads ) , arange ( 5 , 10 ) ) len_temps = len ( self . Data [ specimen ] [ 'zijdblock_steps' ] ) peaks = [ 0 ] + peaks + [ len ( temps ) ] prev_peak = peaks [ 0 ] for peak in peaks [ 1 : ] : if peak - prev_peak < 3 : prev_peak = peak continue tmin = self . Data [ specimen ] [ 'zijdblock_steps' ] [ prev_peak ] tmax = self . Data [ specimen ] [ 'zijdblock_steps' ] [ peak ] self . add_fit ( specimen , None , tmin , tmax , calculation_type ) prev_peak = peak + 1
In Dev