Getting Started with OMC3¶
Quick start¶
The omc3 package is Python 3.7+ compatible, but not yet deployed to PyPI. The best way to install is though python -m pip and VCS:
git clone https://github.com/pylhc/omc3
python -m pip install /path/to/omc3
Or simply from the online master branch, which is stable:
python -m pip install git+https://github.com/pylhc/omc3.git
After installing, codes can be run with either python -m omc3.SCRIPT --FLAG ARGUMENT or calling path to the .py file directly.
Functionality¶
Main Scripts¶
Main scripts to be executed lie in the /omc3 module directly. These include:
hole_in_one.pyto perform frequency analysis on turn by turn BPM data and infer optics (and more) for a given accelerator.madx_wrapper.pyto start aMAD-Xrun with a file or string as input.model_creator.pyto provide optics models required for optics analysis.run_kmod.pyto analyse data from K-modulation and return the measured optics functions.tbt_converter.pyto convert different turn by turn datatypes to sdds, and add noise.amplitude_detuning_analysis.pyto perform amp. det. analysis on optics data with tune correction.
Plotting Scripts¶
Plotting scripts for analysis outputs can be found in the /omc3/plotting submodule:
plot_spectrum.pyto generate plots from files generated by frequency analysis.plot_bbq.pyto generate plots from files generated by BBQ analysis.plot_amplitude_detuning.pyto generate plots from files generated by amplitude detuning analysis.plot_optics_measurements.pyto generate plots from files generated by optics_measurements.plot_tfs.pyall purpose tfs-file plotter.
Other Scripts¶
Other general utility scripts are in /omc3/scripts module:
update_nattune_in_linfile.pyto update the natural tune columns in the lin files by finding the highest peak in the spectrum in a given interval.write_madx_macros.pyto generateMAD-Xtracking macros with observation points from a twiss file.merge_kmod_results.pyto merge lsa_results files created by kmod, and add the luminosity imbalance if the 4 needed IP/Beam files combination are present.
A typical analysis workflow with omc3 is described in the next page.