ewoksxrpd.tasks.worker.DemoWorker#
- class ewoksxrpd.tasks.worker.DemoWorker(integration_options, worker_options)[source]#
Bases:
EwoksWorker
- Parameters:
integration_options (
Mapping
)worker_options (
Mapping
)
- do_2D()#
- get_config()#
Returns the configuration as a dictionary.
- Returns:
dict with the config to be de-serialized with set_config/loaded with pyFAI.load
- get_json_config()#
return configuration as a JSON string
- get_normalization_factor()#
- get_unit()#
- property nbpt_azim#
- property normalization_factor#
- process(data, *args, **kwargs)[source]#
Process one frame
- Parameters:
data – numpy array containing the input image
writer – An open writer in which ‘write’ will be called with the result of the integration
- reconfig(shape=None, sync=False)#
This is just to force the integrator to initialize with a given input image shape
- Parameters:
shape – shape of the input image
sync – return only when synchronized
- reset()#
this is just to force the integrator to initialize
- save_config(filename=None)#
Save the configuration as a JSON file
- setDarkcurrentFile(imagefile)#
- setExtension(ext)#
enforce the extension of the processed data file written
- setFlatfieldFile(imagefile)#
- setJsonConfig(json_file)#
- setMaskFile(imagefile)#
- setSubdir(path)#
Set the relative or absolute path for processed data
- set_config(config, consume_keys=False)#
Configure the working from the dictionary.
- Parameters:
config (dict) – Key-value configuration
consume_keys (bool) – If true the keys from the dictionary will be consumed when used.
- set_dark_current_file(imagefile)#
- set_flat_field_file(imagefile)#
- set_json_config(json_file)#
- set_mask_file(imagefile)#
- set_method(method='csr')#
Set the integration method
- set_normalization_factor(value)#
- set_unit(value)#
- property shape#
- property unit#
- update_processor(integrator_name=None)#
- static validate_config(config, raise_exception=<class 'RuntimeError'>)#
Validates a configuration for any inconsitencies
- Parameters:
config – dict contraining the configuration
raise_exception – Exception class to raise when configuration is not consistant
- Returns:
None or reason as a string when raise_exception is None, else raise the given exception
- warmup(sync=False)#
Process a dummy image to ensure everything is initialized
- Parameters:
sync – wait for processing to be finished