nearest_n_invq

deprojected_sersic_models.nearest_n_invq(n=None, invq=None)[source]

Nearest value of n and invq for which a Sersic profile table has been calculated, using the DEFAULT array of n and invq which have been used here.

A similar function can be defined if a different set of Sersic profile tables (over n, invq) have been calculated.

Example

>>> nearest_n, nearest_invq = nearest_n_invq(n=n, invq=invq)
Parameters:
  • n (float) – Sersic index

  • invq (float) – Inverse of the intrinsic axis ratio of Sersic profile, invq = 1/q

Returns:

  • nearest_n (float) – Nearest value of Sersic index n from lookup array

  • nearest_invq (float) – Nearest value of flattening invq from lookup array