amep.utils#
Utility Methods#
The AMEP module amep.utils
is a collection of various utility methods.
Functions
|
Compute the average of a certain function. |
|
Calls the given function for all given chunks in parallel with a given number of parallel jobs. |
|
Detects the two highest peaks in the given data after smoothing it with a running average. |
|
Returns the spatial dimension of simulation data. |
|
Calculate the domain length from the structure factor. |
|
Calculates the envelope of the data f by determining all local peaks of the data. |
|
Groups the given jobs into groups of length nworkers. |
|
Returns all coordinates in coords that are in the given simulation box boundaries (including the boundary). |
|
Returns the coordinates/values for only particles inside or outside a circular/spherical region of a given radius and centered around a given center position. |
|
Calculates the wave vectors that correspond to the first peaks of the 2D structure factor. |
|
Creates logarithmically spaced indices. |
|
Converts positions in two-dimensional space given as a meshgrid into an array of two-dimensional position vectors of shape (N,2), where N is the total number of positions in the given meshgrid. |
|
Calculates the mean square displacement from the integral of the velocity autocorrelation function. |
|
Estimates an optimal chunksize for limiting the RAM usage. |
|
Calculate the profile of given values. |
|
Real fast Fourier transform. |
|
Rotates all coordinate vectors given in coords by the angle theta around the origin of the system given by center. |
|
Rotation matrix in 3D for rotation around a certain axis. |
|
Compute the running mean of a 1-dimensional array. |
|
Computes the running mean of two-dimensional data, e.g., of a 2d density field. |
|
Compute the mean of n adjacent data points. |
|
Compute the mean of n*n adjacent data points. |
|
Calculates the spectrum of one-dimensional real data by using fft. |
|
Compute the static structure factor as fourier transform of the pair correlation function. |
|
Calculates the isotropic static structure factor from the two-dimensional static structure factor by making a spherical average/radial mean. |
|
Slicing object to slice a trajectory. |
|
Generates 2D unit vectors in the x-y plane with angle theta to the x axis. |
|
Generates 3D unit vectors with components |
|
Returns the upper diagonal of a quadratic matrix. |
|
Compute the weighted running mean of a 1-dimensional array. |
|
Compute the running mean of two-dimensional data. |