예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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
예제 #4
0
    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
예제 #5
0
    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
예제 #6
0
    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