{ "cells": [ { "attachments": {}, "cell_type": "markdown", "id": "70706793-5a95-4598-8d45-2208eb0a54fd", "metadata": {}, "source": [ "# Example-03: Workflow (ELEGANT)" ] }, { "cell_type": "code", "execution_count": 1, "id": "c7155f5d-e16a-4374-979a-b3477eee7a55", "metadata": {}, "outputs": [], "source": [ "from pathlib import Path\n", "\n", "from model.command.external import load_lattice\n", "from model.command.external import rift_lattice\n", "from model.command.external import text_lattice\n", "from model.command.external import load_sdds\n", "from model.command.external import convert\n", "from model.command.external import add_rc" ] }, { "cell_type": "code", "execution_count": 2, "id": "7f0167ee-1eb5-4a03-a06e-c6256c2f08a2", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "DR: DRIF,l=2\n", "\n", "BM: CSBEND,angle=0.17453292519943295,fint=0,l=1.0\n", "QD: QUAD,k1=-0.2,l=0.5\n", "QF: QUAD,k1=0.2,l=1.0\n", "\n", "M: MONI,\n", "\n", "HEAD: MARK, ! TEST: DRIF,\n", "TAIL: MARK, ! TEST: DRIF,\n", "\n", "FODO: LINE=(HEAD, M, QD, DR, BM, DR, QF, DR, BM, DR, QD, TAIL)\n" ] } ], "source": [ "# Given some initial ELEGANT lattice file (FODO)\n", "\n", "file = Path('initial.lte')\n", "\n", "with file.open('r') as stream:\n", " print(stream.read())\n", "\n", "# Several regular elements are defined\n", "# HEAD and TAIL should appear as the first and the last elements\n", "# All elements should be defined on a single line with numerical parameters\n", "# Lattice should be defined using lines\n", "# Comma after element type is mandatory\n", "# Comments appearing after definitions should also represent an element definition" ] }, { "cell_type": "code", "execution_count": 3, "id": "39ce25e6-47b7-4ec8-960c-b21b60fd99d6", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "DR {'KIND': 'DRIF', 'RC': '', 'L': 2}\n", "BM {'KIND': 'CSBEND', 'RC': '', 'ANGLE': 0.17453292519943295, 'FINT': 0, 'L': 1.0}\n", "QD {'KIND': 'QUAD', 'RC': '', 'K1': -0.2, 'L': 0.5}\n", "QF {'KIND': 'QUAD', 'RC': '', 'K1': 0.2, 'L': 1.0}\n", "M {'KIND': 'MONI', 'RC': ''}\n", "HEAD {'KIND': 'MARK', 'RC': 'TEST: DRIF,'}\n", "TAIL {'KIND': 'MARK', 'RC': 'TEST: DRIF,'}\n", "FODO {'KIND': 'LINE', 'SEQUENCE': ['HEAD', 'M', 'QD', 'DR', 'BM', 'DR', 'QF', 'DR', 'BM', 'DR', 'QD', 'TAIL']}\n" ] } ], "source": [ "# If element and beamline definitions comply with the above requirements\n", "# The lattice file can be loaded as a python dictionary\n", "\n", "lattice = load_lattice(file)\n", "\n", "for key, value in lattice.items():\n", " print(key, value)\n", "\n", "# For each element and beamline, a key-value pair in created\n", "# Value is itself a dictionary containing all information about the original elements\n", "# Each element parameter is casted from string to int, float or string\n", "# Comment after element definition is saved into RC (it has a special use case, see below)" ] }, { "cell_type": "code", "execution_count": 4, "id": "e0b8b369-29dc-4dc8-859b-658a0a17545e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "M_DR {'KIND': 'MONI', 'RC': ['DR', {'KIND': 'DRIF', 'L': 2}]}\n", "H_DR {'KIND': 'DRIF', 'L': 1.0}\n", "DR {'KIND': 'LINE', 'SEQUENCE': ['H_DR', 'M_DR', 'H_DR']}\n", "V_BM {'KIND': 'MARK', 'RC': ['BM', {'KIND': 'CSBEND', 'ANGLE': 0.17453292519943295, 'FINT': 0, 'L': 1.0}]}\n", "H_BM {'KIND': 'CSBEND', 'ANGLE': 0.08726646259971647, 'FINT': 0, 'L': 0.5}\n", "BM {'KIND': 'LINE', 'SEQUENCE': ['H_BM', 'V_BM', 'H_BM']}\n", "QD {'KIND': 'QUAD', 'RC': '', 'K1': -0.2, 'L': 0.5}\n", "V_QF {'KIND': 'MARK', 'RC': ['QF', {'KIND': 'QUAD', 'K1': 0.2, 'L': 1.0}]}\n", "H_QF {'KIND': 'QUAD', 'K1': 0.2, 'L': 0.5}\n", "QF {'KIND': 'LINE', 'SEQUENCE': ['H_QF', 'V_QF', 'H_QF']}\n", "M {'KIND': 'MONI', 'RC': ''}\n", "HEAD {'KIND': 'MARK', 'RC': 'TEST: DRIF,'}\n", "TAIL {'KIND': 'MARK', 'RC': 'TEST: DRIF,'}\n", "FODO {'KIND': 'LINE', 'SEQUENCE': ['HEAD', 'M', 'QD', 'DR', 'BM', 'DR', 'QF', 'DR', 'BM', 'DR', 'QD', 'TAIL']}\n" ] } ], "source": [ "# Error lattice is defined by a set of linear transformations between selected locations\n", "# Each locations can be a MONITOR (beam observation) or a VIRTUAL (error)\n", "# Two special locatons (HEAD and TAIL) should present in the lattice\n", "# Using the above dictionary representation, new observation locations can be inserted\n", "# Locations are inserted at the middle of selected elements (selected by type or name)\n", "# Selected elements are splitted in half and renamed, old names are binded to beamlines\n", "# Original element definitions are added to created location RC\n", "# Typicaly, monitor locations correspond to MONITOR elements, but new monitor elements can be also inserted\n", "# Virtual locations can be inserted into quadrupole or other elements to represent errors\n", "\n", "lattice = rift_lattice(lattice, \n", " 'MONI', \n", " 'MARK', \n", " ['DRIF'], \n", " ['CSBEND', 'QUAD'], \n", " exclude_virtual=['QD'])\n", "\n", "for key, value in lattice.items():\n", " print(key, value)" ] }, { "cell_type": "code", "execution_count": 5, "id": "e7f72d66-2ac0-4a6f-b12d-45410acd13f5", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "M_DR: MONI, ! DR: DRIF, L=2,\n", "H_DR: DRIF, L=1.0,\n", "DR: LINE=(H_DR, M_DR, H_DR)\n", "V_BM: MARK, ! BM: CSBEND, ANGLE=0.17453292519943295, FINT=0, L=1.0,\n", "H_BM: CSBEND, ANGLE=0.08726646259971647, FINT=0, L=0.5,\n", "BM: LINE=(H_BM, V_BM, H_BM)\n", "QD: QUAD, K1=-0.2, L=0.5,\n", "V_QF: MARK, ! QF: QUAD, K1=0.2, L=1.0,\n", "H_QF: QUAD, K1=0.2, L=0.5,\n", "QF: LINE=(H_QF, V_QF, H_QF)\n", "M: MONI,\n", "HEAD: MARK, ! TEST: DRIF,\n", "TAIL: MARK, ! TEST: DRIF,\n", "FODO: LINE=(HEAD, M, QD, DR, BM, DR, QF, DR, BM, DR, QD, TAIL)\n", "\n" ] } ], "source": [ "# Modified lattice can be converted to text\n", "# Comments are added to locations while original comments are preserved\n", "\n", "text = text_lattice('LTE', lattice, rc=True)\n", "\n", "print(text)" ] }, { "cell_type": "code", "execution_count": 6, "id": "4ec13d02-ae33-4d58-ade9-125c00fcc90a", "metadata": { "scrolled": true }, "outputs": [], "source": [ "# Compute TWISS parameters using ELEGANT\n", "# Separate command file is created\n", "\n", "with Path('final.lte').open('w') as stream:\n", " stream.write(text)\n", "\n", "task = \"\"\"\n", "&run_setup\n", " use_beamline=\"FODO\",\n", " lattice = \"final.lte\",\n", " p_central_mev = 1000\n", "&end\n", "\n", "&run_control\n", "&end\n", "\n", "&twiss_output\n", " filename = \"binary.twiss\",\n", " output_at_each_step = 1\n", "&end\n", "\n", "&bunched_beam\n", "&end\n", "\n", "&track\n", "&end\n", "\"\"\" ;\n", "\n", "with Path('final.ele').open('w') as stream:\n", " stream.write(task)\n", "\n", "!elegant final.ele > /dev/null\n", "!sddsconvert -ascii binary.twiss final.twiss" ] }, { "cell_type": "code", "execution_count": 7, "id": "86013097-d261-486b-b2af-35f9604b6351", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "M_DR {'KIND': 'MONI', 'RC': ['DR', {'KIND': 'DRIF', 'RC': '', 'L': 2}]}\n", "H_DR {'KIND': 'DRIF', 'RC': ['', {'KIND': '', 'RC': ''}], 'L': 1.0}\n", "DR {'KIND': 'LINE', 'SEQUENCE': ['H_DR', 'M_DR', 'H_DR']}\n", "V_BM {'KIND': 'MARK', 'RC': ['BM', {'KIND': 'CSBEND', 'RC': '', 'ANGLE': 0.17453292519943295, 'FINT': 0, 'L': 1.0}]}\n", "H_BM {'KIND': 'CSBEND', 'RC': ['', {'KIND': '', 'RC': ''}], 'ANGLE': 0.08726646259971647, 'FINT': 0, 'L': 0.5}\n", "BM {'KIND': 'LINE', 'SEQUENCE': ['H_BM', 'V_BM', 'H_BM']}\n", "QD {'KIND': 'QUAD', 'RC': ['', {'KIND': '', 'RC': ''}], 'K1': -0.2, 'L': 0.5}\n", "V_QF {'KIND': 'MARK', 'RC': ['QF', {'KIND': 'QUAD', 'RC': '', 'K1': 0.2, 'L': 1.0}]}\n", "H_QF {'KIND': 'QUAD', 'RC': ['', {'KIND': '', 'RC': ''}], 'K1': 0.2, 'L': 0.5}\n", "QF {'KIND': 'LINE', 'SEQUENCE': ['H_QF', 'V_QF', 'H_QF']}\n", "M {'KIND': 'MONI', 'RC': ['', {'KIND': '', 'RC': ''}]}\n", "HEAD {'KIND': 'MARK', 'RC': ['TEST', {'KIND': 'DRIF', 'RC': ''}]}\n", "TAIL {'KIND': 'MARK', 'RC': ['TEST', {'KIND': 'DRIF', 'RC': ''}]}\n", "FODO {'KIND': 'LINE', 'SEQUENCE': ['HEAD', 'M', 'QD', 'DR', 'BM', 'DR', 'QF', 'DR', 'BM', 'DR', 'QD', 'TAIL']}\n" ] } ], "source": [ "# Load lattice can be also loaded from file\n", "# Original comments will be parsed as elements (look at HEAD and TAIL)\n", "# Empty RC will be nested in this case\n", "\n", "file = Path('final.lte')\n", "\n", "with file.open('w') as stream:\n", " stream.write(text)\n", "\n", "lattice = load_lattice(file, rc=True)\n", "\n", "for key, value in lattice.items():\n", " print(key, value)" ] }, { "cell_type": "code", "execution_count": 8, "id": "e299a720-b7ad-4cbb-b281-014ad87322fc", "metadata": {}, "outputs": [], "source": [ "# TWISS results can be loaded into python dictionaries\n", "\n", "data = Path('final.twiss')\n", "parameters, columns = load_sdds(data)" ] }, { "cell_type": "code", "execution_count": 9, "id": "8cd4345e-effb-48f1-ad46-c824e242d55f", "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "{'HEAD': {'S': 0.0,\n", " 'BX': 4.287017734831204,\n", " 'AX': -1.321304551729011e-16,\n", " 'FX': 0.0,\n", " 'DQX': 1.549040841795901,\n", " 'DPX': 2.775557561562891e-17,\n", " 'BY': 19.81848926815186,\n", " 'AY': 6.545730027929358e-16,\n", " 'FY': 0.0,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': None},\n", " 'M': {'S': 0.0,\n", " 'BX': 4.287017734831204,\n", " 'AX': -1.321304551729011e-16,\n", " 'FX': 0.0,\n", " 'DQX': 1.549040841795901,\n", " 'DPX': 2.775557561562891e-17,\n", " 'BY': 19.81848926815186,\n", " 'AY': 6.545730027929358e-16,\n", " 'FY': 0.0,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': None},\n", " 'M_DR': {'S': 1.5,\n", " 'BX': 5.980356479284525,\n", " 'AX': -0.8524040348212205,\n", " 'FX': 0.3068185834444499,\n", " 'DQX': 1.744126672993481,\n", " 'DPX': 0.1561981825607101,\n", " 'BY': 15.31515988971357,\n", " 'AY': 1.649167846239909,\n", " 'FY': 0.08453149253790615,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': None},\n", " 'V_BM': {'S': 3.0,\n", " 'BX': 9.120629409314306,\n", " 'AX': -1.146568740048648,\n", " 'FX': 0.5107301355818847,\n", " 'DQX': 1.99289632225274,\n", " 'DPX': 0.2138526637243729,\n", " 'BY': 10.91413760701325,\n", " 'AY': 1.284847009200138,\n", " 'FY': 0.2008141505892614,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': None},\n", " 'M_DR_1': {'S': 4.5,\n", " 'BX': 12.70896979491113,\n", " 'AX': -1.336396672789745,\n", " 'FX': 0.6500917126795847,\n", " 'DQX': 2.383785789407781,\n", " 'DPX': 0.2698795969893243,\n", " 'BY': 7.606077834992553,\n", " 'AY': 0.9205261718281931,\n", " 'FY': 0.3661997933967667,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': None},\n", " 'V_QF': {'S': 6.0,\n", " 'BX': 16.39200719526896,\n", " 'AX': 3.608224830031759e-16,\n", " 'FX': 0.7521811119743597,\n", " 'DQX': 2.721417822995524,\n", " 'DPX': -5.551115123125783e-17,\n", " 'BY': 5.674619589422572,\n", " 'AY': 8.326672684688672e-16,\n", " 'FY': 0.6011311668647427,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': None},\n", " 'M_DR_2': {'S': 7.5,\n", " 'BX': 12.70896979491113,\n", " 'AX': 1.336396672789746,\n", " 'FX': 0.8542705112691347,\n", " 'DQX': 2.383785789407781,\n", " 'DPX': -0.2698795969893243,\n", " 'BY': 7.606077834992548,\n", " 'AY': -0.920526171828191,\n", " 'FY': 0.8360625403327188,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': None},\n", " 'V_BM_1': {'S': 9.0,\n", " 'BX': 9.120629409314306,\n", " 'AX': 1.146568740048649,\n", " 'FX': 0.9936320883668346,\n", " 'DQX': 1.992896322252739,\n", " 'DPX': -0.2138526637243729,\n", " 'BY': 10.91413760701323,\n", " 'AY': -1.284847009200136,\n", " 'FY': 1.001448183140224,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': None},\n", " 'M_DR_3': {'S': 10.5,\n", " 'BX': 5.980356479284523,\n", " 'AX': 0.852404034821221,\n", " 'FX': 1.197543640504269,\n", " 'DQX': 1.744126672993481,\n", " 'DPX': -0.1561981825607101,\n", " 'BY': 15.31515988971355,\n", " 'AY': -1.649167846239906,\n", " 'FY': 1.11773084119158,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': None},\n", " 'TAIL': {'S': 12.0,\n", " 'BX': 4.287017734831201,\n", " 'AX': 5.273559366969493e-16,\n", " 'FX': 1.50436222394872,\n", " 'DQX': 1.549040841795901,\n", " 'DPX': -1.110223024625157e-16,\n", " 'BY': 19.81848926815184,\n", " 'AY': 1.387778780781446e-16,\n", " 'FY': 1.202262333729486,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': None}}" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Optics data can be converted into model table\n", "# Note, all locations have different name\n", "# If an element appear several times in a line, locations are renamed\n", "\n", "table = convert(columns, 'SDDS', ['MONI'], ['MARK'], rc=True)\n", "table" ] }, { "cell_type": "code", "execution_count": 10, "id": "f6d4a121-8d34-4db1-8c09-dbb1fd13317a", "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "{'HEAD': {'S': 0.0,\n", " 'BX': 4.287017734831204,\n", " 'AX': -1.321304551729011e-16,\n", " 'FX': 0.0,\n", " 'DQX': 1.549040841795901,\n", " 'DPX': 2.775557561562891e-17,\n", " 'BY': 19.81848926815186,\n", " 'AY': 6.545730027929358e-16,\n", " 'FY': 0.0,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': None},\n", " 'M': {'S': 0.0,\n", " 'BX': 4.287017734831204,\n", " 'AX': -1.321304551729011e-16,\n", " 'FX': 0.0,\n", " 'DQX': 1.549040841795901,\n", " 'DPX': 2.775557561562891e-17,\n", " 'BY': 19.81848926815186,\n", " 'AY': 6.545730027929358e-16,\n", " 'FY': 0.0,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': None},\n", " 'M_DR': {'S': 1.5,\n", " 'BX': 5.980356479284525,\n", " 'AX': -0.8524040348212205,\n", " 'FX': 0.3068185834444499,\n", " 'DQX': 1.744126672993481,\n", " 'DPX': 0.1561981825607101,\n", " 'BY': 15.31515988971357,\n", " 'AY': 1.649167846239909,\n", " 'FY': 0.08453149253790615,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': ['DR', {'KIND': 'DRIF', 'L': 2}]},\n", " 'V_BM': {'S': 3.0,\n", " 'BX': 9.120629409314306,\n", " 'AX': -1.146568740048648,\n", " 'FX': 0.5107301355818847,\n", " 'DQX': 1.99289632225274,\n", " 'DPX': 0.2138526637243729,\n", " 'BY': 10.91413760701325,\n", " 'AY': 1.284847009200138,\n", " 'FY': 0.2008141505892614,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': ['BM',\n", " {'KIND': 'CSBEND', 'ANGLE': 0.17453292519943295, 'FINT': 0, 'L': 1.0}]},\n", " 'M_DR_1': {'S': 4.5,\n", " 'BX': 12.70896979491113,\n", " 'AX': -1.336396672789745,\n", " 'FX': 0.6500917126795847,\n", " 'DQX': 2.383785789407781,\n", " 'DPX': 0.2698795969893243,\n", " 'BY': 7.606077834992553,\n", " 'AY': 0.9205261718281931,\n", " 'FY': 0.3661997933967667,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': ['DR', {'KIND': 'DRIF', 'L': 2}]},\n", " 'V_QF': {'S': 6.0,\n", " 'BX': 16.39200719526896,\n", " 'AX': 3.608224830031759e-16,\n", " 'FX': 0.7521811119743597,\n", " 'DQX': 2.721417822995524,\n", " 'DPX': -5.551115123125783e-17,\n", " 'BY': 5.674619589422572,\n", " 'AY': 8.326672684688672e-16,\n", " 'FY': 0.6011311668647427,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': ['QF', {'KIND': 'QUAD', 'K1': 0.2, 'L': 1.0}]},\n", " 'M_DR_2': {'S': 7.5,\n", " 'BX': 12.70896979491113,\n", " 'AX': 1.336396672789746,\n", " 'FX': 0.8542705112691347,\n", " 'DQX': 2.383785789407781,\n", " 'DPX': -0.2698795969893243,\n", " 'BY': 7.606077834992548,\n", " 'AY': -0.920526171828191,\n", " 'FY': 0.8360625403327188,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': ['DR', {'KIND': 'DRIF', 'L': 2}]},\n", " 'V_BM_1': {'S': 9.0,\n", " 'BX': 9.120629409314306,\n", " 'AX': 1.146568740048649,\n", " 'FX': 0.9936320883668346,\n", " 'DQX': 1.992896322252739,\n", " 'DPX': -0.2138526637243729,\n", " 'BY': 10.91413760701323,\n", " 'AY': -1.284847009200136,\n", " 'FY': 1.001448183140224,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': ['BM',\n", " {'KIND': 'CSBEND', 'ANGLE': 0.17453292519943295, 'FINT': 0, 'L': 1.0}]},\n", " 'M_DR_3': {'S': 10.5,\n", " 'BX': 5.980356479284523,\n", " 'AX': 0.852404034821221,\n", " 'FX': 1.197543640504269,\n", " 'DQX': 1.744126672993481,\n", " 'DPX': -0.1561981825607101,\n", " 'BY': 15.31515988971355,\n", " 'AY': -1.649167846239906,\n", " 'FY': 1.11773084119158,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'MONITOR',\n", " 'RC': ['DR', {'KIND': 'DRIF', 'L': 2}]},\n", " 'TAIL': {'S': 12.0,\n", " 'BX': 4.287017734831201,\n", " 'AX': 5.273559366969493e-16,\n", " 'FX': 1.50436222394872,\n", " 'DQX': 1.549040841795901,\n", " 'DPX': -1.110223024625157e-16,\n", " 'BY': 19.81848926815184,\n", " 'AY': 1.387778780781446e-16,\n", " 'FY': 1.202262333729486,\n", " 'DQY': 0.0,\n", " 'DPY': 0.0,\n", " 'TYPE': 'VIRTUAL',\n", " 'RC': None}}" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# RC parameter from lattice data can be added to model table\n", "# Configuration table can be saved using util.save\n", "\n", "table = add_rc(table, lattice)\n", "table" ] } ], "metadata": { "colab": { "collapsed_sections": [ "myt0_gMIOq7b", "5d97819c" ], "name": "03_frequency.ipynb", "provenance": [] }, "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.1" }, "latex_envs": { "LaTeX_envs_menu_present": true, "autoclose": false, "autocomplete": true, "bibliofile": "biblio.bib", "cite_by": "apalike", "current_citInitial": 1, "eqLabelWithNumbers": true, "eqNumInitial": 1, "hotkeys": { "equation": "Ctrl-E", "itemize": "Ctrl-I" }, "labels_anchors": false, "latex_user_defs": false, "report_style_numbering": false, "user_envs_cfg": false } }, "nbformat": 4, "nbformat_minor": 5 }