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, kwargs_numerics=kwargs_numerics) self.lightProfile = LightProfile(light_profile_list, kwargs_numerics=kwargs_numerics) self.aperture = Aperture(aperture_type) self.anisotropy = MamonLokasAnisotropy(anisotropy_model) self.FWHM = fwhm self.cosmo = Cosmo(kwargs_cosmo) #kwargs_numerics = {'sampling_number': 10000, 'interpol_grid_num': 5000, 'log_integration': False, # 'max_integrate': 500} self._num_sampling = kwargs_numerics.get('sampling_number', 1000) self._interp_grid_num = kwargs_numerics.get('interpol_grid_num', 500) self._log_int = kwargs_numerics.get('log_integration', False) self._max_integrate = kwargs_numerics.get( 'max_integrate', 10) # maximal integration (and interpolation) in units of arcsecs self._min_integrate = kwargs_numerics.get( 'min_integrate', 0.001) # min integration (and interpolation) in units of arcsecs
def __init__(self, kwargs_model, kwargs_cosmo, interpol_grid_num=100, log_integration=False, max_integrate=100, min_integrate=0.001): """ :param interpol_grid_num: :param log_integration: :param max_integrate: :param min_integrate: """ mass_profile_list = kwargs_model.get('mass_profile_list') light_profile_list = kwargs_model.get('light_profile_list') anisotropy_model = kwargs_model.get('anisotropy_model') self._interp_grid_num = interpol_grid_num self._log_int = log_integration self._max_integrate = max_integrate # maximal integration (and interpolation) in units of arcsecs self._min_integrate = min_integrate # min integration (and interpolation) in units of arcsecs self._max_interpolate = max_integrate # we chose to set the interpolation range to the integration range self._min_interpolate = min_integrate # we chose to set the interpolation range to the integration range self.lightProfile = LightProfile(light_profile_list, interpol_grid_num=interpol_grid_num, max_interpolate=max_integrate, min_interpolate=min_integrate) Anisotropy.__init__(self, anisotropy_type=anisotropy_model) self.cosmo = Cosmo(**kwargs_cosmo) self._mass_profile = SinglePlane(mass_profile_list)
def __init__(self, mass_profile_list, light_profile_list, aperture_type='slit', anisotropy_model='isotropic', psf_type='GAUSSIAN', fwhm=0.7, moffat_beta=2.6, kwargs_cosmo={'D_d': 1000, 'D_s': 2000, 'D_ds': 500}, sampling_number=1000, interpol_grid_num=500, log_integration=False, max_integrate=10, min_integrate=0.001): """ :param mass_profile_list: list of lens (mass) model profiles :param light_profile_list: list of light model profiles of the lensing galaxy :param aperture_type: type of slit/shell aperture where the light is coming from. See details in Aperture() class. :param anisotropy_model: type of stellar anisotropy model. See details in MamonLokasAnisotropy() class. :param psf_type: string, point spread functino type, current support for 'GAUSSIAN' and 'MOFFAT' :param fwhm: full width at half maximum seeing condition :param moffat_beta: float, beta parameter of Moffat profile :param kwargs_cosmo: keyword arguments that define the cosmology in terms of the angular diameter distances involved """ self.massProfile = MassProfile(mass_profile_list, kwargs_cosmo, interpol_grid_num=interpol_grid_num, max_interpolate=max_integrate, min_interpolate=min_integrate) self.lightProfile = LightProfile(light_profile_list, interpol_grid_num=interpol_grid_num, max_interpolate=max_integrate, min_interpolate=min_integrate) self.aperture = Aperture(aperture_type) self.anisotropy = MamonLokasAnisotropy(anisotropy_model) self.cosmo = Cosmo(**kwargs_cosmo) self._num_sampling = sampling_number self._interp_grid_num = interpol_grid_num self._log_int = log_integration self._max_integrate = max_integrate # maximal integration (and interpolation) in units of arcsecs self._min_integrate = min_integrate # min integration (and interpolation) in units of arcsecs self._psf = PSF(psf_type=psf_type, fwhm=fwhm, moffat_beta=moffat_beta)
def __init__(self, mass_profile_list, light_profile_list, kwargs_aperture, kwargs_psf, anisotropy_model='isotropic', kwargs_cosmo={'D_d': 1000, 'D_s': 2000, 'D_ds': 500}, sampling_number=1000, interpol_grid_num=500, log_integration=False, max_integrate=10, min_integrate=0.001): """ :param mass_profile_list: list of lens (mass) model profiles :param light_profile_list: list of light model profiles of the lensing galaxy :param kwargs_aperture: keyword arguments describing the spectroscopic aperture, see Aperture() class :param anisotropy_model: type of stellar anisotropy model. See details in MamonLokasAnisotropy() class. :param kwargs_psf: keyword argument specifying the PSF of the observation :param kwargs_cosmo: keyword arguments that define the cosmology in terms of the angular diameter distances involved """ self.massProfile = MassProfile(mass_profile_list, kwargs_cosmo, interpol_grid_num=interpol_grid_num, max_interpolate=max_integrate, min_interpolate=min_integrate) self.lightProfile = LightProfile(light_profile_list, interpol_grid_num=interpol_grid_num, max_interpolate=max_integrate, min_interpolate=min_integrate) self.aperture = aperture_select(**kwargs_aperture) self.anisotropy = MamonLokasAnisotropy(anisotropy_model) self.cosmo = Cosmo(**kwargs_cosmo) self._num_sampling = sampling_number self._interp_grid_num = interpol_grid_num self._log_int = log_integration self._max_integrate = max_integrate # maximal integration (and interpolation) in units of arcsecs self._min_integrate = min_integrate # min integration (and interpolation) in units of arcsecs self._psf = psf_select(**kwargs_psf)
def __init__(self, D_d=1000, D_s=2000, D_ds=500): """ :param D_d: angular diameter to the deflector [MPC] :param D_s: angular diameter to the source [MPC] :param D_ds: angular diameter from the deflector to the source [MPC] """ self._cosmo = Cosmo(D_d=D_d, D_s=D_s, D_ds=D_ds)
def __init__(self, profile_list, kwargs_cosmo={'D_d': 1000, 'D_s': 2000, 'D_ds': 500}, kwargs_numerics={}): """ :param profile_list: """ kwargs_options = {'lens_model_list': profile_list} self.model = LensModel(profile_list) self.cosmo = Cosmo(kwargs_cosmo) self._interp_grid_num = kwargs_numerics.get('interpol_grid_num', 1000) self._max_interpolate = kwargs_numerics.get('max_integrate', 100) self._min_interpolate = kwargs_numerics.get('min_integrate', 0.0001)
def __init__(self, D_d=1000, D_s=2000, D_ds=500, psf_type='GAUSSIAN', fwhm=0.7, moffat_beta=2.6): """ :param D_d: angular diameter to the deflector [MPC] :param D_s: angular diameter to the source [MPC] :param D_ds: angular diameter from the deflector to the source [MPC] :param psf_type: string, point spread functino type, current support for 'GAUSSIAN' and 'MOFFAT' :param fwhm: full width at half maximum seeing condition :param moffat_beta: float, beta parameter of Moffat profile """ self._cosmo = Cosmo(D_d=D_d, D_s=D_s, D_ds=D_ds) self._psf = PSF(psf_type=psf_type, fwhm=fwhm, moffat_beta=moffat_beta)
def __init__(self, D_d, D_s, D_ds, kwargs_aperture, kwargs_psf): """ :param D_d: angular diameter to the deflector [MPC] :param D_s: angular diameter to the source [MPC] :param D_ds: angular diameter from the deflector to the source [MPC] :param psf_type: string, point spread functino type, current support for 'GAUSSIAN' and 'MOFFAT' :param fwhm: full width at half maximum seeing condition :param moffat_beta: float, beta parameter of Moffat profile """ if D_ds <= 0 or D_s <= 0 or D_d <= 0: raise ValueError( 'input angular diameter distances Dd: %s, Ds: %s, Dds: %s are not suppored for a lens model!' % (D_d, D_s, D_ds)) self._cosmo = Cosmo(D_d=D_d, D_s=D_s, D_ds=D_ds) self._psf = psf_select(**kwargs_psf) self.aperture = aperture_select(**kwargs_aperture)
def __init__(self, mass_profile_list, light_profile_list, aperture_type='slit', anisotropy_model='isotropic', fwhm=0.7, kwargs_cosmo={ 'D_d': 1000, 'D_s': 2000, 'D_ds': 500 }, sampling_number=1000, interpol_grid_num=500, log_integration=False, max_integrate=10, min_integrate=0.001): """ :param mass_profile_list: list of lens (mass) model profiles :param light_profile_list: list of light model profiles of the lensing galaxy :param aperture_type: type of slit/shell aperture where the light is coming from. See details in Aperture() class. :param anisotropy_model: type of stellar anisotropy model. See details in MamonLokasAnisotropy() class. :param fwhm: full width at half maximum seeing condition :param kwargs_numerics: keyword arguments that control the numerical computation :param kwargs_cosmo: keyword arguments that define the cosmology in terms of the angular diameter distances involved """ self.massProfile = MassProfile(mass_profile_list, kwargs_cosmo, interpol_grid_num=interpol_grid_num, max_interpolate=max_integrate, min_interpolate=min_integrate) self.lightProfile = LightProfile(light_profile_list, interpol_grid_num=interpol_grid_num, max_interpolate=max_integrate, min_interpolate=min_integrate) self.aperture = Aperture(aperture_type) self.anisotropy = MamonLokasAnisotropy(anisotropy_model) self._fwhm = fwhm self.cosmo = Cosmo(**kwargs_cosmo) self._num_sampling = sampling_number self._interp_grid_num = interpol_grid_num self._log_int = log_integration self._max_integrate = max_integrate # maximal integration (and interpolation) in units of arcsecs self._min_integrate = min_integrate # min integration (and interpolation) in units of arcsecs
def __init__(self, kwargs_model, kwargs_cosmo, interpol_grid_num=1000, log_integration=True, max_integrate=1000, min_integrate=0.0001, max_light_draw=None, lum_weight_int_method=True): """ What we need: - max projected R to have ACCURATE I_R_sigma values - make sure everything outside cancels out (or is not rendered) :param interpol_grid_num: number of interpolation bins for integrand and interpolated functions :param log_integration: bool, if True, performs the numerical integral in log space distance (adviced) (only applies for lum_weight_int_method=True) :param max_integrate: maximum radius (in arc seconds) of the Jeans equation integral (assumes zero tracer particles outside this radius) :param max_light_draw: float; (optional) if set, draws up to this radius, else uses max_interpolate value :param lum_weight_int_method: bool, luminosity weighted dispersion integral to calculate LOS projected Jean's solution. ATTENTION: currently less accurate than 3d solution :param min_integrate: """ mass_profile_list = kwargs_model.get('mass_profile_list') light_profile_list = kwargs_model.get('light_profile_list') anisotropy_model = kwargs_model.get('anisotropy_model') self._interp_grid_num = interpol_grid_num self._log_int = log_integration self._max_integrate = max_integrate # maximal integration (and interpolation) in units of arcsecs self._min_integrate = min_integrate # min integration (and interpolation) in units of arcsecs self._max_interpolate = max_integrate # we chose to set the interpolation range to the integration range self._min_interpolate = min_integrate # we chose to set the interpolation range to the integration range if max_light_draw is None: max_light_draw = max_integrate # make sure the actual solution for the kinematics is only computed way inside the integral self.lightProfile = LightProfile(light_profile_list, interpol_grid_num=interpol_grid_num, max_interpolate=max_integrate, min_interpolate=min_integrate, max_draw=max_light_draw) Anisotropy.__init__(self, anisotropy_type=anisotropy_model) self.cosmo = Cosmo(**kwargs_cosmo) self._mass_profile = SinglePlane(mass_profile_list) self._lum_weight_int_method = lum_weight_int_method
def __init__(self, profile_list, kwargs_cosmo={ 'D_d': 1000, 'D_s': 2000, 'D_ds': 500 }, interpol_grid_num=1000, max_interpolate=100, min_interpolate=0.001): """ :param profile_list: """ self.model = SinglePlane(profile_list) self.cosmo = Cosmo(**kwargs_cosmo) self._interp_grid_num = interpol_grid_num self._max_interpolate = max_interpolate self._min_interpolate = min_interpolate
def __init__(self, kwargs_cosmo, interpol_grid_num=100, log_integration=False, max_integrate=100, min_integrate=0.001): """ :param kwargs_cosmo: keyword argument with angular diameter distances """ self._interp_grid_num = interpol_grid_num self._log_int = log_integration self._max_integrate = max_integrate # maximal integration (and interpolation) in units of arcsecs self._min_integrate = min_integrate # min integration (and interpolation) in units of arcsecs self._max_interpolate = max_integrate # we chose to set the interpolation range to the integration range self._min_interpolate = min_integrate # we chose to set the interpolation range to the integration range self._cosmo = Cosmo(**kwargs_cosmo) self._spp = SPP() Anisotropy.__init__(self, anisotropy_type='OM')
def __init__(self, kwargs_cosmo, mass_profile, light_profile, anisotropy_type): self.cosmo = Cosmo(kwargs_cosmo) self._mass_profile = mass_profile self._light_profile = light_profile self._anisotropy_type = anisotropy_type
def __init__(self, kwargs_cosmo={'D_d': 1000, 'D_s': 2000, 'D_ds': 500}): """ :param kwargs_cosmo: keyword arguments of the angular diameter distances (in Mpc) """ self._cosmo = Cosmo(kwargs_cosmo)
def test_raise(self): with self.assertRaises(ValueError): Cosmo(d_d=-1, d_s=1, d_ds=1)