Skip to content

Commit

Permalink
LSA knob to MAD-X script converter (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoubelet authored May 23, 2022
1 parent f3221fb commit 7fb7ae0
Show file tree
Hide file tree
Showing 12 changed files with 621 additions and 8 deletions.
237 changes: 231 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,232 @@
.idea/
.hypothesis*
.project
.pydevproject
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints/

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/*
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# File-based project format
*.iws

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### JupyterNotebooks template
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/

# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/
#
.ipynb_checkpoints
*/.ipynb_checkpoints/*

# VSCode
.vscode
/doc/_*
*__pycache__*
.vscode/

# Neovim
.nvimlog

# Sphinx build directory and sphinx-gallery generated documents
.doc_build
.doc_build/
.docs/gallery
.docs/gallery/
.docs/gen_modules
.docs/gen_modules/

doc_build/
pyproject.toml
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# pylhc Changelog

## Version 0.7.0

Added `LSA` knobs to `MAD-X` conversion capability: given LSA knobs and the optics they apply to, creates `.madx` files that will reproduce the knobs in simulation.

## Version 0.6.2

Added a flag to the `info` functionality of `pylhc.kickgroups` to display a copy-pastable list of kick files for the GUI to load at once.
Expand Down
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def about_package(init_posixpath: pathlib.Path) -> dict:
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"tfs-pandas": ("https://pylhc.github.io/tfs/", None),
"tfs": ("https://pylhc.github.io/tfs/", None),
"generic_parser": ("https://pylhc.github.io/generic_parser/", None),
"omc3": ("https://pylhc.github.io/omc3/", None),
"cpymad": ("https://hibtc.github.io/cpymad/", None),
}
5 changes: 5 additions & 0 deletions doc/entrypoints/lsa_to_madx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LSA Knobs to MAD-X Expressions Converter
****************************************

.. automodule:: pylhc.lsa_to_madx
:members:
2 changes: 1 addition & 1 deletion pylhc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__title__ = "pylhc"
__description__ = "An accelerator physics script collection for the OMC team at CERN."
__url__ = "https://github.com/pylhc/pylhc"
__version__ = "0.6.2"
__version__ = "0.7.0"
__author__ = "pylhc"
__author_email__ = "pylhc@github.com"
__license__ = "MIT"
Expand Down
Loading

0 comments on commit 7fb7ae0

Please sign in to comment.