xicsrt_2d__matplotlib
xicsrt.visual.xicsrt_2d__matplotlib
A set of tools for 2d visualization of the XICSRT results
- plot_example(results, name)[source]
A simplified plotting routine to serve as an example of how to develop xicsrt visualizations. This function will plot found ray intersections.
- plot_intersect(*args, **kwargs)[source]
Plot the intersection of rays with the given optic.
- Parameters:
results – The restults dictionary from raytrace() that include the ray history.
Keywords
--------
name (string (None)) – The name of the optic or source for which to plot intersections. The name refers to the key of the entry in the config dictionary. For example the name ‘detector’ will refer to config[‘optics’][‘detector’].
section (string (None)) – [Optional] The name of the config section in which to search for name. This should typically be either ‘optics’ or ‘sources’. If no section is given then then ‘optics’ will be searched first, then ‘sources’.
options (dict (None)) – [Optional] A dictionary containing plot options. All options can also be passed individually as keywords.
- Returns:
Will return a plotlist with the full plot definition.
- Return type:
plotlist
- plot_image(results, name=None, section=None, options=None, **kwargs)[source]
Plot an intersection image along with column and row summation plots.
Private Members
- _get_aperture_plotlist(obj, scale=None)[source]
- _get_bounds_plotlist(obj, scale=None)[source]
- _get_hist(obj, results, opt, raytype='found', axis=0)[source]
- _get_intersect_plotlist(results, name=None, section=None, options=None, _noaspect=False, **kwargs)[source]
Return a plotlist for
plot_intersect()
.
- _get_rays_plotlist(obj, results, opt, raytype='found')[source]
- _on_ylims_change(event_ax)[source]
An Axes callback to update the data limits after a change in the the data limits. This is primarily meant to allow retention af a fixed aspect after the user has zoomed into a region.
- _truncate_mask(mask, max_num)[source]
- _update_lim_aspect(ax)[source]
Update the data limits (xlim & ylim) to produce an equal aspect given a fixed plot size.