WARPXM v1.10.0
|
Density profile base class. More...
Density profile base class.
Public Member Functions | |
def | __init__ (self, x, **density_kwargs) |
Calculates initial density profile and it's attributes. | |
def | calc_fourier_coeff (self, N=10) |
Calculate fourier coefficients of the density profile. | |
def | plot_fourier_coeff (self, N=10) |
Plot fourier coefficents on bar graph. | |
def | reconstruct (self) |
Calculates reconstruction of density profile using Fourier coeff. | |
def | calc_error (self, ord=None) |
Uses numpy.linalg.norm() to calculate error norm of fourier approx. | |
def | plot_reconstruction (self, N, ord=None) |
Plot set of reconstructions along with orginal profile. | |
Public Attributes | |
x | |
a | |
n | |
n_min | |
n_max | |
n_avg | |
chi | |
coeff | |
n_recon | |
N | |
Protected Member Functions | |
def | _density_func (self, **density_kwargs) |
Populates density array with constant value. | |
def warpy.post_processing.band_diagrams.density_profiles.Density1D.__init__ | ( | self, | |
x, | |||
** | density_kwargs | ||
) |
Calculates initial density profile and it's attributes.
x | List of x values. |
**density_kwargs | Dicttionary of keyword arguments for _density_func() |
Reimplemented in warpy.post_processing.band_diagrams.density_profiles.Density1DArb.
|
protected |
Populates density array with constant value.
density_kwargs['n0'] | Average density. |
Reimplemented in warpy.post_processing.band_diagrams.density_profiles.Density1DArb, warpy.post_processing.band_diagrams.density_profiles.Density1DSine, warpy.post_processing.band_diagrams.density_profiles.Density1DDirichlet, warpy.post_processing.band_diagrams.density_profiles.Density1DBox, and warpy.post_processing.band_diagrams.density_profiles.Density1DFourierArb.
def warpy.post_processing.band_diagrams.density_profiles.Density1D.calc_error | ( | self, | |
ord = None |
|||
) |
Uses numpy.linalg.norm() to calculate error norm of fourier approx.
ord | Norm order. See documentation for numpy.linalg.norm(). Default Frobenius. |
def warpy.post_processing.band_diagrams.density_profiles.Density1D.calc_fourier_coeff | ( | self, | |
N = 10 |
|||
) |
Calculate fourier coefficients of the density profile.
N | Number of coefficients to calculate. Defualt 10. |
def warpy.post_processing.band_diagrams.density_profiles.Density1D.plot_fourier_coeff | ( | self, | |
N = 10 |
|||
) |
Plot fourier coefficents on bar graph.
Also calculates fourier coefficients of the density profile if not already calculated.
N Number of coefficients to calculate.
def warpy.post_processing.band_diagrams.density_profiles.Density1D.plot_reconstruction | ( | self, | |
N, | |||
ord = None |
|||
) |
Plot set of reconstructions along with orginal profile.
N | List of numbers of coefficients for Fourier series approximations |
def warpy.post_processing.band_diagrams.density_profiles.Density1D.reconstruct | ( | self | ) |
Calculates reconstruction of density profile using Fourier coeff.
warpy.post_processing.band_diagrams.density_profiles.Density1D.a |
warpy.post_processing.band_diagrams.density_profiles.Density1D.chi |
warpy.post_processing.band_diagrams.density_profiles.Density1D.coeff |
warpy.post_processing.band_diagrams.density_profiles.Density1D.n |
warpy.post_processing.band_diagrams.density_profiles.Density1D.N |
warpy.post_processing.band_diagrams.density_profiles.Density1D.n_avg |
warpy.post_processing.band_diagrams.density_profiles.Density1D.n_max |
warpy.post_processing.band_diagrams.density_profiles.Density1D.n_min |
warpy.post_processing.band_diagrams.density_profiles.Density1D.n_recon |
warpy.post_processing.band_diagrams.density_profiles.Density1D.x |