#NEWLINE# def _get_input_values( self ) : #NEWLINE# #INDENT# 'Generator for the values' #NEWLINE# baseline = self . driver . eval_parameters ( ) #NEWLINE# delta = self . driver . get_fd_steps ( ) #NEWLINE# mask = zeros ( baseline . size , 'd' ) #NEWLINE# if ( not self . skip_baseline ) : #NEWLINE# #INDENT# if ( not ( ( self . form == 'CENTRAL' ) and ( ( self . order % 2 ) == 1 ) ) ) : #NEWLINE# #INDENT# ( yield baseline ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self . form == 'FORWARD' ) : #NEWLINE# #INDENT# offset = 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . form == 'BACKWARD' ) : #NEWLINE# #INDENT# offset = ( - self . order ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . form == 'CENTRAL' ) : #NEWLINE# #INDENT# if ( ( self . order % 2 ) == 1 ) : #NEWLINE# #INDENT# offset = ( 0.5 - self . order ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# offset = ( 1 - self . order ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( self . form in [ 'BACKWARD' , 'FORWARD' ] ) : #NEWLINE# #INDENT# for iparam in range ( len ( mask ) ) : #NEWLINE# #INDENT# mask [ iparam ] = 1.0 #NEWLINE# for i in range ( self . order ) : #NEWLINE# #INDENT# var_val = ( baseline + ( ( ( offset + i ) * delta ) * mask ) ) #NEWLINE# ( yield var_val ) #NEWLINE# #UNINDENT# mask [ iparam ] = 0.0 #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for iparam in range ( len ( mask ) ) : #NEWLINE# #INDENT# mask [ iparam ] = 1.0 #NEWLINE# if ( ( self . order % 2 ) == 1 ) : #NEWLINE# #INDENT# for i in range ( ( self . order + 1 ) ) : #NEWLINE# #INDENT# var_val = ( baseline + ( ( ( offset + i ) * delta ) * mask ) ) #NEWLINE# ( yield var_val ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for i in range ( ( self . order + 1 ) ) : #NEWLINE# #INDENT# if ( ( offset + i ) != 0 ) : #NEWLINE# #INDENT# var_val = ( baseline + ( ( ( offset + i ) * delta ) * mask ) ) #NEWLINE# ( yield var_val ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# mask [ iparam ] = 0.0