Skip to content

Commit

Permalink
minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sibirrer committed Aug 15, 2023
1 parent d0a0b93 commit 79e0e4c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
14 changes: 9 additions & 5 deletions lenstronomy/Analysis/kinematics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def __init__(self, z_lens, z_source, kwargs_model, kwargs_aperture, kwargs_seein
:param z_source: redshift of source
:param kwargs_model: model keyword arguments, needs 'lens_model_list', 'lens_light_model_list'
:param kwargs_aperture: spectroscopic aperture keyword arguments, see lenstronomy.Galkin.aperture for options
:param kwargs_seeing: seeing condition of spectroscopic observation, corresponds to kwargs_psf in the GalKin module specified in lenstronomy.GalKin.psf
:param kwargs_seeing: seeing condition of spectroscopic observation, corresponds to kwargs_psf in the GalKin
module specified in lenstronomy.GalKin.psf
:param cosmo: astropy.cosmology instance, if None then will be set to the default cosmology
:param lens_model_kinematics_bool: bool list of length of the lens model. Only takes a subset of all the models
as part of the kinematics computation (can be used to ignore substructure, shear etc that do not describe the
Expand All @@ -42,10 +43,13 @@ def __init__(self, z_lens, z_source, kwargs_model, kwargs_aperture, kwargs_seein
:param multi_observations: bool, if True uses multi-observation to predict a set of different observations with
the GalkinMultiObservation() class. kwargs_aperture and kwargs_seeing require to be lists of the individual
observations.
:param anisotropy_model: type of stellar anisotropy model. See details in MamonLokasAnisotropy() class of lenstronomy.GalKin.anisotropy
:param analytic_kinematics: boolean, if True, used the analytic JAM modeling for a power-law profile on top of a Hernquist light profile
:param anisotropy_model: type of stellar anisotropy model. See details in MamonLokasAnisotropy() class of
lenstronomy.GalKin.anisotropy
:param analytic_kinematics: boolean, if True, used the analytic JAM modeling for a power-law profile on top of
a Hernquist light profile
ATTENTION: This may not be accurate for your specific problem!
:param Hernquist_approx: bool, if True, uses a Hernquist light profile matched to the half light radius of the deflector light profile to compute the kinematics
:param Hernquist_approx: bool, if True, uses a Hernquist light profile matched to the half light radius of the
deflector light profile to compute the kinematics
:param MGE_light: bool, if true performs the MGE for the light distribution
:param MGE_mass: bool, if true performs the MGE for the mass distribution
:param kwargs_numerics_galkin: numerical settings for the integrated line-of-sight velocity dispersion
Expand Down Expand Up @@ -76,7 +80,7 @@ def __init__(self, z_lens, z_source, kwargs_model, kwargs_aperture, kwargs_seein

if kwargs_mge_mass is None:
self._kwargs_mge_mass = {'n_comp': 20}
else :
else:
self._kwargs_mge_mass = kwargs_mge_mass

if kwargs_mge_light is None:
Expand Down
2 changes: 1 addition & 1 deletion lenstronomy/LensModel/Profiles/epl.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class EPL(LensProfileBase):
with :math:`\\theta_{E}` is the (circularized) Einstein radius,
:math:`\\gamma` is the negative power-law slope of the 3D mass distributions,
:math:`q` is the minor/major axis ratio,
and :math:`x` and :math:`y` are defined in a coordinate sys- tem aligned with the major and minor axis of the lens.
and :math:`x` and :math:`y` are defined in a coordinate system aligned with the major and minor axis of the lens.
In terms of eccentricities, this profile is defined as
Expand Down
5 changes: 3 additions & 2 deletions lenstronomy/LensModel/Profiles/hernquist.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ class to compute the Hernquist 1990 model, which is in 3d:
>>> cosmo = FlatLambdaCDM(H0=70, Om0=0.3, Ob0=0.05)
>>> lens_cosmo = LensCosmo(z_lens=0.5, z_source=1.5, cosmo=cosmo)
Here we compute the angular scale of Rs on the sky (in arc seconds) and the deflection the normalization sigma0:
Here we compute the angular scale of Rs on the sky (in arc seconds) and the deflection the normalization sigma0 from
the total stellar mass in M_sol and Rs in [Mpc]:
>>> sigma0, rs_angle = lens_cosmo.hernquist_phys2angular(M=10**13, c=6)
>>> sigma0, rs_angle = lens_cosmo.hernquist_phys2angular(mass=10**11, rs=0.02)
And here we perform the inverse calculation given Rs_angle and alpha_Rs to return the physical halo properties.
Expand Down
3 changes: 2 additions & 1 deletion lenstronomy/PointSource/point_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __init__(self, point_source_type_list, lensModel=None, fixed_magnification_l
to have a specified band/frame assigned to it
:param point_source_frame_list: list of lists mirroring the structure of the image positions.
Integers correspond to the i'th list entry of index_lens_model_list indicating in which frame/band the image is
appearing
appearing, e.g., four images and four cutouts, you can do [[0], [1], [2], [3]] when the frames
(ordered as the list) are in the same order as the point sources (indices)
"""
if len(point_source_type_list) > 0:
if index_lens_model_list is not None and point_source_frame_list is None:
Expand Down
2 changes: 1 addition & 1 deletion lenstronomy/SimulationAPI/model_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, lens_model_list=None, z_lens=None, z_source=None, lens_redshi
models. If None, 'z_source' is used.
:param tabulated_deflection_angles: a class that returns deflection angles given a set of (x, y) coordinates.
Effectively a fixed lens model. See documentation in Profiles.numerical_alpha
:param observed_convention_index: a list of indicies that correspond to lens models where the center_x,center_y
:param observed_convention_index: a list of indices that correspond to lens models where the center_x,center_y
values correspond to the observed (lensed positions), not the physical positions in space
"""
if lens_model_list is None:
Expand Down
2 changes: 1 addition & 1 deletion lenstronomy/SimulationAPI/observation_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def __init__(self, pixel_scale, exposure_time, magnitude_zero_point, read_noise=
'e-': (electrons assumed to be IID),
'ADU': (analog-to-digital unit)
:param background_noise: sqrt(variance of background) as a total contribution from readnoise,
sky brightness etc in units of the data_count_units (e- or ADU)
sky brightness etc. in units of the data_count_units (e- or ADU)
If you set this parameter, it will use this value regardless of the values of read_noise, sky_brightness
"""
Instrument.__init__(self, pixel_scale, read_noise, ccd_gain) # read_noise and ccd_gain can be None
Expand Down

0 comments on commit 79e0e4c

Please sign in to comment.