tomopy_cli.util

Functions:

theta_step(start, end, proj_number)

positive_int(value)

Convert value to an integer and make sure it is positive.

range_list(value)

Split value separated by ':' into int triple, filling missing values with 1s.

restricted_float(x)

guess_center(first_projection, last_projection)

Compute the tomographic rotation center based on cross-correlation technique.

update_dict(original, new)

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.restricted_float(x)[source]
tomopy_cli.util.theta_step(start, end, proj_number)[source]
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.update method 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.