WARPXM v1.10.0
Loading...
Searching...
No Matches
warpy.post_processing.band_diagrams.density_profiles.Density1DSine Class Reference

Child of Density1D for sine wave density functions. More...

Inheritance diagram for warpy.post_processing.band_diagrams.density_profiles.Density1DSine:
warpy.post_processing.band_diagrams.density_profiles.Density1D

Detailed Description

Child of Density1D for sine wave density functions.

Protected Member Functions

def _density_func (self, **density_kwargs)
 Populates density array with sine function.
 
def _density_func (self, **density_kwargs)
 Populates density array with constant value.
 

Additional Inherited Members

- Public Member Functions inherited from warpy.post_processing.band_diagrams.density_profiles.Density1D
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 inherited from warpy.post_processing.band_diagrams.density_profiles.Density1D
 x
 
 a
 
 n
 
 n_min
 
 n_max
 
 n_avg
 
 chi
 
 coeff
 
 n_recon
 
 N
 

Member Function Documentation

◆ _density_func()

def warpy.post_processing.band_diagrams.density_profiles.Density1DSine._density_func (   self,
**  density_kwargs 
)
protected

Populates density array with sine function.

Parameters
density_kwargs['n0']Average density.
density_kwargs['amplitude']Sine wave amplitude.
density_kwargs['shift']Phase shift in radians.
Returns
Array of density values.

Reimplemented from warpy.post_processing.band_diagrams.density_profiles.Density1D.


The documentation for this class was generated from the following file: