gravelamps/models/isolated-point.h

Functions

void CheckpointSigHandler(int signum)

Sets checkpoint flag upon receiving signal

Parameters:

signum – Signal value

double MinimumPosition(double source_position)

Computes image position required for minimal time delay, used to compute the phase required to have that minimal time delay be zero.

Parameters:

source_position – Dimensionless displacement from the optical axis

double MinimumPhase(double source_position)

Computes the phase required for the minimum time delay to be zero.

Parameters:

source_position – Dimensionless displacement from the optical axis

void ExponentialComponent(acb_t exponential_component, double dimensionless_frequency, double source_position, slong precision)

Computes the exponential component of the amplification factor in the wave optics regime. Exponentiation done with arbitrary precision.

Parameters:
  • exponential_component – Arbitrary precision object to contain the value

  • dimensionless_frequency – Dimensionless frequency

  • source_position – Dimensionless displacement from the optical axis

  • precision – Number of bits of precision for exponentiation calculation

void GammaComponent(acb_t gamma_component, double dimensionless_frequency, slong precision)

Computes the gamma component of the amplification factor in the wave optics regime. Gamma function calculated using arbitrary precision.

Parameters:
  • gamma_component – Arbitrary precision object to contain the value

  • dimensionless_frequency – Dimensionless frequency

  • precision – Number of bits of precision for gamma function calculation

void HyperComponent(acb_t hyper_component, double dimensionless_frequency, double source_position, slong precision)

Computes the confluent hypergeometric component of the amplification factor in the wave optics regime. Hypergeometric function calculated using arbitrary precision.

Parameters:
  • hyper_component – Arbitrary precision object to contain the value

  • dimensionless_frequency – Dimensionless frequency

  • source_position – Dimensionless displacement from the optical axis

  • precision – Number of bits of precision for calculation of the confluent hypergeometric function

void WaveAmplification(acb_t amplification_factor, double dimensionless_frequency, double source_position, slong precision)

Computes the amplification factor in the wave optics regime. Calculation is performed with arbitrary precision.

Parameters:
  • amplification_factor – Arbitrary precision object to contain the value

  • dimensionless_frequency – Dimensionless frequency

  • source_position – Dimensionless displacement from the optical axis

  • precision – Number of bits of precision for calculation of the amplification factor components

double Magnification(double source_position, int image)

Computes the magnification in the geometric optics regime. Image flag specifies the first or second of the two signals

Parameters:
  • source_position – Dimensionless displacement from the optical axis

  • image – 0 if first image, 1 if second

double TimeDelay(double source_position)

Computes the dimensionless time delay between the two signals in the geometric optics approximation

Parameters:

source_position – Dimensionless displacement from the optical axis

std::complex<double> GeometricAmplificationSingle(double dimensionless_frequency, double source_position, int image)

Computes the contribution to the amplification factor in the geometric optics regime for the specified image. Image flag specifies the first or second of the two signals

Parameters:
  • dimensionless_frequency – Dimensionless frequency

  • source_position – Dimensionless displacement from the optical axis

  • image – 0 if first image, 1 if second

std::complex<double> GeometricAmplification(double dimensionless_frequency, double source_position)

Computes the total amplification factor in the geometric optics regime

Parameters:
  • dimensionless_frequency – Dimensionless frequency

  • source_position – Dimensionless displacement from the optical axis

double *AmplificationFactor(double dimensionless_frequency, double source_position, slong geo_switch, slong precision)

Computes the amplification factor.

Will use WaveAmplification if dimensionless_frequency is equal to or less than geo_switch. precision used only in this case. Otherwise will use GeometricAmplification.

Parameters:
  • dimensionless_frequency – Dimensionless frequency

  • source_position – Dimensionless displacement from the optical axis

  • geo_switch – Dimensionless frequency above which to use geometric optics

  • precision – Number of bits of precision used for wave optics calculation

int GenerateLensData(char *dimensionless_frequency_file, char *source_position_file, char *amplification_factor_real_file, char *amplification_factor_imag_file, slong geo_switch, slong precision)

Constructs Gravelamps interpolator data for the isolated point mass model.

Takes input files, and constructs completed matrices of the amplification factor covering the space of dimensionless frequency and source position given in the relevant files. Will checkpoint upon receiving SIGINT or SIGALRM.

Parameters:
  • dimensionless_frequency_file – Path to file containig dimensionless frequency values.

  • source_position_file – Path to file containing source position values.

  • amplification_factor_real_file – Path to file containing real component of amplification factor values.

  • amplification_factor_imag_file – Path to file containing imaginary component of amplification factor values.

  • geo_switch – Dimensionless frequency above which to use geometric optics

  • precision – Number of bits of precision used for wave optics calculation