lenstronomy.PointSource.Types package — lenstronomy 1.9.1 documentation

# lenstronomy.PointSource.Types package

## Submodules

## lenstronomy.PointSource.Types.base_ps module

class `lenstronomy.PointSource.Types.base_ps.` `PSBase`(lens_model=None, fixed_magnification=False, additional_image=False)

  Bases: `object`

  base point source type class

  `image_amplitude`(kwargs_ps, *args, **kwargs)

    amplitudes as observed on the sky

    Parameters: | kwargs_ps – keyword argument of point source model kwargs – keyword arguments of function call
    Returns: | numpy array of amplitudes

  `image_position`(kwargs_ps, **kwargs)

    on-sky position

    Parameters: | kwargs_ps – keyword argument of point source model
    Returns: | numpy array of x, y image positions

  `source_amplitude`(kwargs_ps, **kwargs)

    intrinsic source amplitudes (without lensing magnification, but still apparent)

    Parameters: | kwargs_ps – keyword argument of point source model kwargs – keyword arguments of function call (which are not used for this object
    Returns: | numpy array of amplitudes

  `source_position`(kwargs_ps, **kwargs)

    original unlensed position

    Parameters: | kwargs_ps – keyword argument of point source model
    Returns: | numpy array of x, y source positions

  `update_lens_model`(lens_model_class)

    update LensModel() and LensEquationSolver() instance

    Parameters: | lens_model_class – LensModel() class instance
    Returns: | internal lensModel class updated

## lenstronomy.PointSource.Types.lensed_position module

class `lenstronomy.PointSource.Types.lensed_position.` `LensedPositions`(lens_model=None, fixed_magnification=False, additional_image=False)

  Bases: `lenstronomy.PointSource.Types.base_ps.PSBase`

  class of a a lensed point source parameterized as the (multiple) observed image positions Name within the PointSource module: ‘LENSED_POSITION’ parameters: ra_image, dec_image, point_amp If fixed_magnification=True, than ‘source_amp’ is a parameter instead of ‘point_amp’

  `image_amplitude`(kwargs_ps, kwargs_lens=None, x_pos=None, y_pos=None, magnification_limit=None, kwargs_lens_eqn_solver=None)

    image brightness amplitudes

    Parameters: | kwargs_ps – keyword arguments of the point source model kwargs_lens – keyword argument list of the lens model(s), only used when requiring the lens equation solver x_pos – pre-computed image position (no lens equation solver applied) y_pos – pre-computed image position (no lens equation solver applied) magnification_limit – float >0 or None, if float is set and additional images are computed, only those images will be computed that exceed the lensing magnification (absolute value) limit kwargs_lens_eqn_solver – keyword arguments specifying the numerical settings for the lens equation solver see LensEquationSolver() class for details
    Returns: | array of image amplitudes

  `image_position`(kwargs_ps, kwargs_lens=None, magnification_limit=None, kwargs_lens_eqn_solver=None)

    on-sky image positions

    Parameters: | kwargs_ps – keyword arguments of the point source model kwargs_lens – keyword argument list of the lens model(s), only used when requiring the lens equation solver magnification_limit – float >0 or None, if float is set and additional images are computed, only those images will be computed that exceed the lensing magnification (absolute value) limit kwargs_lens_eqn_solver – keyword arguments specifying the numerical settings for the lens equation solver see LensEquationSolver() class for details
    Returns: | image positions in x, y as arrays

  `source_amplitude`(kwargs_ps, kwargs_lens=None)

    intrinsic brightness amplitude of point source When brightnesses are defined in magnified on-sky positions, the intrinsic brightness is computed as the mean in the magnification corrected image position brightnesses.

    Parameters: | kwargs_ps – keyword arguments of the point source model kwargs_lens – keyword argument list of the lens model(s), used when brightness are defined in magnified on-sky positions
    Returns: | brightness amplitude (as numpy array)

  `source_position`(kwargs_ps, kwargs_lens=None)

    original source position (prior to lensing)

    Parameters: | kwargs_ps – point source keyword arguments kwargs_lens – lens model keyword argument list (required to ray-trace back in the source plane)
    Returns: | x, y position (as numpy arrays)

## lenstronomy.PointSource.Types.source_position module

class `lenstronomy.PointSource.Types.source_position.` `SourcePositions`(lens_model=None, fixed_magnification=False, additional_image=False)

  Bases: `lenstronomy.PointSource.Types.base_ps.PSBase`

  class of a single point source defined in the original source coordinate position that is lensed. The lens equation is solved to compute the image positions for the specified source position.

  Name within the PointSource module: ‘SOURCE_POSITION’ parameters: ra_source, dec_source, source_amp If fixed_magnification=True, than ‘source_amp’ is a parameter instead of ‘point_amp’

  `image_amplitude`(kwargs_ps, kwargs_lens=None, x_pos=None, y_pos=None, magnification_limit=None, kwargs_lens_eqn_solver=None)

    image brightness amplitudes

    Parameters: | kwargs_ps – keyword arguments of the point source model kwargs_lens – keyword argument list of the lens model(s), only ignored when providing image positions directly x_pos – pre-computed image position (no lens equation solver applied) y_pos – pre-computed image position (no lens equation solver applied) magnification_limit – float >0 or None, if float is set and additional images are computed, only those images will be computed that exceed the lensing magnification (absolute value) limit kwargs_lens_eqn_solver – keyword arguments specifying the numerical settings for the lens equation solver see LensEquationSolver() class for details
    Returns: | array of image amplitudes

  `image_position`(kwargs_ps, kwargs_lens=None, magnification_limit=None, kwargs_lens_eqn_solver=None)

    on-sky image positions

    Parameters: | kwargs_ps – keyword arguments of the point source model kwargs_lens – keyword argument list of the lens model(s), only used when requiring the lens equation solver magnification_limit – float >0 or None, if float is set and additional images are computed, only those images will be computed that exceed the lensing magnification (absolute value) limit kwargs_lens_eqn_solver – keyword arguments specifying the numerical settings for the lens equation solver see LensEquationSolver() class for details
    Returns: | image positions in x, y as arrays

  `source_amplitude`(kwargs_ps, kwargs_lens=None)

    intrinsic brightness amplitude of point source When brightnesses are defined in magnified on-sky positions, the intrinsic brightness is computed as the mean in the magnification corrected image position brightnesses.

    Parameters: | kwargs_ps – keyword arguments of the point source model kwargs_lens – keyword argument list of the lens model(s), used when brightness are defined in magnified on-sky positions
    Returns: | brightness amplitude (as numpy array)

  `source_position`(kwargs_ps, **kwargs)

    original source position (prior to lensing)

    Parameters: | kwargs_ps – point source keyword arguments
    Returns: | x, y position (as numpy arrays)

## lenstronomy.PointSource.Types.unlensed module

class `lenstronomy.PointSource.Types.unlensed.` `Unlensed`(lens_model=None, fixed_magnification=False, additional_image=False)

  Bases: `lenstronomy.PointSource.Types.base_ps.PSBase`

  class of a single point source in the image plane, aka star Name within the PointSource module: ‘UNLENSED’ This model can deal with arrays of point sources. parameters: ra_image, dec_image, point_amp

  `image_amplitude`(kwargs_ps, **kwargs)

    amplitudes as observed on the sky

    Parameters: | kwargs_ps – keyword argument of point source model kwargs – keyword arguments of function call (which are not used for this object
    Returns: | numpy array of amplitudes

  `image_position`(kwargs_ps, **kwargs)

    on-sky position

    Parameters: | kwargs_ps – keyword argument of point source model
    Returns: | numpy array of x, y image positions

  `source_amplitude`(kwargs_ps, **kwargs)

    intrinsic source amplitudes

    Parameters: | kwargs_ps – keyword argument of point source model kwargs – keyword arguments of function call (which are not used for this object
    Returns: | numpy array of amplitudes

  `source_position`(kwargs_ps, **kwargs)

    original physical position (identical for this object)

    Parameters: | kwargs_ps – keyword argument of point source model
    Returns: | numpy array of x, y source positions

## Module contents