
    e                        d Z ddlZddlZddlmZ ddlmZ ddl	m
Z
  ej                  d      Z e
j                         Zej                  d        e
j                          Zej%                  e        e
j&                         Zej+                  e        eddidd	id
      Zej/                         Zej3                  ej/                         dddd        ej4                         Z ej4                         Zej3                  edd       ej3                  edd       ej;                          ej<                  j?                  d      Z e ddxxx dz  ccc e  ejB                   ejD                  ddd            z  Z  ejF                  e d ejD                  dd e$e             di g      Z ejK                  e        eedZ&ejO                  dd      Z(e(jS                  e&       e(jU                  e       ejO                  dd      Z+e+jU                  e       e+jS                  e&       ejO                  dd      Z,e,jZ                  d   j]                  d        ej_                  ed!   e,d"          ej_                  ed!   e(d"          ej_                  e,d#   e+d"          ej_                  e,d#   ed$          e0d%k(  r ejb                          yy)&a  
This example demonstrates a very basic use of flowcharts: filter data,
displaying both the input and output of the filter. The behavior of
the filter can be reprogrammed by the user.

Basic steps are:
  - create a flowchart and two plots
  - input noisy data to the flowchart
  - flowchart connects data to the first plot, where it is displayed
  - add a gaussian filter to lowpass the data, then display it in the second plot.
    N)	Flowchart)	QtWidgetszFlowchart Examplezpyqtgraph example: Flowchartioinout)dataIndataOut)	terminals      i  )size   i,  d   Timeg      ?)namevalues)info)r   )zTop PlotzBottom Plot
PlotWidget)r   j)pos)   r   GaussianFilter)r   r   sigma   r   InOutr	   __main__)2__doc__numpynp	pyqtgraphpgpyqtgraph.metaarray	metaarraypyqtgraph.flowchartr   pyqtgraph.Qtr   mkQAppappQMainWindowwinsetWindowTitleQWidgetcwsetCentralWidgetQGridLayoutlayout	setLayoutfcwidgetw	addWidgetr   pw1pw2showrandomnormaldatasinlinspace	MetaArraylensetInputplotList
createNodepw1NodesetPlotListsetPlotpw2NodefNodectrlssetValueconnectTerminals__name__exec     >/usr/lib/python3/dist-packages/pyqtgraph/examples/Flowchart.py<module>rP      s  
   ' ) "bii#$ i   1 2Y   R 				  V  Tle}  IIK   aAq ) bmmobmmo   a    a  
 
yyT" S  {r{{1c4() )y4+"++aQTVYZ^V_B`'ace&fg 4  C0
--)-
4   H   
--+-
6     H 
&F3 G   a     BxL%+ .   BxL'$- 0   E%L'$- 0   E%L"Y- 0zBGGI rN   