Core Classes#

The following classes are central to pyrost.simulation module:

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.CXIProtocol object and saves the protocol and experimental parameters to the same folder.

Examples

Perform the simulation for a given pyrost.simulation.STParams object params with pyrost.simulation.STSim. Then generate a stack frames with pyrost.simulation.STSim.frames(), and save the simulated data to a CXI file using the default protocol as follows:

>>> import pyrost.simulation as st_sim
>>> params = st_sim.STParams.import_default()
>>> sim_obj = st_sim.STSim(params)
>>> data = sim_obj.frames()
>>> st_conv = st_sim.STConverter()
>>> st_conv.save_sim(data, sim_obj, 'test') 

Contents#