{ "info": { "author": "Tobyn Nicholls", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": ".. image:: https://travis-ci.org/dls-controls/atip.svg?branch=master\n :target: https://travis-ci.org/dls-controls/atip\n.. image:: https://coveralls.io/repos/github/dls-controls/atip/badge.svg?branch=master\n :target: https://coveralls.io/github/dls-controls/atip?branch=master\n.. image:: https://readthedocs.org/projects/atip/badge/?version=latest\n :target: https://atip.readthedocs.io/en/latest/?badge=latest\n.. image:: https://badge.fury.io/py/atip.svg\n :target: https://badge.fury.io/py/atip\n\n==============================================\nATIP - Accelerator Toolbox Interface for Pytac\n==============================================\n\nATIP is an addition to `Pytac `_,\na framework for controlling particle accelerators. ATIP adds a simulator to\nPytac, which can be used and addressed in the same way as a real accelerator.\n\nATIP enables the easy offline testing of high level accelerator\ncontrols applications, by either of two methods:\n\n* By replacing the real accelerator at the point where it is addressed by the\n software, in the Pytac lattice object;\n\n* In a standalone application as a \"virtual accelerator\", publishing the same\n control system interface as the live machine. At Diamond Light Source this\n has been implemented with EPICS, and run on a different port to the\n operational control system. So the only change required to test software is\n to configure this EPICS port.\n\nThe python implementation of\n`Accelerator Toolbox `_ (pyAT) is used for the\nsimulation.\n\nFor further information on any of ATIP's functions or classes please read the\ndocumentation `here `_.\n\nInstallation:\n-------------\n\nSee the ``INSTALL.rst`` document.\n\nGeneral Use:\n------------\n\nATIP produces an \"integrated lattice\", which is a Pytac lattice object with a\nsimulation data source added. The simulated data sources are added using the\n``load()`` function found in ``load_sim.py``.\n\nThis adds ``pytac.SIM`` data sources on to the lattice and each of the\nelements.\n\nThe integrated lattice acts like a normal Pytac lattice; the simulator can be\nreferenced like the live machine but with the data source specified as\n``pytac.SIM`` instead of ``pytac.LIVE``.\n\nFor example, a get request to a BPM would be\n``.get_value('x', data_source=pytac.SIM)``.\n\nThe simulated data sources behave exactly like the live machine, except for a\nfew cases. For example, the simulator has a number of lattice fields that the\nlive accelerator doesn't have; and the live machine has a few element fields\nthat the simulator doesn't.\n\nVirtual Accelerator:\n--------------------\n\nInstructions for using ATIP as a virtual accelerator can be found in\n``virtac/README.rst``.\n\nImplementation:\n---------------\n\nAll the accelerator data for the simulator is held in an ``ATSimulator``\nobject, which is referenced by the data sources of the lattice and each\nelement.Each Pytac element has an equivalent pyAT element, held in a\n``ATElementDataSource``; when a get request is made, the appropriate data from\nthat AT element is returned.\n\nThe ``ATSimulator`` object has a queue of pending changes. When a set request\nis received by an element, the element puts the changes onto the queue of the\n``ATSimulator``. Inside the ``ATSimulator`` a\n`Cothread `_ thread checks the\nlength of the queue. When it sees changes on the queue, the thread\nrecalculates the physics data of the lattice to ensure that it is up to date.\nThis means that the emittance and linear optics data held by ``ATSimulator``\nis updated after every batch of changes, and that without excessive calculation\na very recent version of the lattice's physics data is always available.\n\nAPI:\n----\n\nload_sim:\n * ``load_from_filepath(pytac_lattice, at_lattice_filepath, callback=None)``\n - loads the AT lattice from the given filepath to the .mat file and then\n calls ``load``.\n * ``load(pytac_lattice, at_lattice, callback=None)`` - loads the simulator\n onto the passed Pytac lattice, callback is a callable that is passed to\n ATSimulator during creation to be called on completion of each round of\n physics calculations.\n\nATElementDataSource:\n * ``get_fields()`` - return the fields on the element.\n * ``add_field(field)`` - add the given field to this element's data source.\n * ``get_value(field)`` - get the value for a given field on the element.\n * ``set_value(field, value)`` - set the value for a given field on the\n element, appends the change to the queue.\n\nATLatticeDataSource:\n * ``get_fields()`` - return the fields on the lattice.\n * ``get_value(field)`` - get the value for a given field on the lattice.\n * ``set_value(field, set_value)`` - set the value for a given field on the\n lattice, currently not supported so raises HandleException.\n\nATSimulator:\n * ``toggle_calculations()`` - pause or unpause the recalculation thread.\n * ``wait_for_calculations(timeout=10)`` - wait up to 'timeout' seconds for\n the current calculations to conclude, if they do it returns True, if not\n False is returned; if 'timeout' is not passed it will wait 10 seconds.\n * ``get_at_element(index)`` - return a shallow copy of the specified AT\n element from the central AT ring, N.B. An 'index' of 1 returns ring[0].\n * ``get_at_lattice()`` - return a shallow copy of the entire centralised AT\n lattice object.\n * ``get_s()`` - return the 's position' of every element in the lattice.\n * ``get_total_bend_angle()`` - return the total bending angle of all the\n dipoles in the lattice.\n * ``get_total_absolute_bend_angle()`` - return the total absolute bending\n angle of all the dipoles in the lattice.\n * ``get_energy()`` - return the energy of the lattice.\n * ``get_tune(field)`` - return the specified plane of the lattice's\n 'tune'; 'x' or 'y'.\n * ``get_chromaticity(field)`` - return the specified plane of the lattice's\n 'chromaticity'; 'x' or 'y'.\n * ``get_orbit(field)`` - return the specified plane of the lattice's\n 'closed orbit'; 'x', 'phase_x', 'y', or 'phase_y'.\n * ``get_dispersion()`` - return the 'dispersion' vector for every element\n in the lattice.\n * ``get_alpha()`` - return the 'alpha' vector at every element in the\n lattice.\n * ``get_beta()`` - return the 'beta' vector at every element in the\n lattice.\n * ``get_mu()`` - return 'mu' at every element in the lattice.\n * ``get_m44()`` - return the 4x4 transfer matrix for every element in the\n lattice.\n * ``get_emittance(field)`` - return the specified plane of the lattice's\n 'emittance'; 'x' or 'y'.\n * ``get_radiation_integrals()`` - return the 5 Synchrotron Integrals for\n the lattice.\n * ``get_momentum_compaction()`` - return the momentum compaction factor\n for the lattice.\n * ``get_energy_spread()`` - return the energy spread for the lattice.\n * ``get_energy_loss()`` - return the energy loss per turn of the lattice.\n * ``get_damping_partition_numbers()`` - return the damping partition\n numbers for the lattice's three normal modes.\n * ``get_damping_times()`` - return the damping times for the lattice's\n three normal modes.\n * ``get_linear_dispersion_action()`` - return the Linear Dispersion Action\n (\"curly H\") for the lattice.\n * ``get_horizontal_emittance()`` - return the horizontal ('x') emittance\n for the lattice calculated from the radiation integrals.\n\n\nSpecific Notes:\n---------------\n\nIn order for ATIP to function correctly, the AT and Pytac lattices used must be\ndirectly equivalent, i.e. they must have the same length and elements in the\nsame positions.\n\nIf local (not pip) installations are used, ATIP, AT, and Pytac must all be\nlocated in the same source directory in order for ATIP to function correctly.\n\nThe methods on ATIP's data sources that take ``handle`` and ``throw`` arguments\ndo so only to conform with the Pytac ``DataSource`` base class from which they\ninherit. Inside ATIP they are not used and can be ignored.\n\nTo interpret which data is to be returned or set, both ``ATElementDataSource``\nand ``ATLatticeDataSource`` use a dictionary of functions corresponding to\nfields. In the case where a cell needs to be passed to the data handling\nfunctions, for further specification, functools' ``partial()`` is used.\n\nThe physics data is received from AT all together; to make it easier to manage,\nit is split by ATIP and accessed by a number of methods of the ``ATSimulator``\nobject. This aims to be more convenient for the user but does result in the\nATSimulator object having a large number of methods.\n\nA number of functions that perform tasks that are frequent or long-winded are\nincluded in ``utils.py`` to make life easier for the user.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dls-controls/atip", "keywords": "accelerator physics", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "atip", "package_url": "https://pypi.org/project/atip/", "platform": "", "project_url": "https://pypi.org/project/atip/", "project_urls": { "Homepage": "https://github.com/dls-controls/atip" }, "release_url": "https://pypi.org/project/atip/0.0.2/", "requires_dist": [ "numpy (<1.17.0)", "scipy (<1.3.0)", "pytac (>=0.3.0)", "accelerator-toolbox (>=0.0.2)", "cothread" ], "requires_python": ">=2.7.4", "summary": "ATIP: Accelerator Toolbox Interface for Pytac", "version": "0.0.2" }, "last_serial": 5819047, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "759f47a24e9d8342157b3cd06ad181b2", "sha256": "804cb10ffdcf8e5cb7f96a10f04bc8aa8c6cf115c4299dc3d18536f1403fc81b" }, "downloads": -1, "filename": "atip-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "759f47a24e9d8342157b3cd06ad181b2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.4", "size": 816768, "upload_time": "2019-07-26T14:24:24", "url": "https://files.pythonhosted.org/packages/a2/ff/fedf446a9a1061c7677ed3d5676365000d5f33cc24b45268c4fa45f3dd41/atip-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ca9f461ac1da4ec7ae9a36ef9b843a6", "sha256": "c37e85c3835d18cb9a3cd7ed7e9b34351be16d61bb294bc36feec52892ee8154" }, "downloads": -1, "filename": "atip-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5ca9f461ac1da4ec7ae9a36ef9b843a6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.4", "size": 807037, "upload_time": "2019-07-26T14:35:58", "url": "https://files.pythonhosted.org/packages/9f/6c/cf18fca6a1fc7993e03f85b8e2087af0aef9ad9697b911d11739f6673e55/atip-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "0c8f8ac7af8e3171e9d00df27a4d94d3", "sha256": "fac2974ae2b12d4ae5dada6710eecc9bee944c05c3440cf315d02b9d4229e64c" }, "downloads": -1, "filename": "atip-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0c8f8ac7af8e3171e9d00df27a4d94d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.4", "size": 823422, "upload_time": "2019-09-12T08:58:11", "url": "https://files.pythonhosted.org/packages/c3/f3/abfad30bb32b1e3b3ae48121cd3ac7d1d051186f04e10d6f2da09a41ff74/atip-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78e54688e90e762dab7e6fdbf31c9812", "sha256": "6dad95a594d67d9ed16eee4f7a5d4c4910aebf599ef4579c6575d56d2bf64446" }, "downloads": -1, "filename": "atip-0.0.2.tar.gz", "has_sig": false, "md5_digest": "78e54688e90e762dab7e6fdbf31c9812", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.4", "size": 809346, "upload_time": "2019-09-12T08:58:14", "url": "https://files.pythonhosted.org/packages/7d/70/0447d05ee64afc0906e74ec18bd5189e3f667bae30bb08c2a732d2edf776/atip-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0c8f8ac7af8e3171e9d00df27a4d94d3", "sha256": "fac2974ae2b12d4ae5dada6710eecc9bee944c05c3440cf315d02b9d4229e64c" }, "downloads": -1, "filename": "atip-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0c8f8ac7af8e3171e9d00df27a4d94d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.4", "size": 823422, "upload_time": "2019-09-12T08:58:11", "url": "https://files.pythonhosted.org/packages/c3/f3/abfad30bb32b1e3b3ae48121cd3ac7d1d051186f04e10d6f2da09a41ff74/atip-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78e54688e90e762dab7e6fdbf31c9812", "sha256": "6dad95a594d67d9ed16eee4f7a5d4c4910aebf599ef4579c6575d56d2bf64446" }, "downloads": -1, "filename": "atip-0.0.2.tar.gz", "has_sig": false, "md5_digest": "78e54688e90e762dab7e6fdbf31c9812", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.4", "size": 809346, "upload_time": "2019-09-12T08:58:14", "url": "https://files.pythonhosted.org/packages/7d/70/0447d05ee64afc0906e74ec18bd5189e3f667bae30bb08c2a732d2edf776/atip-0.0.2.tar.gz" } ] }