raytraverse.utility¶
- raytraverse.utility.utility.pool_call(func, args, *fixed_args, cap=None, expandarg=True, desc='processing', workers=True, pbar=True, **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 ‘*’ unless expandarg is false). 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
expandarg (bool, optional) – expand args with ‘*’ when calling func
desc (str, optional) – label for progress bar
kwargs – additional keyword arguments passed to func
- Return type
sequence of results from func (order preserved)
imagetools¶
functions for translating from mappers to hdr
cli¶
- raytraverse.utility.cli.np_load(ctx, param, s)[source]¶
read np array from command line
trys np.load (numpy binary), then np.loadtxt (space seperated txt file) then split row by spaces and columns by commas.
used by both raytraverse.cli and raytu, add pull_decs and clk.command_decs as clk.shared_decs in main script so click can properly load options