Beispiel #1
0
    def initialize(self):

        shape = self.getParam("apertype")
        dim = self.getParam("aperture")
        if len(dim) > 0:
            if shape == 1:
                self.aperture = Aperture(shape, dim[0], 0.0, 0.0, 0.0)
            if shape == 2:
                self.aperture = Aperture(shape, dim[0], dim[1], 0.0, 0.0)
            if shape == 3:
                self.aperture = Aperture(shape, dim[0], dim[1], 0.0, 0.0)
Beispiel #2
0
 def __init__(self,
              aperture='slit',
              mass_profile='power_law',
              light_profile='Hernquist',
              anisotropy_type='r_ani',
              psf_fwhm=0.7,
              kwargs_cosmo={
                  'D_d': 1000,
                  'D_s': 2000,
                  'D_ds': 500
              }):
     """
     initializes the observation condition and masks
     :param aperture_type: string
     :param psf_fwhm: float
     """
     self._mass_profile = mass_profile
     self._fwhm = psf_fwhm
     self._kwargs_cosmo = kwargs_cosmo
     self.lightProfile = LightProfile_old(light_profile)
     self.aperture = Aperture(aperture)
     self.anisotropy = Anisotropy(anisotropy_type)
     self.FWHM = psf_fwhm
     self.jeans_solver = Jeans_solver(kwargs_cosmo, mass_profile,
                                      light_profile, anisotropy_type)
Beispiel #3
0
	def __init__(self, shape, a, b, pos = 0., c = 0., d = 0., name = "aperture"):
		BaseLinacNode.__init__(self,name)
		self.shape = shape
		self.a = a
		self.b = b
		self.c = c
		self.d = d
		self.aperture = Aperture(self.shape, self.a, self.b, self.c, self.d, pos)	
		self.setPosition(pos)
    def __init__(self, gb):
        self.gb = gb

        # -- flow -- #
        self.discr_flow = Flow(gb)

        shape = self.discr_flow.shape()
        self.flux_pressure = np.zeros(shape)

        # -- temperature -- #
        self.discr_temperature = Heat(gb)

        shape = self.discr_temperature.shape()
        self.temperature = np.zeros(shape)
        self.temperature_old = np.zeros(shape)

        # -- solute and precipitate -- #
        self.discr_solute_advection_diffusion = Transport(gb)
        self.discr_solute_precipitate_reaction = Reaction(gb)

        shape = self.discr_solute_advection_diffusion.shape()
        self.solute = np.zeros(shape)
        self.precipitate = np.zeros(shape)
        self.solute_old = np.zeros(shape)
        self.precipitate_old = np.zeros(shape)

        # -- porosity -- #
        self.discr_porosity = Porosity(gb)

        shape = self.discr_porosity.shape()
        self.porosity = np.zeros(shape)
        self.porosity_old = np.zeros(shape)
        self.porosity_star = np.zeros(shape)

        # -- aperture -- #
        self.discr_aperture = Aperture(gb)

        shape = self.discr_aperture.shape()
        self.aperture = np.zeros(shape)
        self.aperture_old = np.zeros(shape)
        self.aperture_star = np.zeros(shape)

        # -- composite variables -- #
        self.porosity_aperture_times_solute = np.zeros(shape)
        self.porosity_aperture_times_precipitate = np.zeros(shape)
Beispiel #5
0
 def __init__(self,
              mass_profile_list,
              light_profile_list,
              aperture_type='slit',
              anisotropy_model='isotropic',
              fwhm=0.7,
              kwargs_numerics={},
              kwargs_cosmo={
                  'D_d': 1000,
                  'D_s': 2000,
                  'D_ds': 500
              }):
     self.massProfile = MassProfile(mass_profile_list, kwargs_cosmo)
     self.lightProfile = LightProfile(light_profile_list)
     self.aperture = Aperture(aperture_type)
     self.anisotropy = MamonLokasAnisotropy(anisotropy_model)
     self.FWHM = fwhm
     self.cosmo = Cosmo(kwargs_cosmo)
     self._num_sampling = kwargs_numerics.get('sampling_number', 1000)
     self._interp_grid_num = kwargs_numerics.get('interpol_grid_num', 1000)
     self._log_int = kwargs_numerics.get('log_integration', False)
     self._max_integrate = kwargs_numerics.get(
         'max_integrate',
         100)  # maximal integration (and interpolation) in units of arcsecs