qa.qautils

Quality analysis user interface.

Functions

CursorTool(component, *args, **kwds) Factory function returning either a CursorTool1D or CursorTool2D instance
Trait(*value_type, **metadata) Creates a trait definition.
approxinfos(infodict)
evaluate_limits(image) Evaluate lmits on an image to remove row and cols containing peaks.
evaluate_stretching_high(image[, lower_max]) Evaluate stretching higher bound.
gray(range, **traits) Generator function for the ‘gray’ colormap.
remove_peaks(arr[, threshold]) Return start and stop indexes excluding peaks.
stretching_high_cum(image) Compute stretching high value using cumulative function.
stretching_high_hist(image[, dim]) Compute stretching high value using histograms.
where where(condition, [x, y])

Classes

Action An action on a menu bar in a Traits UI window or panel.
ArrayPlotData(*data, **kw) A PlotData implementation class that handles a list of Numpy arrays
AvgCutImageAnalysis(image, direction[, ...]) Show results for a image and its one direction average plot
BaseCursorTool(**kwtraits[, component]) Abstract base class for CursorTool objects
BaseImageAnalysis(image[, ulbasepos, ...]) Base class to show image Analysis results
BaseQAMouseTool([scene]) Base mouse mode for Quality Analysis operations.
BaseQATool(mainwin) Base controller for Quality Analysis operations and results showing.
Bool(**metadata[, default_value]) Defines a trait whose value must be a Python boolean using a C-level
Button(**metadata[, label, image, style, ...]) Defines a trait whose UI editor is a button.
ColorBar(*args, **kw) A color bar for a color-mapped plot.
ComponentEditor(*args, **traits) wxPython editor factory for Enable components.
CursorImageAnalysis(image[, ulbasepos, ...]) Show image analysis results and allow user to select point for cuts
CutsImageAnalysis(image[, ulbasepos, ...]) Show results for a image and its two directions’ plots
DataRange1D(*datasources, **kwtraits) Represents a 1-D data range.
Enum(*args, **metadata) Defines a trait whose value must be one of a specified set of values
Float(**metadata[, default_value]) Defines a trait whose value must be a Python float using a C-level fast
Group(*values, **traits) Represents a grouping of items in a user interface view.
HGroup(*values, **traits) A group whose items are laid out horizontally.
Handler Provides access to and control over the run-time workings of a
HandlerWithReset
HasStrictTraits This class guarantees that any object attribute that does not have an explicit or wildcard trait definition results in an exception.
HasTraits Enables any Python class derived from it to have trait atttributes.
Info
Infos
Instance(**metadata[, klass, factory, args, ...]) Defines a trait whose value must be an instance of a specified class,
Item(**traits[, value]) An element in a Traits-based user interface.
LinearMapper Maps a 1-D data space to and from screen space by specifying a range in
List(**metadata[, trait, value, minlen, ...]) Defines a trait whose value must be a list whose items are of the
LocalizationError
NoLimitsZoomTool(*args, **kw[, component]) Chaco ZoomTool withouth limits to zoom factors
ObjectColumn A column for editing objects.
OnlyInfoAnalysis(image[, ulbasepos])
PanTool(**kwtraits[, component]) A tool that enables the user to pan a plot by clicking a mouse
Plot(**kwtraits[, data]) Represents a correlated set of data, renderers, and axes in a single screen region.
SpectralImageAnalysis(time_image[, ...]) Show results of spectra analysis
Str(**metadata[, default_value]) Defines a trait whose value must be a Python string using a C-level
TableEditor Editor factory for table editors.
Tuple(*types, **metadata) Defines a trait whose value must be a tuple of specified trait types
TupleEditor Editor factory for tuple editors.
VGroup(*values, **traits) A group whose items are laid out vertically.
VPlotContainer(*components, **traits) A plot container that stacks plot components vertically.
View(*values, **traits) A Traits-based user interface for one or more objects.
ZoomTool Selects a range along the index or value axis.
class qa.qautils.AvgCutImageAnalysis(image, direction, ulbasepos=(0, 0), oversampling_factor=1.0)

Show results for a image and its one direction average plot

Input :
  • image
  • direction: direction for cut. It must be in [‘x’, ‘y’]
cut_zoom_tool
alias of SimpleZoom
extract_cut(image, direction)

extract cut in direction

Input :
  • image: starting 2d array
  • direction: direction for cut
Output :
  • cut: cut in selected direction averaging in the other one
reset()
Reset all user modifications
reset_cut_zoom()
class qa.qautils.BaseImageAnalysis(image, ulbasepos=(0, 0), oversampling_factor=1.0)

Base class to show image Analysis results

Input :
  • image: a 2x2 numpy.ndarray representing image to analyze
  • ulbasepos: a tuple (xpos, ypos) representing position of uppler-left corner into raster band
reset()
Reset all user modifications
reset_zoom()
zoom_tool
alias of SimpleZoom
class qa.qautils.BaseQAMouseTool(scene=None)
Base mouse mode for Quality Analysis operations.
class qa.qautils.BaseQATool(mainwin)

Base controller for Quality Analysis operations and results showing.

analysis(scene, selected_area)
Perform analysis
analysis_postrun()
analysis_prerun()
check_areadim(selected_area, maxarea=3000000, mindim=10)

Check if selected area is significant and not too large

Parameters :
  • selected_area:
  • maxarea: max selectable area (height*width)
  • mindim: minimum for single dimensions (width or height)
reset()
Reset all user modifications
class qa.qautils.CursorImageAnalysis(image, ulbasepos=(0, 0), oversampling_factor=1.0)

Show image analysis results and allow user to select point for cuts

reset()
Reset all user modifications
class qa.qautils.CutsImageAnalysis(image, ulbasepos=(0, 0), oversampling_factor=1.0)

Show results for a image and its two directions’ plots

change_azcut_orientation(vertical)
draw_cuts(rg_cut, az_cut)

Draw range and azimuth cuts.

Draw range and azimuth cuts after removing leading and trailing zeros, which would raise exceptions in log scale.

Input :
  • rg_cut: 1D array in range direction
  • az_cut: 1D array in azimuth direction
extract_cuts(image, row, col)

extract range and azimuth cuts

Input :
  • image: starting 2d array
  • row: row number for range cut
  • col: col number for azimuth cut
Output :
  • rg_cut: 1D array in range direction
  • az_cut: 1D array in azimuth direction
reset()
Reset all user modifications
class qa.qautils.HandlerWithReset
handle_reset(uiinfo)
class qa.qautils.Info
class qa.qautils.Infos
trait_view(parent=None)
class qa.qautils.LocalizationError
estimate_error()
init_localiz_error(measured_abs_pos, cmapper, pixel_spacings, fdc_target)

Initialize class for localization error.

Parameters :
  • measured_abs_pos: point measured pos calculated on image point
  • cmapper: coordinate mapper
  • pixel_spacings: rg and az pixel spacings
  • fdc_target: doppler centroid evaluated in the target position
reset_user_inputs(default_values=(0, 0, 0))
class qa.qautils.OnlyInfoAnalysis(image, ulbasepos=(0, 0))
reset()
Reset all user modifications
update_infos(info_dict)
class qa.qautils.SpectralImageAnalysis(time_image, ulbasepos=(0, 0), oversampling_factor=1.0, datasetname=None)

Show results of spectra analysis

reset()
Reset all user modifications
trait_view(parent=None)
qa.qautils.approxinfos(infodict)
qa.qautils.evaluate_limits(image)

Evaluate lmits on an image to remove row and cols containing peaks.

Peaks are evaluated on 1d arrays obtained as 1d means of starting image

qa.qautils.evaluate_stretching_high(image, lower_max=None)

Evaluate stretching higher bound.

Parameters :
  • image: image to analyze to evaluate stretching high
  • lower_max: the lower value to assign to stretching max
qa.qautils.remove_peaks(arr, threshold=0.80000000000000004)

Return start and stop indexes excluding peaks.

Evaluate start and stop indexes to remove leading and trailing peaks from a 1D array

qa.qautils.stretching_high_cum(image)

Compute stretching high value using cumulative function.

Stretching max value is the maximum of a 2d subarray obtained removing peaks from starting image. Peaks are removed from 1d arrays obtained as 1d means of starting image

qa.qautils.stretching_high_hist(image, dim=100)

Compute stretching high value using histograms.

Stretching max value is the value which limits the 97% of total area in cumulative function

Previous topic

qa.qaui

Next topic

qa.spectra

This Page