lenstronomy.LightModel package

Submodules

lenstronomy.LightModel.light_model module

class lenstronomy.LightModel.light_model.LightModel(light_model_list, deflection_scaling_list=None, source_redshift_list=None, smoothing=0.001, sersic_major_axis=None)[source]

Bases: lenstronomy.LightModel.linear_basis.LinearBasis

class to handle extended surface brightness profiles (for e.g. source and lens light)

all profiles come with a surface_brightness parameterization (in units per square angle and independent of the pixel scale). The parameter ‘amp’ is the linear scaling parameter of surface brightness. Some functional forms come with a total_flux() definition that provide the integral of the surface brightness for a given set of parameters.

The SimulationAPI module allows to use astronomical magnitudes to be used and translated into the surface brightness conventions of this module given a magnitude zero point.

lenstronomy.LightModel.light_param module

class lenstronomy.LightModel.light_param.LightParam(light_model_list, kwargs_fixed, kwargs_lower=None, kwargs_upper=None, type='light', linear_solver=True)[source]

Bases: object

class manages the parameters corresponding to the LightModel() module. Also manages linear parameter handling.

get_params(args, i)[source]
Parameters:
  • args – list of floats corresponding ot the arguments being sampled
  • i – int, index of the first argument that is managed/read-out by this class
Returns:

keyword argument list of the light profile, index after reading out the arguments corresponding to this class

num_param()[source]
Returns:int, list of strings with param names
num_param_linear()[source]
Returns:number of linear basis set coefficients
param_name_list
set_params(kwargs_list)[source]
Parameters:kwargs_list – list of keyword arguments of the light profile (free parameter as well as optionally the fixed ones)
Returns:list of floats corresponding to the free parameters

Module contents