#NEWLINE# def calc_medianfilter( self , data , length = 5 ) : #NEWLINE# #INDENT# assert ( len ( data . shape ) >= 2 ) , AutoCutsError ( 'input data should be 2D or greater' ) #NEWLINE# if ( length is None ) : #NEWLINE# #INDENT# length = 5 #NEWLINE# #UNINDENT# xout = scipy . ndimage . filters . median_filter ( data , size = length ) #NEWLINE# loval = numpy . nanmin ( xout ) #NEWLINE# hival = numpy . nanmax ( xout ) #NEWLINE# return ( loval , hival )