tomopy_cli.util¶
Functions:
|
|
|
Convert value to an integer and make sure it is positive. |
|
Split value separated by ':' into int triple, filling missing values with 1s. |
|
Compute the tomographic rotation center based on cross-correlation technique. |
|
Recursively update a dictionary in place with new values. |
- tomopy_cli.util.guess_center(first_projection, last_projection)[source]¶
Compute the tomographic rotation center based on cross-correlation technique. first_projection is the projection at 0 deg, last_projection is the projection at 180 deg.
- tomopy_cli.util.positive_int(value)[source]¶
Convert value to an integer and make sure it is positive.
- tomopy_cli.util.range_list(value)[source]¶
Split value separated by ‘:’ into int triple, filling missing values with 1s.
- tomopy_cli.util.update_dict(original: Mapping, new: Mapping) Mapping[source]¶
Recursively update a dictionary in place with new values.
This is distinct from the python
dict.updatemethod in that it respects existing entries and just updates them with new values.https://stackoverflow.com/questions/3232943/update-value-of-a-nested-dictionary-of-varying-depth
- Parameters
original – The target dictionary that will be updated.
new – The dictionary with new values that will be added to original.
- Returns
original – Same dictionary that was passed, with values modified in place.