CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
NonUniformImage.cpython-310.pyc18 linesDownload Raw Back to __pycache__
1o

2�Yi��@sdZddlZddlZddlmZdejdZdeZ	dZ3dZdZd	Z
d4ZdZejgd�ejd
�Zejgd�ejd
�eZdZejeedd�\ZZe�e�eZe5eeede
eedeeeZeeZejeedk<e�d�Ze��Z e �!�e �"dd�e �#d�e j$dddd�Z%ej&dd�Z'e%j(ddd�e �)�e �*e'�eee	eej+�Z,e,�-d�e%�*e,�e�.gd�gd ��Z/e'j0�1e/�e'�2e,�e%j3d!d!d�e%j4d"d#d$�e%j4d%d&d$�e%j5d"d'�-d(�e%j5d%d'�-d(�e6d)k�re�7�dSdS)*zw6Display a non-uniform image.7This example displays 2-d data as an image with non-uniformly8distributed sample points.9�N)�NonUniformImage��<�gT�qs*�>g�������?g{�G�zt?���)r�10���(�2r�F�P�Z�d�x���r��)Zdtype)r��i�i���i�i�i�i�i�ipiXi@i(#i'i|Zij)Zindexing�g�OAzNonUniform Image ExampleiXi�z$pyqtgraph example: Non-uniform ImagezPower Losses [W])�title�row�col�11horizontal)ZorientationF)�x�y�����)gg�?g�?))�J��G)����r)��O�LT�bottomzSpeed [rpm])Zaxis�text�leftzTorque [Nm]�itemr�__main__)8�__doc__�numpy�npZ	pyqtgraphZpgZ'pyqtgraph.graphicsItems.NonUniformImager�piZRPM2RADSZRADS2RPMZkfricZkfric3�psi�resZv_refZk_v�arrayZfloat32�tau�w�vZmeshgridZTAU�WZ	ones_like�VZP_lossZP_mech�nanZmkQAppZappZGraphicsLayoutWidget�win�show�resizeZsetWindowTitleZaddPlot�pZHistogramLUTItem�histZsetMouseEnabledZnextRowZaddItem�T�imageZ	setZValueZColorMapZcmapZgradientZsetColorMapZsetImageItemZshowGridZsetLabelZaxes�__name__�exec�rCrC��E:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\pyqtgraph/examples/NonUniformImage.py�<module>sX012131415161718�
Aluode/PerceptionLabPortable · CoolFace