Dispatcher

xicsrt.objects._Dispatcher.Dispatcher

New Members

class Dispatcher(config=None, section=None)[source]

Bases: object

A class to help find, initialize and then dispatch calls to raytracing objects.

A dispatcher is used within XICSRT to find and instantiate objects based on their specification within the config dictionary. These objects are then tracked within the dispatcher, allowing methods to be called on all objects sequentially.

__init__(config=None, section=None)[source]

Initialize self. See help(type(self)) for accurate signature.

instantiate(names=None)[source]
find_xicsrt_objects(pathlist)[source]

Return a dictionary with all the XICSRT objects found in the given list of paths. Objects are identified by looking for python files that start with ‘_Xicsrt’ prefix.

Programming Notes

If a given path does not exist glob will just return and empty list. For this reason no path existence checking is needed (unless we want to raise a user friendly error).

get_object(name)[source]
check_config(*args, **kwargs)[source]
check_param(*args, **kwargs)[source]
get_config(*args, **kwargs)[source]
setup(*args, **kwargs)[source]
initialize(*args, **kwargs)[source]
generate_rays(keep_meta=None, keep_history=None)[source]

Generates rays from all sources.

trace(rays, keep_meta=None, keep_history=None, keep_images=None)[source]

Perform raytracing for each object in sequence.

apply_filters(filters)[source]

New Private Members

class Dispatcher[source]
__init__(config=None, section=None)[source]

Initialize self. See help(type(self)) for accurate signature.

_instantiate_single(obj_info, config, strict=None)[source]

Instantiate an object from a list of filenames and a class name.

Inherited Members

class Dispatcher[source]
__init__(config=None, section=None)[source]

Initialize self. See help(type(self)) for accurate signature.

_instantiate_single(obj_info, config, strict=None)[source]

Instantiate an object from a list of filenames and a class name.

apply_filters(filters)[source]
check_config(*args, **kwargs)[source]
check_param(*args, **kwargs)[source]
find_xicsrt_objects(pathlist)[source]

Return a dictionary with all the XICSRT objects found in the given list of paths. Objects are identified by looking for python files that start with ‘_Xicsrt’ prefix.

Programming Notes

If a given path does not exist glob will just return and empty list. For this reason no path existence checking is needed (unless we want to raise a user friendly error).

generate_rays(keep_meta=None, keep_history=None)[source]

Generates rays from all sources.

get_config(*args, **kwargs)[source]
get_object(name)[source]
initialize(*args, **kwargs)[source]
instantiate(names=None)[source]
setup(*args, **kwargs)[source]
trace(rays, keep_meta=None, keep_history=None, keep_images=None)[source]

Perform raytracing for each object in sequence.