transfocate


Nametransfocate JSON
Version 0.5.9 PyPI version JSON
download
home_pageNone
SummaryAutomated Calculation of Transfocator Focusing Optics
upload_time2024-08-23 00:24:10
maintainerNone
docs_urlNone
authorSLAC National Accelerator Laboratory
requires_python>=3.9
licenseCopyright (c) 2023, The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. (3) Neither the name of the Leland Stanford Junior University, SLAC National Accelerator Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER, THE UNITED STATES GOVERNMENT, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to SLAC National Accelerator Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such Enhancements or derivative works thereof, in binary and source code form.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            transfocate
===========
.. image:: https://travis-ci.org/pcdshub/transfocate.svg?branch=master
    :target: https://travis-ci.org/pcdshub/transfocate

* ophyd Devices for transfocator access in hutch-python
* Automated calculation of beryllium lens focusing optics for MFX Transfocator
* Automated checkout tools for verifying PLC interlock status
* Report generation for the latter

Note about RP
-------------

This module is not under Radiation Protection's defined scope for items which require
a permit to complete.

Note about the IOC
------------------

ioc-mfx-tfs-lens holds some important state for this ophyd support and calculations to work properly.
If you experience zero division exceptions when performing calculations, chances are that the IOC
has some invalid values stored.

Automated Checkout tools
=========================

These scripts use the IOC-defined bypass tools, meaning that no lenses will be
moved and photon energy does _not_ need to change.

** Do not run these scripts without permission from MFX. **

Performing a checkout
---------------------

First, load an IPython session with this module:

.. code-block:: bash

    $ source /reg/g/pcds/pyps/conda/pcds_conda
    $ ipython -i -m transfocate.automated_checkout

If the above times out, re-run the script.  It's ophyd related and will be
resolved eventually.  Otherwise, continue on.

Manual mode
-----------

To perform a scan for a single XRT lens, use:

.. code-block:: python

    >>> sweep_and_plot_xrt(xrt_lens, num_steps=100)

This will choose different combinations of TFS lenses to span the region, and
scan energy in 100 discrete steps.
To perform a scan for _all_ XRT lenses, use:

.. code-block:: python

    >>> sweep_and_plot_xrt_all(num_steps=100)

Per-lens data and plots will be saved to Excel and PNG/PDF files, respectively.
This can be combined into a full checkout report with the following:

.. code-block:: python

    >>> generate_report()

Automatic mode
---------------------

Automatic mode will perform ``sweep_and_plot_xrt_all()`` and
``generate_report()`` for you.

Report generation
---------------------

Report generation will use the files generated from the scan steps above.
It will only use existing files from the current directory.
It can be used on its own - after exiting the IPython session and reloading
it - without scanning again.

Now, you'll have the option to perform the steps automatically or manually.

Authors
=======

Teddy Rendahl, Taryn Imamura, Ken Lauer, and anyone else listed in `git blame`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "transfocate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "SLAC National Accelerator Laboratory",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/81/06/13e399d93bdd905d71e7898885e8d2a235b802576bbb8e8a5d95c36842ad/transfocate-0.5.9.tar.gz",
    "platform": null,
    "description": "transfocate\n===========\n.. image:: https://travis-ci.org/pcdshub/transfocate.svg?branch=master\n    :target: https://travis-ci.org/pcdshub/transfocate\n\n* ophyd Devices for transfocator access in hutch-python\n* Automated calculation of beryllium lens focusing optics for MFX Transfocator\n* Automated checkout tools for verifying PLC interlock status\n* Report generation for the latter\n\nNote about RP\n-------------\n\nThis module is not under Radiation Protection's defined scope for items which require\na permit to complete.\n\nNote about the IOC\n------------------\n\nioc-mfx-tfs-lens holds some important state for this ophyd support and calculations to work properly.\nIf you experience zero division exceptions when performing calculations, chances are that the IOC\nhas some invalid values stored.\n\nAutomated Checkout tools\n=========================\n\nThese scripts use the IOC-defined bypass tools, meaning that no lenses will be\nmoved and photon energy does _not_ need to change.\n\n** Do not run these scripts without permission from MFX. **\n\nPerforming a checkout\n---------------------\n\nFirst, load an IPython session with this module:\n\n.. code-block:: bash\n\n    $ source /reg/g/pcds/pyps/conda/pcds_conda\n    $ ipython -i -m transfocate.automated_checkout\n\nIf the above times out, re-run the script.  It's ophyd related and will be\nresolved eventually.  Otherwise, continue on.\n\nManual mode\n-----------\n\nTo perform a scan for a single XRT lens, use:\n\n.. code-block:: python\n\n    >>> sweep_and_plot_xrt(xrt_lens, num_steps=100)\n\nThis will choose different combinations of TFS lenses to span the region, and\nscan energy in 100 discrete steps.\nTo perform a scan for _all_ XRT lenses, use:\n\n.. code-block:: python\n\n    >>> sweep_and_plot_xrt_all(num_steps=100)\n\nPer-lens data and plots will be saved to Excel and PNG/PDF files, respectively.\nThis can be combined into a full checkout report with the following:\n\n.. code-block:: python\n\n    >>> generate_report()\n\nAutomatic mode\n---------------------\n\nAutomatic mode will perform ``sweep_and_plot_xrt_all()`` and\n``generate_report()`` for you.\n\nReport generation\n---------------------\n\nReport generation will use the files generated from the scan steps above.\nIt will only use existing files from the current directory.\nIt can be used on its own - after exiting the IPython session and reloading\nit - without scanning again.\n\nNow, you'll have the option to perform the steps automatically or manually.\n\nAuthors\n=======\n\nTeddy Rendahl, Taryn Imamura, Ken Lauer, and anyone else listed in `git blame`.\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2023, The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  (3) Neither the name of the Leland Stanford Junior University, SLAC National Accelerator Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER, THE UNITED STATES GOVERNMENT, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code (\"Enhancements\") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to SLAC National Accelerator Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such Enhancements or derivative works thereof, in binary and source code form. ",
    "summary": "Automated Calculation of Transfocator Focusing Optics",
    "version": "0.5.9",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "745a6974a0af95fdbecb903ad6f04a5b8856f3fce9f6c092fe4023c192762542",
                "md5": "64b2ae4123e238ea17b6a4707d92881b",
                "sha256": "4c64c0dd70c7f1238f0f7c42f1e8fa5e5135afd0ee355ff5c29aa5fa31c6922e"
            },
            "downloads": -1,
            "filename": "transfocate-0.5.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "64b2ae4123e238ea17b6a4707d92881b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 180802,
            "upload_time": "2024-08-23T00:24:09",
            "upload_time_iso_8601": "2024-08-23T00:24:09.517185Z",
            "url": "https://files.pythonhosted.org/packages/74/5a/6974a0af95fdbecb903ad6f04a5b8856f3fce9f6c092fe4023c192762542/transfocate-0.5.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "810613e399d93bdd905d71e7898885e8d2a235b802576bbb8e8a5d95c36842ad",
                "md5": "9e53f765fe834739eed2dff2edbb014f",
                "sha256": "1868eea2c1fa74a7dcda5d6c115cb3575c69ad30b181d34fe3201b3b855fb2da"
            },
            "downloads": -1,
            "filename": "transfocate-0.5.9.tar.gz",
            "has_sig": false,
            "md5_digest": "9e53f765fe834739eed2dff2edbb014f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 186909,
            "upload_time": "2024-08-23T00:24:10",
            "upload_time_iso_8601": "2024-08-23T00:24:10.929203Z",
            "url": "https://files.pythonhosted.org/packages/81/06/13e399d93bdd905d71e7898885e8d2a235b802576bbb8e8a5d95c36842ad/transfocate-0.5.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-23 00:24:10",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "transfocate"
}
        
Elapsed time: 2.73304s