raytraverse.utility¶
-
raytraverse.utility.utility.
pool_call
(func, args, *fixed_args, cap=None, desc='processing', **kwargs)[source]¶ calls func for a sequence of arguments using a ProcessPool executor and a progress bar. result is equivalent to:
result = [] for arg in args: result.append(func(*args, *fixed_args, **kwargs)) return result
- Parameters
func (callable) – the function to execute in parallel
args (Sequence[Sequence]) – list of arguments (each item is expanded with ‘*’). first N args of func
fixed_args (Sequence) – arguments passed to func that are the same for all calls (next N arguments after args)
cap (int, optional) – execution cap for ProcessPool
desc (str, optional) – label for progress bar
kwargs – additional keyword arguments passed to func
- Returns
- Return type
sequence of results from func (order preserved)
imagetools¶
functions for translating from mappers to hdr