{ "cells": [ { "cell_type": "markdown", "id": "0e59d5cd", "metadata": {}, "source": [ "# Batch processing\n", "\n", "This example demonstrates how to use the `Batch` class to analyze a series of measurements, collect roughness parameters into a table, and visualize the results." ] }, { "cell_type": "markdown", "id": "aa28feba-45fd-4579-bbdc-197a641057e2", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": 15, "id": "4f821dbe-9b54-416a-bd8a-8559e2baaaeb", "metadata": { "tags": [] }, "outputs": [], "source": [ "from surfalize import Batch" ] }, { "cell_type": "markdown", "id": "74863b0a-f76f-41bc-a4ae-3c340b7fa49e", "metadata": {}, "source": [ "## Get filepaths" ] }, { "cell_type": "code", "execution_count": 16, "id": "ebfb2151-aa02-43e0-ac02-7902538cf3d6", "metadata": {}, "outputs": [], "source": [ "from pathlib import Path\n", "root = Path.cwd() / 'matrix'\n", "files = list(root.glob('*.vk4'))" ] }, { "cell_type": "markdown", "id": "d62610c9-4371-47c1-b09c-a91ad0058607", "metadata": {}, "source": [ "## Create batch and register operations" ] }, { "cell_type": "code", "execution_count": 17, "id": "be251ffe-22bf-493c-9d13-98789db794ed", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "batch = Batch(files, additional_data='laser_parameters.xlsx')\n", "batch.level()\n", "batch.filter('bandpass', 0.1, 20)\n", "batch.roughness_parameters()" ] }, { "cell_type": "markdown", "id": "478c123a-4889-4b96-8b8e-222a0bf4f70f", "metadata": {}, "source": [ "## Execute batch analysis" ] }, { "cell_type": "code", "execution_count": null, "id": "b739930d-03f7-4623-93d4-0396b5494890", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "395f392ef8aa4c0191f547cf0b5d09be", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Processing on 12 cores: 0%| | 0/36 [00:00