ewoksid13.tasks.diffmap.CreateDiffMapFile#

class ewoksid13.tasks.diffmap.CreateDiffMapFile(inputs=None, varinfo=None, node_id=None, node_attrs=None, execinfo=None, profile_directory=None)[source]#

Bases: Task

Creates a DiffMap NexusProcess compliant with pyFAI-diffmap/view API after an already integrated dataset

Input names: nxdata_url : url to stored integrated data. Normally it’s stored in the PROCESSED_DATA scan file, example scan_file.h5::16.1/eiger_integrate/integrated

Optional input names: lima_name: name of the detector device. For example: “eiger” master_filename: RAW_DATA master filename, kmap information may be stored here scan_nb: number of the scan external_output_filename: external file where to write the diffmap nexus process (usually it’s the PROCESSED_DATA scan file) output_filename: file where to write a link to the diffmap nexus process (usually it’s the PROCESSED_DATA master file of collection) nxprocess_name: name of the nexus process. If not provided, will be set to “<lima_name>_diffmap” integration_options: dictionary to write as a configuration group x_nb_points: number of points along the x direction. If not provided, will be searched as kmap paramaters in master_filename y_nb_points: number of points along the y direction. If not provided, will be searched as kmap paramaters in master_filename do_diffmap: if False, skip this process

  • nxdata_url: where to read (integrated_data)

  • external_output_filename: where to save the diffmap

  • output_filename: where to link the diffmap

Parameters:
  • inputs (Optional[Mapping])

  • varinfo (Optional[dict])

  • node_id (Union[str, int, tuple, None])

  • node_attrs (Optional[dict])

  • execinfo (Optional[dict])

  • profile_directory (Optional[dict])

MISSING_DATA = <MISSING_DATA>#
assert_ready_to_execute()#
cancel()#

Function called when a task is cancelled. To be implemented by the derived classes

property cancelled: bool#

Return True if the task has been cancelled by the user

classmethod class_nonce()#
classmethod class_nonce_data()#
classmethod class_registry_name()#
Return type:

Optional[str]

cleanup_references()#

Removes all references to the inputs. Side effect: fixes the uhash of the task and outputs

property done: bool#

Completed (with or without exception)

property exception: Exception | None#
execute(force_rerun=False, raise_on_error=True, cleanup_references=False)#
Parameters:
  • force_rerun (Optional[bool])

  • raise_on_error (Optional[bool])

  • cleanup_references (Optional[bool])

property failed: bool#

Completed with exception

fix_uhash()#

Fix the uhash when it is derived from the uhash data.

get_input_uhashes()#
get_input_value(key, default=<MISSING_DATA>)#
Parameters:

default (Any)

Return type:

Any

get_input_values()#
get_kmap_points()[source]#

Get a tuple of kmap points from kmap parameters from the master file.

Return type:

tuple

get_named_input_values()#
get_normalization_values()[source]#

Provides a way to read the monitor array either from a blissdata stream or from the file.

Return type:

ndarray

get_output_transfer_data()#

The values are either DataUri or Variable

get_output_uhashes()#
get_output_value(key, default=<MISSING_DATA>)#
Parameters:

default (Any)

Return type:

Any

get_output_values()#
get_positional_input_values()#
classmethod get_subclass(registry_name, _second_attempt=False)#

Retrieving a derived class

classmethod get_subclass_names()#
Return type:

List[str]

classmethod get_subclasses()#
get_uhash_init(serialize=False)#
classmethod input_model()#
Return type:

Optional[BaseInputModel]

classmethod input_names()#
Return type:

Set[str]

property input_uhashes#
property input_values#

DEPRECATED

property input_variables: VariableContainer#
property inputs: ReadOnlyVariableContainerNamespace#
instance_nonce()#
classmethod instantiate(registry_name, **kw)#

Factory method for instantiating a derived class.

Parameters:
  • registry_name (str) – for example “tasklib.tasks.MyTask” or “MyTask”

  • **kwTask constructor arguments

  • registry_name

Returns Task:

property is_ready_to_execute#
property job_id: str | None#
property label: str#
property missing_inputs: VariableContainerMissingNamespace#
property missing_outputs: VariableContainerMissingNamespace#
property n_positional_inputs: int#
classmethod n_required_positional_inputs()#
Return type:

int

property named_input_values#

DEPRECATED

property node_id: str | int | tuple#
property npositional_inputs#

DEPRECATED

classmethod optional_input_names()#
Return type:

Set[str]

property output_metadata: dict | None#
classmethod output_names()#
Return type:

Set[str]

property output_transfer_data#

DEPRECATED

property output_uhashes#

DEPRECATED

property output_values#

DEPRECATED

property output_variables: VariableContainer#
property outputs: VariableContainerNamespace#
property positional_input_values#

DEPRECATED

classmethod required_input_names()#
Return type:

Set[str]

reset_state()#
run()[source]#

To be implemented by the derived classes

save_image(external_output_filename, intensity_dset, flip=True)[source]#
Parameters:
  • external_output_filename (str)

  • intensity_dset (ndarray)

  • flip (bool)

Return type:

str

set_uhash_init(pre_uhash=None, instance_nonce=None)#
Parameters:
  • pre_uhash (Union[str, bytes, UniversalHash, HasUhash, None])

  • instance_nonce (Optional[Any])

property succeeded: bool#

Completed without exception and with output values

property task_identifier: str#
property uhash: UniversalHash | None#
uhash_randomize()#
undo_fix_uhash()#
undo_randomize()#
property workflow_id: str | None#