# mad8-pandas
loading mad8 output with pandas
```
import pand8
df = pand8.read("TWISS_CL_T20.txt") # For example
# pandas stuff 😇
# Other bits...
# Fixing strangeness:
assert df.iloc[0].E == 0.0 # Wrong and annoying.
df = pand8.fix_initial_row_energy(df)
assert df.iloc[0].E != 0. # No longer wrong or annoying.
# Adding a few extra useful columns
import matplotlib.pyplot as plt
df = pand8.append_beam_size_columns(df, emitnx=1.4e-6, emitny=1.4e-6, espread_norm=1e-4)
df = pand8.append_twiss_gamma(df)
df.plot("SUML", "SIGMAX")
df.plot("SUML", "GAMX")
plt.show()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/st-walker/mad8-pandas",
"name": "mad8-pandas",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "mad8 pandas twiss",
"author": "Stuart Walker",
"author_email": "stuart.derek.walker@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/46/84/4059d754ab3d7827c8bb28ee1e711bf49a9ee2a10e49d9353efabd10f350/mad8-pandas-1.1.1.tar.gz",
"platform": null,
"description": "# mad8-pandas\nloading mad8 output with pandas\n\n```\nimport pand8\ndf = pand8.read(\"TWISS_CL_T20.txt\") # For example\n# pandas stuff \ud83d\ude07\n\n# Other bits...\n# Fixing strangeness:\nassert df.iloc[0].E == 0.0 # Wrong and annoying.\ndf = pand8.fix_initial_row_energy(df)\nassert df.iloc[0].E != 0. # No longer wrong or annoying.\n\n\n# Adding a few extra useful columns\nimport matplotlib.pyplot as plt\ndf = pand8.append_beam_size_columns(df, emitnx=1.4e-6, emitny=1.4e-6, espread_norm=1e-4)\n\ndf = pand8.append_twiss_gamma(df)\n\ndf.plot(\"SUML\", \"SIGMAX\")\ndf.plot(\"SUML\", \"GAMX\")\n\nplt.show()\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "load mad8 output with pandas",
"version": "1.1.1",
"project_urls": {
"Homepage": "https://github.com/st-walker/mad8-pandas"
},
"split_keywords": [
"mad8",
"pandas",
"twiss"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2091c971ec39afa923fa74681c44a2e7070fc661dcb7f63566e791c98bc91062",
"md5": "f2badcd62aa94f4ec934e94e12ae2325",
"sha256": "ad46f8b087f05b108c557d8db494f2dab740883032d1a6f5b26fb3a642c66741"
},
"downloads": -1,
"filename": "mad8_pandas-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f2badcd62aa94f4ec934e94e12ae2325",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6772,
"upload_time": "2023-07-16T13:12:41",
"upload_time_iso_8601": "2023-07-16T13:12:41.201258Z",
"url": "https://files.pythonhosted.org/packages/20/91/c971ec39afa923fa74681c44a2e7070fc661dcb7f63566e791c98bc91062/mad8_pandas-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "46844059d754ab3d7827c8bb28ee1e711bf49a9ee2a10e49d9353efabd10f350",
"md5": "c8b876a945c66b82b2b25e7335f93a55",
"sha256": "280ead02a4c6d9c623dc078d2696dde3e30b9d3ff7ee22021baf508be6a5ed5c"
},
"downloads": -1,
"filename": "mad8-pandas-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "c8b876a945c66b82b2b25e7335f93a55",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7599,
"upload_time": "2023-07-16T13:12:42",
"upload_time_iso_8601": "2023-07-16T13:12:42.911630Z",
"url": "https://files.pythonhosted.org/packages/46/84/4059d754ab3d7827c8bb28ee1e711bf49a9ee2a10e49d9353efabd10f350/mad8-pandas-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-16 13:12:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "st-walker",
"github_project": "mad8-pandas",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mad8-pandas"
}