{ "cells": [ { "cell_type": "markdown", "id": "92bcf475-ac1b-4a00-9d01-b106a435c306", "metadata": {}, "source": [ "# Fixed object" ] }, { "cell_type": "code", "execution_count": 1, "id": "210145fc", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "FixedObject:\n", " .id: my object\n", " .scattering_factor: (0.876-0.965j)\n", " .matrix:\n", "[[ 0.5+0.j 0. +0.5j]\n", " [-0. -0.5j 0.5+0.j ]]\n", "\n" ] } ], "source": [ "import nexus as nx\n", "import numpy as np\n", "\n", "factor = 0.876-0.965j\n", "\n", "matrix = np.array([[0.5, 0.5j], [-0.5j, 0.5]])\n", "\n", "fixed_object = nx.FixedObject(factor, matrix, \"my object\")\n", "\n", "print(fixed_object)" ] } ], "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.12.0" } }, "nbformat": 4, "nbformat_minor": 5 }