Skip to content

Commit

Permalink
Fix docstring format
Browse files Browse the repository at this point in the history
  • Loading branch information
ajshajib committed Dec 2, 2023
1 parent 867be57 commit ccf056a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 32 deletions.
45 changes: 28 additions & 17 deletions hierarc/LensPosterior/kin_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,34 @@ def __init__(
:param gamma_error: 1-sigma uncertainty on power-law slope
:param r_eff: half-light radius of the deflector (arc seconds)
:param r_eff_error: uncertainty on half-light radius
:param sigma_v_measured: numpy array of IFU velocity dispersion of the main deflector in km/s
:param sigma_v_error_independent: numpy array of 1-sigma uncertainty in velocity dispersion of the IFU
:param sigma_v_measured: numpy array of IFU velocity dispersion of the main
deflector in km/s
:param sigma_v_error_independent: numpy array of 1-sigma uncertainty in velocity
dispersion of the IFU
observation independent of each other
:param sigma_v_error_covariant: covariant error in the measured kinematics shared among all IFU measurements
:param sigma_v_error_cov_matrix: error covariance matrix in the sigma_v measurements (km/s)^2
:type sigma_v_error_cov_matrix: nxn matrix with n the length of the sigma_v_measured array
: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
:param sigma_v_error_covariant: covariant error in the measured kinematics
shared among all IFU measurements
:param sigma_v_error_cov_matrix: error covariance matrix in the sigma_v
measurements (km/s)^2
:type sigma_v_error_cov_matrix: nxn matrix with n the length of the
sigma_v_measured array
: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_numerics_galkin: numerical settings for the integrated line-of-sight velocity dispersion
:param anisotropy_model: type of stellar anisotropy model. See details in MamonLokasAnisotropy() class of
lenstronomy.GalKin.anisotropy
:param kwargs_numerics_galkin: numerical settings for the integrated
line-of-sight velocity dispersion
:param anisotropy_model: type of stellar anisotropy model. See details in
MamonLokasAnisotropy() class of lenstronomy.GalKin.anisotropy
:param lens_model_list: keyword argument list of lens model (optional)
:param kwargs_lens_light: keyword argument list of lens light model (optional)
:param kwargs_mge_light: keyword arguments that go into the MGE decomposition routine
:param hernquist_approx: bool, if True, uses the Hernquist approximation for the light profile
:param multi_observations: bool, if True, interprets kwargs_aperture and kwargs_seeing as lists of multiple
observations
:param kwargs_mge_light: keyword arguments that go into the MGE decomposition
routine
:param hernquist_approx: bool, if True, uses the Hernquist approximation for the
light profile
:param multi_observations: bool, if True, interprets kwargs_aperture and
kwargs_seeing as lists of multiple observations
"""
self._sigma_v_measured = np.array(sigma_v_measured)
self._sigma_v_error_independent = np.array(sigma_v_error_independent)
Expand Down Expand Up @@ -165,9 +175,10 @@ def hierarchy_configuration(self, num_sample_model=20):
def model_marginalization(self, num_sample_model=20):
"""
:param num_sample_model: number of samples drawn from the lens and light model posterior to compute the
dimensionless kinematic component J()
:return: J() as array for each measurement prediction, covariance matrix in sqrt(J)
:param num_sample_model: number of samples drawn from the lens and light model
posterior to compute the dimensionless kinematic component J()
:return: J() as array for each measurement prediction, covariance matrix in
sqrt(J)
"""
num_data = len(self._sigma_v_measured)
j_kin_matrix = np.zeros(
Expand Down
39 changes: 24 additions & 15 deletions hierarc/LensPosterior/kin_constraints_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,34 @@ def __init__(
:param gamma_error: 1-sigma uncertainty on power-law slope
:param r_eff: half-light radius of the deflector (arc seconds)
:param r_eff_error: uncertainty on half-light radius
:param sigma_v_measured: numpy array of IFU velocity dispersion of the main deflector in km/s
:param sigma_v_error_independent: numpy array of 1-sigma uncertainty in velocity dispersion of the IFU
:param sigma_v_measured: numpy array of IFU velocity dispersion of the main
deflector in km/s
:param sigma_v_error_independent: numpy array of 1-sigma uncertainty in velocity
dispersion of the IFU
observation independent of each other
:param sigma_v_error_covariant: covariant error in the measured kinematics shared among all IFU measurements
:param sigma_v_error_cov_matrix: error covariance matrix in the sigma_v measurements (km/s)^2
:type sigma_v_error_cov_matrix: nxn matrix with n the length of the sigma_v_measured array
: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_numerics_galkin: numerical settings for the integrated line-of-sight velocity dispersion
:param anisotropy_model: type of stellar anisotropy model. See details in MamonLokasAnisotropy() class of
lenstronomy.GalKin.anisotropy
:param sigma_v_error_covariant: covariant error in the measured kinematics
shared among all IFU measurements
:param sigma_v_error_cov_matrix: error covariance matrix in the sigma_v
measurements (km/s)^2
:type sigma_v_error_cov_matrix: nxn matrix with n the length of the
sigma_v_measured array
: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_numerics_galkin: numerical settings for the integrated
line-of-sight velocity dispersion
:param anisotropy_model: type of stellar anisotropy model. See details in
MamonLokasAnisotropy() class of lenstronomy.GalKin.anisotropy
:param kwargs_lens_stars: keyword argument list of for stellar mass in the
lens model
:param kwargs_lens_light: keyword argument list of lens light model (optional)
:param kwargs_mge_light: keyword arguments that go into the MGE decomposition routine
:param hernquist_approx: bool, if True, uses the Hernquist approximation for the light profile
:param multi_observations: bool, if True, interprets kwargs_aperture and kwargs_seeing as lists of multiple
observations
:param kwargs_mge_light: keyword arguments that go into the MGE decomposition
routine
:param hernquist_approx: bool, if True, uses the Hernquist approximation for the
light profile
:param multi_observations: bool, if True, interprets kwargs_aperture and
kwargs_seeing as lists of multiple observations
"""
self._m200_array = m200_array
self._r_scale_array = r_scale_array
Expand Down

0 comments on commit ccf056a

Please sign in to comment.