amplification_factor package

Submodules

amplification_factor.amplification_factor module

class amplification_factor(lens_model_list=None, kwargs_lens=None, kwargs_macro=None, **kwargs)[source]

Bases: object

__init__(lens_model_list=None, kwargs_lens=None, kwargs_macro=None, **kwargs)[source]
Parameters:
  • lens_model_list – list of lens models

  • kwargs_lens – arguments for integrating the diffraction integral

  • kwargs_macro – arguments of the macromodel

integrator(gpu=False)[source]

Computes the amplification facator F(f) by constructing the histogram in time domain. Defines the integration window of lens plane first.

Parameters:

gpu – boolean, if True, use gpu computing for integration.

Returns:

amplification factor in time domain.

fourier(freq_end=2000, type2=False)[source]

Compute the amplification factor in frequency domain

Parameters:
  • freq_end – higher end of the frequency series. Default to be 2000.

  • type2 – boolean, if True, switch to fourier transform of microlensing of a type 2 image.

Returns:

frequency array and amplification factor F(f) of wave optics.

importor(ts=None, F_tilde=None, fs=None, Fws=None, time=False, freq=False)[source]

Imports the amplification factor

Parameters:
  • ts – time series in dimensionless unit

  • F_tilde – time domain amplification factor

  • ws – sampling frequency in unit of angular frequency

  • Fws – frequency domain amplification factor

  • time – boolean, if True, plot time domain amplification factor

  • freq – boolean, if True, plot frequency domain amplification factor

plot_time(saveplot=None)[source]

Plots the amplification factor in time domain

Parameters:

saveplot – where the plot is saved.

Returns:

axes class of matplotlib representing the plot.

plot_freq(freq_end=2000, saveplot=None, abs=True, pha=False, smooth=False)[source]

Plots the amplification factor against frequency in semilogx

Parameters:
  • freq_end – higher end of the frequency range

  • abs – boolean, if True, compute the absolute value of the amplification.

  • pha – boolean, if True, compute the phase of the amplification.

  • saveplot – where the plot is saved.

Returns:

axes class of matplotlib representing the plot.

geometrical_optics(mus, tds, Img_ra, Img_dec, upper_lim=3000, type2=False)[source]
Parameters:
  • mus – magnifications of images.

  • tds – time delays of images.

  • Img_ra – right ascension of images relative to the center of lens plane.

  • Img_dec – declination of images relative to the center of lens plane.

  • upper_lim – desired upper limit of freqeuncy range of geometrical optics.

Returns:

frequency array and amplification factor F(f) of geometrical optics.

concatenate(transfreq=1000)[source]
Parameters:

transfreq – transitional frequency of wave optics to geometrical optics.

Returns:

concatenated frequency array and amplification factor F(f).

Module contents