Changeset 13093


Ignore:
Timestamp:
08/20/12 10:55:23 (13 years ago)
Author:
jschierm
Message:

CHG: Added call to setdefaultparameters in inversion subclass.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/inversion.py

    r13059 r13093  
    3737                self.vel_obs                     = float('NaN')
    3838                self.thickness_obs               = float('NaN')
     39
     40                #set defaults
     41                self.setdefaultparameters()
     42
    3943                #}}}
    4044        def __repr__(self):
     
    7882                #parameter to be inferred by control methods (only
    7983                #drag and B are supported yet)
    80                 self.control_parameters=['FrictionCoefficient']
     84                self.control_parameters='FrictionCoefficient'
    8185
    8286                #number of steps in the control methods
     
    8589                #maximum number of iteration in the optimization algorithm for
    8690                #each step
    87                 self.maxiter_per_step=20*ones(self.nsteps)
     91                self.maxiter_per_step=20*numpy.ones(self.nsteps)
    8892
    8993                #the inversed parameter is updated as follows:
     
    9296                #inversed parameter (10^8 for B, 50 for drag) and can be decreased
    9397                #after the first iterations
    94                 self.gradient_scaling=50*ones(self.nsteps)
     98                self.gradient_scaling=50*numpy.ones(self.nsteps)
    9599
    96100                #several responses can be used:
    97                 self.cost_functions=101*ones(self.nsteps)
     101                self.cost_functions=101*numpy.ones(self.nsteps)
    98102
    99103                #step_threshold is used to speed up control method. When
    100104                #misfit(1)/misfit(0) < self.step_threshold, we go directly to
    101105                #the next step
    102                 self.step_threshold=.7*ones(self.nsteps) #30 per cent decrement
     106                self.step_threshold=.7*numpy.ones(self.nsteps) #30 per cent decrement
    103107
    104108                #stop control solution at the gradient computation and return it?
     
    108112                #if J[n]-J[n-1]/J[n] < criteria, the control run stops
    109113                #NaN if not applied
    110                 self.cost_function_threshold=NaN #not activated
     114                self.cost_function_threshold=float('NaN')    #not activated
    111115
    112116                return self
Note: See TracChangeset for help on using the changeset viewer.