Return the pmagpy paramters dictionary associated with this fit and the given
        coordinate system
        @param: coordinate_system -> the coordinate system who's parameters to return
486467
def get(self,coordinate_system):
        
        if coordinate_system == 'DA-DIR' or coordinate_system == 'specimen':
            return self.pars
        elif coordinate_system == 'DA-DIR-GEO' or coordinate_system == 'geographic':
            return self.geopars
        elif coordinate_system == 'DA-DIR-TILT' or coordinate_system == 'tilt-corrected':
            return self.tiltpars
        else:
            print("-E- no such parameters to fetch for " + coordinate_system + " in fit: " + self.name)
            return None
648629
def constant_tuple_dict(self):
        
        return {constant_tuple.constant: constant_tuple
                for name, prior_model in self.prior_model_tuples
                for constant_tuple in prior_model.constant_tuples}.values()
490416
def as_dict(self):
        
        return {"@module": self.__class__.__module__,
                "@class": self.__class__.__name__,
                "additional_condition": self._additional_condition,
                "symmetry_measure_type": self.symmetry_measure_type,
                "nb_set_weights": [nb_set_weight.as_dict() for nb_set_weight in self.nb_set_weights],
                "ce_estimator": self.ce_estimator,
                }
1223072
def _get_dtype_maps():
    
    
    # Define pairs
    tmp = [ (np.float32, 'MET_FLOAT'),  (np.float64, 'MET_DOUBLE'),
            (np.uint8, 'MET_UCHAR'),    (np.int8, 'MET_CHAR'),
            (np.uint16, 'MET_USHORT'),  (np.int16, 'MET_SHORT'),
            (np.uint32, 'MET_UINT'),    (np.int32, 'MET_INT'),
            (np.uint64, 'MET_ULONG'),   (np.int64, 'MET_LONG') ]
    
    # Create dictionaries
    map1, map2 = {}, {}
    for np_type, itk_type in tmp:
        map1[np_type.__name__] = itk_type
        map2[itk_type] = np_type.__name__
    
    # Done
    return map1, map2
456046
def _get_coordinatenames(self):
        
        validnames = ("direction", "spectral", "linear", "stokes", "tabular")
        self._names = [""] * len(validnames)
        n = 0
        for key in self._csys.keys():
            for name in validnames:
                if key.startswith(name):
                    idx = int(key[len(name):])
                    self._names[idx] = name
                    n += 1
        # reverse as we are c order in python
        self._names = self._names[:n][::-1]

        if len(self._names) == 0:
            raise LookupError("Coordinate record doesn't contain valid coordinates")
550108
def imm_dict(imm):
    '''
    
    '''
    immd = dict(**imm_params(imm))
    for (k,v) in six.iteritems(imm_values(imm)):
        immd[k] = v
    return immd
591779
def _get_algorithm_and_params(self, algorithm_name, algorithm_params):
        
        algorithm_name = algorithm_name or CORRELATOR_ALGORITHM
        try:
            self.algorithm = correlator_algorithms[algorithm_name]
        except KeyError:
            raise exceptions.AlgorithmNotFound('luminol.Correlator: ' + str(algorithm_name) + ' not found.')
        # Merge parameters.
        if algorithm_params:
            if not isinstance(algorithm_params, dict):
                raise exceptions.InvalidDataFormat('luminol.Correlator: algorithm_params passed is not a dictionary.')
            else:
                # self.algorithm_params = dict(algorithm_params.items() + self.algorithm_params.items())
                self.algorithm_params = self.algorithm_params.copy()
                self.algorithm_params.update(algorithm_params)
225824
def _get_param_values(self, name):
        
        for param in self.data.get('paParameters', []):
            for _pa_parameter, values in param.items():
                if values.get('name') == name:
                    return values
1059667
def params_mpl(df):
    """"""
    return {'ANIb_alignment_lengths': ('afmhot', df.values.min(),
                                       df.values.max()),
            'ANIb_percentage_identity': ('spbnd_BuRd', 0, 1),
            'ANIb_alignment_coverage': ('BuRd', 0, 1),
            'ANIb_hadamard': ('hadamard_BuRd', 0, 1),
            'ANIb_similarity_errors': ('afmhot', df.values.min(),
                                       df.values.max()),
            'ANIm_alignment_lengths': ('afmhot', df.values.min(),
                                       df.values.max()),
            'ANIm_percentage_identity': ('spbnd_BuRd', 0, 1),
            'ANIm_alignment_coverage': ('BuRd', 0, 1),
            'ANIm_hadamard': ('hadamard_BuRd', 0, 1),
            'ANIm_similarity_errors': ('afmhot', df.values.min(),
                                       df.values.max()),
            'TETRA_correlations': ('spbnd_BuRd', 0, 1),
            'ANIblastall_alignment_lengths': ('afmhot', df.values.min(),
                                              df.values.max()),
            'ANIblastall_percentage_identity': ('spbnd_BuRd', 0, 1),
            'ANIblastall_alignment_coverage': ('BuRd', 0, 1),
            'ANIblastall_hadamard': ('hadamard_BuRd', 0, 1),
            'ANIblastall_similarity_errors': ('afmhot', df.values.min(),
                                              df.values.max())}
838357
def params(self):
        
        return [{"name": p_name, "type": p_type.__name__}
                for (p_name, p_type) in self.signature.parameter_types]
1359568
def get_lats():
  
  lats = {}
  fname = pkg_resources.resource_filename(__name__, 'resources/Latitudes-Longitudes.csv')
  with open(fname, 'rb') as csvfile:
    # Read latitude/longitude coordinates
    reader = csv.reader(csvfile, delimiter = ',')
    for row in reader:
      word = row[0].lower()
      word = re.sub(' ', '', word)
      lats[word] = float(row[1])

  return lats
1130575
def get_structure_from_dict(d):
    

    species = []
    frac_coords = []
    masses = []
    if 'points' in d:
        for p in d['points']:
            species.append(p['symbol'])
            frac_coords.append(p['coordinates'])
            masses.append(p['mass'])
    elif 'atoms' in d:
        for p in d['atoms']:
            species.append(p['symbol'])
            frac_coords.append(p['position'])
            masses.append(p['mass'])
    else:
        raise ValueError('The dict does not contain structural information')

    return Structure(d['lattice'], species, frac_coords,
                     site_properties={"phonopy_masses": masses})
36748
def axes(self):
        """"""
        axes = self.element.findall(GML_NS + 'axis')
        return [Axis(axis.find(GML_NS + 'CoordinateSystemAxis')) for
                axis in axes]
3006
def p_Dictionary(p):
  
  p[0] = model.Dictionary(name=p[2], parent=p[3], members=p[5])
424972
def to_dict(self):
        

        input_dict = super(StdPeriodic, self)._save_to_input_dict()
        input_dict["class"] = "GPy.kern.StdPeriodic"
        input_dict["variance"] = self.variance.values.tolist()
        input_dict["period"] = self.period.values.tolist()
        input_dict["lengthscale"] = self.lengthscale.values.tolist()
        input_dict["ARD1"] = self.ARD1
        input_dict["ARD2"] = self.ARD2
        return input_dict
1257555
def paramnames(co):
    
    flags = co.co_flags
    varnames = co.co_varnames

    argcount, kwonlyargcount = co.co_argcount, co.co_kwonlyargcount
    total = argcount + kwonlyargcount

    args = varnames[:argcount]
    kwonlyargs = varnames[argcount:total]
    varargs, varkwargs = None, None
    if flags & Flag.CO_VARARGS:
        varargs = varnames[total]
        total += 1
    if flags & Flag.CO_VARKEYWORDS:
        varkwargs = varnames[total]

    return args, kwonlyargs, varargs, varkwargs
360357
def coordinates(self, reference=None):
        
        coordinates = [i._coordinates for i in self.get_trace(reference)]
        return functools.reduce(lambda a, b: a + b, coordinates)