def get_conf(sef): """ Get configuration in form of a dictionary. Another identically configured ParticleMap instance can be initialised by: .. code-block:: python conf = P0.get_conf() # P0: already existing ParticleSphere instance P1 = condor.ParticleSpheroid(**conf) # P1: new ParticleSphere instance with the same configuration as P0 """ return AbstractContinuousParticle.get_conf(self)
def get_conf(self): """ Get configuration in form of a dictionary. Another identically configured ParticleMap instance can be initialised by: .. code-block:: python conf = P0.get_conf() # P0: already existing ParticleSpheroid instance P1 = condor.ParticleSpheroid(**conf) # P1: new ParticleSpheroid instance with the same configuration as P0 """ conf = {} conf.update(AbstractContinuousParticle.get_conf(self)) conf["flattening"] = self.flattening_mean fvar = self._flattening_variation.get_conf() conf["flattening_variation"] = fvar["mode"] conf["flattening_spread"] = fvar["spread"] conf["flattening_variation_n"] = fvar["n"] return conf
def get_conf(self): """ Get configuration in form of a dictionary. Another identically configured ParticleMap instance can be initialised by: .. code-block:: python conf = P0.get_conf() # P0: already existing ParticleMap instance P1 = condor.ParticleMap(**conf) # P1: new ParticleMap instance with the same configuration as P0 """ conf = {} conf.update(AbstractContinuousParticle.get_conf(self)) conf["geometry"] = self.geometry if self.geometry == "custom": m, dx = self.get_original_map() conf["map3d"] = m conf["dx"] = dx if self.geometry == "spheroid": conf["flattening"] = self.flattening return conf