ewoksxrpd.tasks.worker.EwoksWorkerFiber#
- class ewoksxrpd.tasks.worker.EwoksWorkerFiber(integration_options, worker_options)[source]#
Bases:
WorkerFiber- Parameters:
integration_options (
Mapping)worker_options (
Mapping)
- do_2D()#
- get_config()#
Returns the configuration as a JSON-serializable dictionary. :return: JSON-serializable dictionary
- get_json_config()#
return configuration as a JSON string
- get_normalization_factor()#
- get_unit()#
- get_worker_config()#
Returns the configuration as a WorkerFiberConfig dataclass instance.
- Returns:
WorkerConfig dataclass instance
- property incident_angle#
- property nbpt_azim#
- property normalization_factor#
- property npt_ip#
- property npt_oop#
- process(data, variance=None, dark=None, flat=None, normalization_factor=1.0, incident_angle=None, tilt_angle=None, sample_orientation=None, writer=None, metadata=None)#
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
- property sample_orientation#
- 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|WorkerFiberConfig.
- Parameters:
config (
dict|WorkerFiberConfig) – Key-value configuration or WorkerFiberConfig dataclass instanceconsume_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#
- sync_init()#
- property tilt_angle#
- property unit#
- update_processor()#
- static validate_config(config, raise_exception=<class 'RuntimeError'>)#
Validates a configuration for any inconsistencies
- Parameters:
config – dict containing the configuration
raise_exception – Exception class to raise when configuration is not consistent
- 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