#NEWLINE# def model( self , params = None , x = None , **kws ) : #NEWLINE# #INDENT# if ( params is None ) : #NEWLINE# #INDENT# params = self . params #NEWLINE# #UNINDENT# height = self . height . value #NEWLINE# center = params . center . value #NEWLINE# width = params . width . value #NEWLINE# out = ( ( x - center ) / max ( width , 1e-13 ) ) #NEWLINE# if ( self . step == 'atan' ) : #NEWLINE# #INDENT# out = ( 0.5 + ( np . arctan ( out ) / np . pi ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . step == 'erf' ) : #NEWLINE# #INDENT# out = ( 0.5 * ( 1 + erf ( out ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# out [ np . where ( ( out < 0 ) ) ] = 0.0 #NEWLINE# out [ np . where ( ( out > 1 ) ) ] = 1.0 #NEWLINE# #UNINDENT# #UNINDENT# return ( height * out )