xscale.spectral.tools.fit_power_law¶
-
xscale.spectral.tools.fit_power_law(freq, spectrum)¶ Fit a logarithmic spectral law based on the input one dimensional spectrum
Parameters: - freq : 1darray
The frequency coordinates
- spectrum : 1darray
The one-dimensional spectrum
Returns: - power : float
The power characteristic of a power law spectrul
- scale_factor: float
The scale factor related to fit the power law with the input spectrum