st_sim Core Classes¶
One-dimensional Speckle Tracking scan simulation.
Generate intensity frames based on Fresnel diffraction
theory. pyrost.simulation.STSim does the heavy lifting
of calculating the wavefront propagation to the detector plane.
pyrost.simulation.STConverter exports simulated data to a
CXI format file accordingly to
the provided pyrost.Protocol object and saves the protocol
and experimental parameters to the same folder.
Examples
Perform the simulation for a given pyrost.simulation.STParams object.
>>> import pyrost.simulation as st_sim
>>> st_params = st_sim.parameters()
>>> sim_obj = st_sim.STSim(st_params)
Return an array of intensity frames at the detector’s plane.
>>> data = sim_obj.frames()
Save the simulated data to a CXI file using the default protocol.
>>> st_conv = st_sim.STConverter()
>>> st_conv.save_sim(data, sim_obj, 'test')
Contents