SimExLite.PropagationCalculators.WPGPropagationCalculator
- class SimExLite.PropagationCalculators.WPGPropagationCalculator(name: str, input: ~libpyvinyl.BaseData.DataCollection, output_keys: str = 'WPG_wavefront', output_data_types=<class 'SimExLite.WavefrontData.WavefrontData.WavefrontData'>, output_filenames: str = 'wavefront.h5', instrument_base_dir='./', calculator_base_dir='WPGPropagationCalculator', parameters=None)[source]
Class representing photon propagation through X-ray optics.
- __init__(name: str, input: ~libpyvinyl.BaseData.DataCollection, output_keys: str = 'WPG_wavefront', output_data_types=<class 'SimExLite.WavefrontData.WavefrontData.WavefrontData'>, output_filenames: str = 'wavefront.h5', instrument_base_dir='./', calculator_base_dir='WPGPropagationCalculator', parameters=None)[source]
- Parameters:
name (str) – The name of this calculator.
input (DataCollection) – The input DataCollection of this calculator.
output_keys (str, optional) – The key(s) of this calculator’s output data. It’s a list of `str`s or
- a single str. Defaults to “WPG_wavefront”.
output_filenames (str, optional): The output filename of this calculator. Defaults to “wavefront.h5”. instrument_base_dir (str, optional): The base directory for the instrument to which this calculator
belongs. Defaults to “./”. The final exact output file path depends on instrument_base_dir and calculator_base_dir: instrument_base_dir/calculator_base_dir/filename.
calculator_base_dir (str, optional): The base directory for this calculator. Defaults to “./”. The final
exact output file path depends on instrument_base_dir and calculator_base_dir: instrument_base_dir/calculator_base_dir/filename.
Methods
__init__(name, input[, output_keys, ...])- param name:
The name of this calculator.
backengine()Run the simulation using WPG.
dump([fname])Dump class instance to file.
from_dump(dumpfile)Load a dill dump from a dumpfile.
get_input_fn()Make sure the data is a mapping of WPGFormat file.
init_parameters()Initialize the calculator parameters.
prep_beamline_config()Copy the beamline config file to the working dir to import the beamline module.
reset_parameters(value)Resets the calculator parameters
set_calculator_base_dir(value)Set the calculator base directory
set_input(value)Set the calculator input data.
set_instrument_base_dir(value)Set the instrument base directory
set_output_data_types(value)Set the calculator output data type.
set_output_filenames(value)Set the calculator output filenames.
set_output_keys(value)Set the calculator output keys.
set_parameters([args_as_dict])Sets parameters contained in this calculator using dict or kwargs
Attributes
base_dirThe base path for the output files of this calculator in consideration of instrument_base_dir and calculator_base_dir
calculator_base_dirThe base directory for this calculator.
dataThe alias of output.
inputThe input of this calculator.
instrument_base_dirThe base directory for the instrument to which this calculator belongs.
nameThe name of this calculator.
outputThe output of this calculator
output_data_typesThe data type(s), i.e., classes, of each output.
output_file_pathsThe final output file paths considering base_dir
output_filenamesThe name(s) of the output file(s).
output_keysThe key(s) of this calculator's output data.
parametersThe parameters of this calculator.