calculate_petrosian_r
- petrofit.petrosian.calculate_petrosian_r(r_list, petrosian_list, petrosian_err=None, eta=0.2, interp_kind='cubic', interp_num=5000)[source]
Calculate petrosian radius from photometric values using interpolation. The Petrosian radius is defined as the radius at which the petrosian profile equals eta.
- Parameters:
- r_listnumpy.array
Array of radii in pixels.
- petrosian_listnumpy.array
Array of petrosian values at each value of
area_list
- petrosian_errnumpy.array
Array of 1-sigma errors in the Petrosian values.
- etafloat, default=0.2
Eta is the petrosian value which defines the
r_petrosian
.- interp_kindstr or int, optional
Specifies the kind of interpolation as a string or as an integer specifying the order of the spline interpolator to use. If set to
None
, the radius is computed descretely. The string has to be one of ‘linear’, ‘nearest’, ‘nearest-up’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘previous’, or ‘next’. ‘zero’, ‘slinear’, ‘quadratic’ and ‘cubic’ refer to a spline interpolation of zeroth, first, second or third order; ‘previous’ and ‘next’ simply return the previous or next value of the point; ‘nearest-up’ and ‘nearest’ differ when interpolating half-integers (e.g. 0.5, 1.5) in that ‘nearest-up’ rounds up and ‘nearest’ rounds down. Default is ‘linear’.- interp_numint
Number of interpolation function sampling radii.
- Returns:
- r_petrofloat or numpy.nan
Petrosian radius
- r_petro_errfloat or numpy.nan
1-sigma error in r_petro. Computed if petrosian_err is provided.