def estimate(self,param,burn=None,clip=10.0,alpha=0.32):
        """ Estimate parameter value and uncertainties """
        # FIXME: Need to add age and metallicity to composite isochrone params (currently properties)
        if param not in list(self.samples.names) + list(self.source.params) + ['age','metallicity']:
            msg = 'Unrecognized parameter: %s'%param
            raise KeyError(msg)

        # If the parameter is in the samples
        if param in self.samples.names:
            if param.startswith('position_angle'):
                return self.estimate_position_angle(param,burn=burn,
                                                    clip=clip,alpha=alpha)

            return self.samples.peak_interval(param,burn=burn,clip=clip,alpha=alpha)
 
        mle = self.get_mle()
        errors = [np.nan,np.nan] 

        # Set default value to the MLE value
        if param in self.source.params:
            err = self.source.params[param].errors
            if err is not None: errors = err

        # For age and metallicity from composite isochrone
        return [float(mle[param]),errors]
def estimate ( self , param , burn = None , clip = 10.0 , alpha = 0.32 ) : if param not in list ( self . samples . names ) + list ( self . source . params ) + [ 'age' , 'metallicity' ] : msg = 'Unrecognized parameter: %s' % param raise KeyError ( msg ) if param in self . samples . names : if param . startswith ( 'position_angle' ) : return self . estimate_position_angle ( param , burn = burn , clip = clip , alpha = alpha ) return self . samples . peak_interval ( param , burn = burn , clip = clip , alpha = alpha ) mle = self . get_mle ( ) errors = [ np . nan , np . nan ] if param in self . source . params : err = self . source . params [ param ] . errors if err is not None : errors = err return [ float ( mle [ param ] ) , errors ]
Estimate parameter value and uncertainties