Skip to main content

Automated Calculation of Transfocator Focusing Optics

Project description

transfocate

https://travis-ci.org/pcdshub/transfocate.svg?branch=master
  • 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:

$ 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:

>>> 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:

>>> 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:

>>> 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transfocate-0.5.9.tar.gz (186.9 kB view details)

Uploaded Source

Built Distribution

transfocate-0.5.9-py3-none-any.whl (180.8 kB view details)

Uploaded Python 3

File details

Details for the file transfocate-0.5.9.tar.gz.

File metadata

  • Download URL: transfocate-0.5.9.tar.gz
  • Upload date:
  • Size: 186.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for transfocate-0.5.9.tar.gz
Algorithm Hash digest
SHA256 1868eea2c1fa74a7dcda5d6c115cb3575c69ad30b181d34fe3201b3b855fb2da
MD5 9e53f765fe834739eed2dff2edbb014f
BLAKE2b-256 810613e399d93bdd905d71e7898885e8d2a235b802576bbb8e8a5d95c36842ad

See more details on using hashes here.

Provenance

File details

Details for the file transfocate-0.5.9-py3-none-any.whl.

File metadata

  • Download URL: transfocate-0.5.9-py3-none-any.whl
  • Upload date:
  • Size: 180.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for transfocate-0.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 4c64c0dd70c7f1238f0f7c42f1e8fa5e5135afd0ee355ff5c29aa5fa31c6922e
MD5 64b2ae4123e238ea17b6a4707d92881b
BLAKE2b-256 745a6974a0af95fdbecb903ad6f04a5b8856f3fce9f6c092fe4023c192762542

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page