Particle simulation with correlation maps for Reverse-engineering of X-ray Photon Correlation Spectroscopy (XPCS) experiments.
The package provides the source code used in the following scientific publication:
[1] "Reverse-engineering method for XPCS studies of non-equilibrium dynamics", Anastasia Ragulskaya, Vladimir Starostin, Nafisa Begam, Anita Girelli, Hendrik Rahmann, Mario Reiser, Fabian Westermeier, Michael Sprung, Fajun Zhang, Christian Gutt and Frank Schreiber, IUCrJ 9 (2022), 439.
To be able to run the code, a python 3.7 installation with the following dependencies is required:
- tqdm
- matplotlib
- numpy
- scipy
- h5py
Install package via pip:
pip install rexpcs
The programm simulates the behaviour of particles with user-defined parameters in
where the average is performed over pixels within the same momentum transfer
The user can define the following parameters (in main.py):
- time of the simulation (t_size)
- map (x_size)
- number of particles (number_of_particles)
- dimension (dim)
- initial radius (init_radius)
- final radius (max_radius)
- position: minimal distance between the particles (min_distance)
- radius distribution (radius_distribution)
- concentration (c)
To manipulate the evolution of described parameters different functions) are available (in particle_factories).
Concentration:
- concentration is a constant value (constant)
- user-defined evolution with 1 function (function)
- user-defined evolution with n functions (n_functions)
- linear change (linear)
- square change (sqrt)
- part of the particles has increase in the value, part has a decrease (destroy_part)
Centers:
- uniform distribution (constant_uniform)
- define, if particles touch (no_touching)
- centers motion can be described as Brownian motion (brownian_motion), thus, the value depends on radii of the particles
- random walk motion (random_walk)
Radius: similar to concentrations
The results are saved in .h5 file (save_h5.py), furthermore the configuration is saved in config.json. Here is the example of a config file:
con{"max_radius": 9, "radius_distribution": [0.2, 0.7], "no_init_touch": true, "min_distance": 5, "init_radius": 2, "t_size": 100, "x_size": 512, "number_of_particles": 512, "dim": 2}
The programm creates the folder in \saved_data\name folder, where name for saving is defined by user in the main.py. The folder consists of animation (gif) of the simulation in the real space, calculation of kinetics (averaged over all pixels
Therefore, the relation between the parameters and TTC features can be identified as shown in [1].