turbustat.statistics.
SCF
(cube, header=None, size=11, roll_lags=None)[source] [edit on github]¶Bases: turbustat.statistics.base_statistic.BaseStatisticMixIn
Computes the Spectral Correlation Function of a data cube (Rosolowsky et al, 1999).
Parameters: | cube : numpy.ndarray or astropy.io.fits.PrimaryHDU or SpectralCube
header : FITS header, optional
size : int, optional
roll_lags :
|
---|
Attributes Summary
lags |
Values of the lags, in pixels, to compute SCF at |
scf_spectrum |
Azimuthally averaged 1D SCF spectrum |
scf_spectrum_stddev |
Standard deviation of the scf_spectrum |
scf_surface |
SCF correlation array |
slope |
SCF spectrum slope |
slope_err |
1-sigma error on the SCF spectrum slope |
Methods Summary
compute_spectrum ([logspacing, return_stddev]) |
Compute the 1D spectrum as a function of lag. |
compute_surface ([boundary]) |
Computes the SCF up to the given lag value. |
fit_plaw ([xlow, xhigh, verbose]) |
Fit a power-law to the SCF spectrum. |
fitted_model (xvals) |
Computes the fitted power-law in log-log space using the given x values. |
load_results (pickle_file) |
Load in a saved pickle file. |
run ([logspacing, return_stddev, boundary, ...]) |
Computes all SCF outputs. |
save_results ([output_name, keep_data]) |
Save the results of the SCF to avoid re-computing. |
Attributes Documentation
lags
¶Values of the lags, in pixels, to compute SCF at
scf_spectrum
¶Azimuthally averaged 1D SCF spectrum
scf_spectrum_stddev
¶Standard deviation of the scf_spectrum
scf_surface
¶SCF correlation array
slope
¶SCF spectrum slope
slope_err
¶1-sigma error on the SCF spectrum slope
Methods Documentation
compute_spectrum
(logspacing=False, return_stddev=True, **kwargs)[source] [edit on github]¶Compute the 1D spectrum as a function of lag. Can optionally use log-spaced bins. kwargs are passed into the pspec function, which provides many options. The default settings are applicable in nearly all use cases.
Parameters: | logspacing : bool, optional
return_stddev : bool, optional
kwargs : passed to |
---|
compute_surface
(boundary='continuous')[source] [edit on github]¶Computes the SCF up to the given lag value.
Parameters: | boundary : {“continuous”, “cut”}
|
---|
fit_plaw
(xlow=None, xhigh=None, verbose=False)[source] [edit on github]¶Fit a power-law to the SCF spectrum.
Parameters: | xlow : float, optional
xhigh : float, optional
verbose : bool, optional
|
---|
fitted_model
(xvals)[source] [edit on github]¶Computes the fitted power-law in log-log space using the given x values.
Parameters: | xvals :
|
---|---|
Returns: | model_values :
|
load_results
(pickle_file)[source] [edit on github]¶Load in a saved pickle file.
Parameters: | pickle_file : str
|
---|---|
Returns: | self : SCF instance
|
Examples
Load saved results. >>> scf = SCF.load_results(“scf_saved.pkl”) # doctest: +SKIP
run
(logspacing=False, return_stddev=True, boundary='continuous', xlow=None, xhigh=None, save_results=False, output_name=None, verbose=False, ang_units=False, unit=Unit("deg"), save_name=None)[source] [edit on github]¶Computes all SCF outputs.
Parameters: | logspacing : bool, optional
return_stddev : bool, optional
boundary : {“continuous”, “cut”}
xlow : float, optional
xhigh : float, optional
save_results : bool, optional
output_name : str, optional
verbose : bool, optional
ang_units : bool, optional
unit : u.Unit, optional
save_name : str,optional
|
---|
save_results
(output_name=None, keep_data=False)[source] [edit on github]¶Save the results of the SCF to avoid re-computing. The pickled file will not include the data cube by default.
Parameters: | output_name : str, optional
keep_data : bool, optional
|
---|