Skip to main content

tool for loading any MADX table files like twiss tables etc..

Project description

Python Twiss Tool


This tool can be used to read any table produced by MAD-X, not only twiss tables.


Installation

In a terminal run

pip install twisstool

Usage

from twisstool import twiss

tw = twiss('madxTableFile.txt')

The created instance of twiss named tw contains (at least) two attributes:

  • header containing a list of the columns found in the file
  • data containing a pandas dataframe containing the data found in the columns
  • any global parameter found in the header

If one would want to plot $\beta_x$ as a function of $s$, one could do:
import matplotlib.pyplot as plt

plt.plot(tw.data['S'], tw.data['BETX'])
plt.show()

Or you can use the following:

tw.plot('S', 'BETX')

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

twisstool-1.20-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file twisstool-1.20-py3-none-any.whl.

File metadata

  • Download URL: twisstool-1.20-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.14.2 setuptools/40.7.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

File hashes

Hashes for twisstool-1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 17ab034c8b656a028ece6315200c66a4d7436262d40c20b09d2cd15c4e4fdfe8
MD5 0a0e1286bb18b8ca590119bb0cc82563
BLAKE2b-256 e60fc0569d5a7f6bbf78b191cd2a2605def37c375d6444e31146c997d582c7c7

See more details on using hashes here.

Supported by

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