{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# APSG tutorial - Part 2" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:09.228635Z", "iopub.status.busy": "2026-02-06T23:36:09.228515Z", "iopub.status.idle": "2026-02-06T23:36:10.104469Z", "shell.execute_reply": "2026-02-06T23:36:10.103858Z" }, "tags": [] }, "outputs": [], "source": [ "from apsg import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Matrix like classes and tensors\n", "**APSG** provides matrix-like classes to work with tensor quantities used commonly in structural geology analysis. It includes `DefGrad3` and `VelGrad3` for deformation and velocity gradient, `Stress3` for stress tensor, `Ellipsoid` for quadratic forms and `Ortensor3` for orientation tensor. All these classes support common matrix mathematical operations and provide basic methods and properties.\n", "\n", "All matrix-like objects could be created either by passing nested list or tuple or providing individual components to class method `from_comp`" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.105848Z", "iopub.status.busy": "2026-02-06T23:36:10.105644Z", "iopub.status.idle": "2026-02-06T23:36:10.109864Z", "shell.execute_reply": "2026-02-06T23:36:10.109525Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "DeformationGradient3\n", "[[2. 0. 1. ]\n", " [0. 1. 0. ]\n", " [0. 0. 0.5]]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "F = defgrad([[2, 0, 1], [0, 1, 0], [0, 0, 0.5]])\n", "F" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.132761Z", "iopub.status.busy": "2026-02-06T23:36:10.132598Z", "iopub.status.idle": "2026-02-06T23:36:10.135573Z", "shell.execute_reply": "2026-02-06T23:36:10.135144Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "DeformationGradient3\n", "[[2. 0. 1. ]\n", " [0. 1. 0. ]\n", " [0. 0. 0.5]]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "F = defgrad.from_comp(xx=2, zz=0.5, xz=1)\n", "F" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For multiplifications of matrix or vectors we have to use matmul `@` operator" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.136795Z", "iopub.status.busy": "2026-02-06T23:36:10.136652Z", "iopub.status.idle": "2026-02-06T23:36:10.139083Z", "shell.execute_reply": "2026-02-06T23:36:10.138832Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "Vector3(1, 0, 0.5)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "v = vec('z') # unit-length vector in direction af axis z\n", "u = F @ v\n", "u" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`I` property returns inverse matrix" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.140493Z", "iopub.status.busy": "2026-02-06T23:36:10.140377Z", "iopub.status.idle": "2026-02-06T23:36:10.142836Z", "shell.execute_reply": "2026-02-06T23:36:10.142410Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "Vector3(0, 0, 1)" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "F.I @ u" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To transpose matrix, we can use `T` property and for multiplification we have to use `@` operator" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.143967Z", "iopub.status.busy": "2026-02-06T23:36:10.143853Z", "iopub.status.idle": "2026-02-06T23:36:10.146253Z", "shell.execute_reply": "2026-02-06T23:36:10.145926Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "DeformationGradient3\n", "[[4. 0. 2. ]\n", " [0. 1. 0. ]\n", " [2. 0. 1.25]]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "F.T @ F" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.147497Z", "iopub.status.busy": "2026-02-06T23:36:10.147382Z", "iopub.status.idle": "2026-02-06T23:36:10.149689Z", "shell.execute_reply": "2026-02-06T23:36:10.149349Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "1.25" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "v @ F.T @ F @ v" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Eigenvalues and eigenvectors could be obtained by methods `eigenvalues` and `eigenvectors`. Individual eigenvalues and eigen vectors could be accessed by properties `E1`, `E2`, `E3` and `V1`, `V2`, `V3`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Deformation gradient and rotations\n", "\n", "Deformation gradient `DeformationGradient3` could describe distorsion, dilation and rigid-body rotation. All **APSG** features provides `transform` method which transform then using provided deformation gradient.\n", "\n", "The rigid-body rotation could be either extracted from deformation gradient using `R` method:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.151084Z", "iopub.status.busy": "2026-02-06T23:36:10.150967Z", "iopub.status.idle": "2026-02-06T23:36:10.153653Z", "shell.execute_reply": "2026-02-06T23:36:10.153263Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "DeformationGradient3\n", "[[ 0.928 0. 0.371]\n", " [ 0. 1. 0. ]\n", " [-0.371 0. 0.928]]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R = F.R\n", "R" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "or could be created of one of the class methods like `from_axisangle`, defining axis of rotation and angle" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.154841Z", "iopub.status.busy": "2026-02-06T23:36:10.154701Z", "iopub.status.idle": "2026-02-06T23:36:10.157301Z", "shell.execute_reply": "2026-02-06T23:36:10.156899Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "DeformationGradient3\n", "[[ 0.552 -0.753 0.359]\n", " [ 0.574 0.655 0.492]\n", " [-0.605 -0.065 0.793]]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R = defgrad.from_axisangle(lin(120, 50), 60)\n", "R" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`from_two_vectors`, where axis of rotation is perpendicular to both vectors and angle is angle of vectors" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.158444Z", "iopub.status.busy": "2026-02-06T23:36:10.158328Z", "iopub.status.idle": "2026-02-06T23:36:10.160948Z", "shell.execute_reply": "2026-02-06T23:36:10.160599Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "DeformationGradient3\n", "[[ 0.938 0.074 0.339]\n", " [ 0.186 0.718 -0.671]\n", " [-0.294 0.692 0.66 ]]" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R = defgrad.from_two_vectors(lin(120, 50), lin(270, 80))\n", "R" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.162071Z", "iopub.status.busy": "2026-02-06T23:36:10.161954Z", "iopub.status.idle": "2026-02-06T23:36:10.164301Z", "shell.execute_reply": "2026-02-06T23:36:10.163959Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "L:270/80" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lin(120, 50).transform(R)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "or by `from_vectors_axis`, where `axis` do not need to by perpendicular to vectors. Note that rotation axis needs to be adjusted to provide correct rotation of vector." ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.165520Z", "iopub.status.busy": "2026-02-06T23:36:10.165405Z", "iopub.status.idle": "2026-02-06T23:36:10.168286Z", "shell.execute_reply": "2026-02-06T23:36:10.167869Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "DeformationGradient3\n", "[[-0.393 -0.864 0.315]\n", " [ 0.864 -0.23 0.448]\n", " [-0.315 0.448 0.837]]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R = defgrad.from_vectors_axis(lin(45,30), lin(135, 30), lin(90, 70))\n", "R" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.169332Z", "iopub.status.busy": "2026-02-06T23:36:10.169217Z", "iopub.status.idle": "2026-02-06T23:36:10.171532Z", "shell.execute_reply": "2026-02-06T23:36:10.171223Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "L:135/30" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lin(45,30).transform(R)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.172802Z", "iopub.status.busy": "2026-02-06T23:36:10.172663Z", "iopub.status.idle": "2026-02-06T23:36:10.658261Z", "shell.execute_reply": "2026-02-06T23:36:10.657647Z" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "L:90/70 113.11571469196132\n" ] } ], "source": [ "a, ang = R.axisangle()\n", "print(lin(a), ang)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "`from_two_pairs` method, to describe rotation between two coordinate systems. Note that pair define X axis as lineation vector and Z axis as foliation vector." ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.659546Z", "iopub.status.busy": "2026-02-06T23:36:10.659426Z", "iopub.status.idle": "2026-02-06T23:36:10.663418Z", "shell.execute_reply": "2026-02-06T23:36:10.662949Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "DeformationGradient3\n", "[[-0.071 0.97 0.234]\n", " [-0.874 -0.174 0.453]\n", " [ 0.48 -0.173 0.86 ]]" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p1 = pair(150, 60, 90, 40)\n", "p2 = pair(45, 30, 10, 25)\n", "R = defgrad.from_two_pairs(p1, p2)\n", "R" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.664585Z", "iopub.status.busy": "2026-02-06T23:36:10.664469Z", "iopub.status.idle": "2026-02-06T23:36:10.667222Z", "shell.execute_reply": "2026-02-06T23:36:10.666973Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "P:45/30-10/25" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p1.transform(R)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Ellipsoid\n", "\n", "In deformation analysis, the quadratic forms are represented by `Ellipsoid` class. It could be used to represents either ellipsoid objects or finite strain ellipsoid.\n", "\n", "It provides additional methods and properties including `lambda1`, `lambda2` and `lambda3` for square-root of eigenvalues, Woodcock's `shape` and `strength`, `k`, `K`, `d` and `D` for Flinn's and Ramsay symmetries and intensities, `lode` for Lode's parameter etc. For more check documentation. Eigenvectors could be also represented by linear or planar features using properties `eigenlins` and `eigenfols`.\n", "\n", "We can create `Ellipsoid` object similarly to `Matrix3` (note that only components of upper triangular part are available in `from_comp` method due to matrix symmetry), or you can use aditional class methods `from_defgrad` and `from_stretch`." ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.668594Z", "iopub.status.busy": "2026-02-06T23:36:10.668478Z", "iopub.status.idle": "2026-02-06T23:36:10.671155Z", "shell.execute_reply": "2026-02-06T23:36:10.670743Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "Ellipsoid\n", "[[5. 0. 0.5 ]\n", " [0. 1. 0. ]\n", " [0.5 0. 0.25]]\n", "(S1:2.25, S2:1, S3:0.445)" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "B = ellipsoid.from_defgrad(F) # Finger deformation tensor\n", "B" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In above example, the Finger deformation tensor `B` represents finite strain ellipsoid reulting from deformation described by deformation gradient `F`. We can explore several parameters:" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.672245Z", "iopub.status.busy": "2026-02-06T23:36:10.672131Z", "iopub.status.idle": "2026-02-06T23:36:10.675045Z", "shell.execute_reply": "2026-02-06T23:36:10.674667Z" }, "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Principal stretches: Sx=2.2476790206496235, Sy=1.0, Sz=0.44490338291762865\n", "Principal strain ratios: Rxy=2.2476790206496235, Ryz=2.2476790206496235\n", "Flinn's finite strain parameters: d=1.7644845924910786, k=1.0\n", "Ramsay's finite strain parameters: d=1.3118699860194973, k=1.0\n", "Woodcock's parameters: strength=1.6197962748565002, shape=1.0\n", "Watterson's strain intesity: s3.495358041299247\n", "Nadai's natural octahedral unit shear: 1.3225581202197996\n", "Nadai's natural octahedral unit strain: 1.14536893009174\n", "Lode's parameter: 0.0\n" ] } ], "source": [ "print(f'Principal stretches: Sx={B.S1}, Sy={B.S2}, Sz={B.S3}')\n", "print(f'Principal strain ratios: Rxy={B.Rxy}, Ryz={B.Ryz}')\n", "print(f\"Flinn's finite strain parameters: d={B.d}, k={B.k}\")\n", "print(f\"Ramsay's finite strain parameters: d={B.D}, k={B.K}\")\n", "print(f\"Woodcock's parameters: strength={B.strength}, shape={B.shape}\")\n", "print(f\"Watterson's strain intesity: s{B.r}\")\n", "print(f\"Nadai's natural octahedral unit shear: {B.goct}\")\n", "print(f\"Nadai's natural octahedral unit strain: {B.eoct}\")\n", "print(f\"Lode's parameter: {B.lode}\")" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.676304Z", "iopub.status.busy": "2026-02-06T23:36:10.676187Z", "iopub.status.idle": "2026-02-06T23:36:10.678757Z", "shell.execute_reply": "2026-02-06T23:36:10.678331Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "Ellipsoid\n", "[[4. 0. 2. ]\n", " [0. 1. 0. ]\n", " [2. 0. 1.25]]\n", "(S1:2.25, S2:1, S3:0.445)" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "C = ellipsoid.from_defgrad(F, 'right') # Green's deformation tensor\n", "C" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.679804Z", "iopub.status.busy": "2026-02-06T23:36:10.679668Z", "iopub.status.idle": "2026-02-06T23:36:10.681966Z", "shell.execute_reply": "2026-02-06T23:36:10.681584Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "1.25" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "v @ C @ v" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Orientation tensor\n", "`OrientationTensor3` class represents orientation tensor of set of vectors, linear or planar features. In adition to `Ellipsoid` methods and properties, it provides properties to describe orientation distribution, e.g. Vollmer's `P`, `G`, `R` and `B` indexes, `Intensity` for Lisle intensity index and `MAD` for approximate angular deviation." ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.683152Z", "iopub.status.busy": "2026-02-06T23:36:10.683037Z", "iopub.status.idle": "2026-02-06T23:36:10.690821Z", "shell.execute_reply": "2026-02-06T23:36:10.690384Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "OrientationTensor3\n", "[[ 0.171 -0.214 -0.205]\n", " [-0.214 0.426 0.372]\n", " [-0.205 0.372 0.403]]\n", "(S1:0.952, S2:0.228, S3:0.205)" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "l = linset.random_fisher(position=lin(120,40))\n", "ot = l.ortensor()\n", "# or\n", "ot = ortensor.from_features(l)\n", "ot" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.691947Z", "iopub.status.busy": "2026-02-06T23:36:10.691831Z", "iopub.status.idle": "2026-02-06T23:36:10.694137Z", "shell.execute_reply": "2026-02-06T23:36:10.693816Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "array([0.90603268, 0.05181145, 0.04215587])" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.eigenvalues()" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.695386Z", "iopub.status.busy": "2026-02-06T23:36:10.695270Z", "iopub.status.idle": "2026-02-06T23:36:10.697652Z", "shell.execute_reply": "2026-02-06T23:36:10.697265Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(Vector3(-0.373, 0.667, 0.645),\n", " Vector3(0.911, 0.134, 0.389),\n", " Vector3(-0.173, -0.733, 0.658))" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.eigenvectors()" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.698783Z", "iopub.status.busy": "2026-02-06T23:36:10.698640Z", "iopub.status.idle": "2026-02-06T23:36:10.700981Z", "shell.execute_reply": "2026-02-06T23:36:10.700601Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "'L'" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.kind" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The instances of `Stress3`, `Ellipsoid` and `OrientationTensor3` also provides `eigenlins` and `eigenfols` properties to represent principal axes and planes" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.702184Z", "iopub.status.busy": "2026-02-06T23:36:10.702070Z", "iopub.status.idle": "2026-02-06T23:36:10.704420Z", "shell.execute_reply": "2026-02-06T23:36:10.704057Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(L:119/40, L:8/23, L:257/41)" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.eigenlins()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.705400Z", "iopub.status.busy": "2026-02-06T23:36:10.705281Z", "iopub.status.idle": "2026-02-06T23:36:10.707581Z", "shell.execute_reply": "2026-02-06T23:36:10.707259Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(S:299/50, S:188/67, S:77/49)" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.eigenfols()" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.708701Z", "iopub.status.busy": "2026-02-06T23:36:10.708583Z", "iopub.status.idle": "2026-02-06T23:36:10.710828Z", "shell.execute_reply": "2026-02-06T23:36:10.710462Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(1.5338507721705306, 13.874614273084473)" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.strength, ot.shape" ] }, { "cell_type": "code", "execution_count": 28, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.712049Z", "iopub.status.busy": "2026-02-06T23:36:10.711933Z", "iopub.status.idle": "2026-02-06T23:36:10.714214Z", "shell.execute_reply": "2026-02-06T23:36:10.713795Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(29.29176929166005, 3.183613069062455)" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.k, ot.d" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.715210Z", "iopub.status.busy": "2026-02-06T23:36:10.715094Z", "iopub.status.idle": "2026-02-06T23:36:10.717287Z", "shell.execute_reply": "2026-02-06T23:36:10.716967Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(13.874614273084473, 2.057627749096746)" ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.K, ot.D" ] }, { "cell_type": "code", "execution_count": 30, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.718450Z", "iopub.status.busy": "2026-02-06T23:36:10.718332Z", "iopub.status.idle": "2026-02-06T23:36:10.720568Z", "shell.execute_reply": "2026-02-06T23:36:10.720181Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "(0.8542212291705433, 0.01931117418349544, 0.12646759664596108)" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.P, ot.G, ot.R" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "execution": { "iopub.execute_input": "2026-02-06T23:36:10.721710Z", "iopub.status.busy": "2026-02-06T23:36:10.721595Z", "iopub.status.idle": "2026-02-06T23:36:10.723774Z", "shell.execute_reply": "2026-02-06T23:36:10.723422Z" }, "tags": [] }, "outputs": [ { "data": { "text/plain": [ "17.85089167324438" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ot.MAD" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.3" } }, "nbformat": 4, "nbformat_minor": 4 }