diff --git a/Scripts/__pycache__/metrology_functions.cpython-313.pyc b/Scripts/__pycache__/metrology_functions.cpython-313.pyc index 4ff7684..576ca07 100644 Binary files a/Scripts/__pycache__/metrology_functions.cpython-313.pyc and b/Scripts/__pycache__/metrology_functions.cpython-313.pyc differ diff --git a/Scripts/metrology_functions.py b/Scripts/metrology_functions.py index 23be406..ee62b06 100644 --- a/Scripts/metrology_functions.py +++ b/Scripts/metrology_functions.py @@ -102,7 +102,7 @@ def __process_img(img , retimg=0): x = popt[1] y = popt[2] - x,y = np.unravel_index(np.argmax(img), img.shape) + x,y = np.unravel_index(np.argmax(z), z.shape) #ret1, th1 = cv2.threshold(img, 196, 255, cv2.THRESH_BINARY) #x, y = image_center_of_mass(img, plot=False, verbose=False) if retimg: diff --git a/notebooks/sample.ipynb b/notebooks/sample.ipynb index c3f653f..289f814 100644 --- a/notebooks/sample.ipynb +++ b/notebooks/sample.ipynb @@ -87,10 +87,6 @@ "metadata": { "jupyter": { "source_hidden": true - }, - "ExecuteTime": { - "end_time": "2025-07-18T06:39:14.743749Z", - "start_time": "2025-07-18T06:39:14.508170Z" } }, "source": [ @@ -299,195 +295,8 @@ "\n", "\n" ], - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Path exists: C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\Scripts\n", - "Path exists: C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\Config\\config.json\n", - "Path exists: C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\Config\\config.json\n", - "Path exists: C:\\Users\\berti_r\\Python_Projects\\templates\\motion_libs\n", - "Path exists: C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\Config\\measurement.json\n", - "Constructor for PLC\n", - "Connect to PLC\n", - "is_open()=True\n", - "get_local_address()=None\n", - "read_device_info()=('Plc30 App', )\n", - "GVL_APP.nAXIS_NUM=3\n", - "Constructor for axis\n" - ] - }, - { - "data": { - "text/plain": [ - "Dropdown(description='Test Type:', options=('Image Test', 'Repeatability Test', 'Static Test'), value='Image T…" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "848863412f7a4b21aa8d7f664d60e24f" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Output()" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "fde81169af6849e2b025be3f8e8eec66" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "BoundedIntText(value=10, description='Nr of cycles:', max=1000, min=1)" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "6a6b3add07a343149f0d1bd2ab37a9d4" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Output()" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "e46cbb1bda90470586b1ef5081073f12" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Text(value='0.0004', description='Exposure [s]:')" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "e3d541a103d64718bd6129d19d092b0e" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Output()" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "8b246386f99b46c98cfbe4dba07320fc" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "ToggleButton(value=False, description='Processing', tooltip='Toggle processing on/off')" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "7263301c563345b0a13a5fc8774fc751" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Output()" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "375d52d163694df281c5ce1c41e6d345" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Button(description='Set exposure time', style=ButtonStyle())" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "68a6602005cf4ce68e657bd1065be38a" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Output()" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "a99013ecf9634db884708b247014b3f0" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Button(description='Start Measurement', style=ButtonStyle())" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "5aa83eb170a1446e94e08ffc065dc8fe" - } - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/plain": [ - "Output()" - ], - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "32ba3210dcd44b0e94ba446c81cbd8f8" - } - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "execution_count": 1 + "outputs": [], + "execution_count": null }, { "cell_type": "markdown",