fraction_to_r
- petrofit.petrosian.fraction_to_r(fraction, r_list, flux_list, r_petrosian, flux_err=None, r_petrosian_err=None, epsilon=2.0, epsilon_fraction=0.99, interp_kind='cubic', interp_num=5000)[source]
Given photometric values and
r_total_flux
, calculate radius which encloses a specified fraction of the total flux.- Parameters:
- fractionfloat
Fraction of flux total flux enclosed in target radius.
- r_listnumpy.array
Array of radii in pixels.
- flux_listnumpy.array
Array of photometric flux values.
- r_petrosianfloat
Petrosian radius
- flux_errint or numpy.array, optional
Array of errors in the flux values. If None, erros are not computed even if
r_petro_err
is provided.- r_petrosian_errfloat, optional
1-sigma error in r_petro. If set to
None
andflux_err
is provided,r_petro_err
is assumed to be 0 when computing errors.- epsilonfloat, default=2.
Epsilon value (used to determine
r_epsilon
). N.B:r_epsilon = r_petrosian
* epsilon`- epsilon_fraction: float, default=0.99
Fraction of total flux that is recovered by
r_petrosian * epsilon
.- interp_kindstr or int, optional
Specifies the kind of interpolation used on the curve of growth (i.e
r_list
vsflux_list
)- interp_numint
Number of interpolation function sampling radii.
- Returns:
- r_fraction_fluxfloat or numpy.nan
Radius which encloses a specified fraction of the total flux (determined by the Petrosian profile).
- r_fraction_flux_errorfloat or numpy.nan
Error in
r_fraction_flux
.