summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-20 08:26:24 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-20 08:26:24 +0000
commite00f228e5bc9782e24140caf2755a12324324cf9 (patch)
tree624b1eb7a275440ce3803590d41d8eeaa8b8463b
parentbd2510d4874a1e4658f452d35cd7dea3decd8d06 (diff)
automatic import of python-omc3openeuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-omc3.spec345
-rw-r--r--sources1
3 files changed, 347 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..046c303 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/omc3-0.11.1.tar.gz
diff --git a/python-omc3.spec b/python-omc3.spec
new file mode 100644
index 0000000..8a61589
--- /dev/null
+++ b/python-omc3.spec
@@ -0,0 +1,345 @@
+%global _empty_manifest_terminate_build 0
+Name: python-omc3
+Version: 0.11.1
+Release: 1
+Summary: An accelerator physics tools package for the OMC team at CERN.
+License: MIT
+URL: https://github.com/pylhc/omc3
+Source0: https://mirrors.aliyun.com/pypi/web/packages/04/a6/2147fcea72855ca65ddca208f25f8903969ab2ba9a7cc3f016a38c94861e/omc3-0.11.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-matplotlib
+Requires: python3-Pillow
+Requires: python3-numpy
+Requires: python3-pandas
+Requires: python3-scipy
+Requires: python3-scikit-learn
+Requires: python3-tfs-pandas
+Requires: python3-generic-parser
+Requires: python3-sdds
+Requires: python3-h5py
+Requires: python3-tables
+Requires: python3-uncertainties
+Requires: python3-optics-functions
+Requires: python3-turn-by-turn
+Requires: python3-requests
+Requires: python3-jpype1
+Requires: python3-pytimber
+Requires: python3-pylogbook
+Requires: python3-kerberos
+Requires: python3-pymupdf
+Requires: python3-qtpy
+Requires: python3-pytest
+Requires: python3-pytest-cov
+Requires: python3-pytest-timeout
+Requires: python3-hypothesis
+Requires: python3-attrs
+Requires: python3-sphinx
+Requires: python3-sphinx-rtd-theme
+Requires: python3-jpype1
+Requires: python3-pytimber
+Requires: python3-pylogbook
+Requires: python3-kerberos
+Requires: python3-sphinx
+Requires: python3-sphinx-rtd-theme
+Requires: python3-pymupdf
+Requires: python3-qtpy
+Requires: python3-pytest
+Requires: python3-pytest-cov
+Requires: python3-pytest-timeout
+Requires: python3-hypothesis
+Requires: python3-jpype1
+Requires: python3-attrs
+
+%description
+# <img src="https://raw.githubusercontent.com/pylhc/pylhc.github.io/master/docs/assets/logos/OMC_logo.svg" height="28"> 3
+
+[![Tests](https://github.com/pylhc/omc3/actions/workflows/coverage.yml/badge.svg?branch=master)](https://github.com/pylhc/omc3/actions/workflows/coverage.yml)
+[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/pylhc/omc3.svg?style=popout)](https://codeclimate.com/github/pylhc/omc3)
+[![Code Climate maintainability (percentage)](https://img.shields.io/codeclimate/maintainability-percentage/pylhc/omc3.svg?style=popout)](https://codeclimate.com/github/pylhc/omc3)
+[![GitHub last commit](https://img.shields.io/github/last-commit/pylhc/omc3.svg?style=popout)](https://github.com/pylhc/omc3/)
+[![GitHub release](https://img.shields.io/github/release/pylhc/omc3.svg?style=popout)](https://github.com/pylhc/omc3/)
+[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5705625.svg)](https://doi.org/10.5281/zenodo.5705625)
+
+This is the python-tool package of the Optics Measurements and Corrections team (OMC) at CERN.
+
+Most of the codes are generic and not limited to CERN accelerators, and the package can easily be used for your favorite circular accelerator.
+To see how to adapt this for your machine, see our [documentation](https://pylhc.github.io/omc3/), `Model` section.
+To contribute, see [our guidelines](https://pylhc.github.io/packages/development/contributing/) on the OMC website.
+
+## Documentation
+
+- Autogenerated docs via `Sphinx` can be found at <https://pylhc.github.io/omc3/>.
+- General documentation of the OMC Team is located at <https://pylhc.github.io/>.
+
+## Installing
+
+Installation is easily done via `pip`:
+
+```
+pip install omc3
+```
+
+
+For development purposes, we recommend creating a new virtual environment and installing from VCS in editable mode with all extra dependencies (`cern` for packages only available in the CERN GPN, `test` for `pytest` and relevant plugins, and `doc` for packages needed to build documentation)
+```bash
+git clone https://github.com/pylhc/omc3
+pip install --editable "omc3[all]"
+```
+
+Codes can then be run with either `python -m omc3.SCRIPT --FLAG ARGUMENT` or calling the `.py` file directly.
+
+## Functionality
+
+#### Main Scripts
+
+Main scripts to be executed lie in the [`/omc3`](omc3) directory. These include:
+- `global_correction.py` to calculate corrections from measurement files.
+- `hole_in_one.py` to perform frequency analysis on turn by turn BPM data and infer optics (and more) for a given accelerator.
+- `madx_wrapper.py` to start a `MAD-X` run with a file or string as input.
+- `model_creator.py` to generate optics models required for optics analysis.
+- `response_creator.py` to provide correction response files.
+- `run_kmod.py` to analyze data from K-modulation and return the measured optics functions.
+- `tbt_converter.py` to convert different turn by turn data types to `SDDS`, potentially adding noise.
+- `amplitude_detuning_analysis.py` to perform amp. det. analysis on optics data with tune correction.
+- `knob_extractor.py` to extract from `NXCALS` the value of given knobs in the machine at a given time.
+
+#### Plotting Scripts
+
+Plotting scripts for analysis outputs can be found in [`/omc3/plotting`](omc3/plotting):
+- `plot_spectrum.py` to generate plots from files generated by frequency analysis.
+- `plot_bbq.py` to generate plots from files generated by BBQ analysis.
+- `plot_amplitude_detuning.py` to generate plots from files generated by amplitude detuning analysis.
+- `plot_optics_measurements.py` to generate plots from files generated by optics_measurements.
+- `plot_tfs.py` all-purpose tfs-file plotter.
+
+#### Other Scripts
+
+Other general utility scripts are in [`/omc3/scripts`](omc3/scripts):
+- `update_nattune_in_linfile.py` to update the natural tune columns in the lin files by finding the highest peak in the spectrum in a given interval.
+- `write_madx_macros.py` to generate `MAD-X` tracking macros with observation points from a TWISS file.
+- `merge_kmod_results.py` to merge LSA results files created by kmod, and add the luminosity imbalance if the 4 needed IP/Beam files combination are present.
+- `fake_measurement_from_model.py` to create a fake measurement based on a model TWISS file.
+- `betabeatsrc_output_converter.py` to convert outputs from our old codes to `omc3`'s new standardized format.
+- `linfile_clean.py` to automatically clean given columns in lin files.
+
+Example use for these scripts can be found in the [`tests`](tests) files.
+Documentation including relevant flags and parameters can be found at <https://pylhc.github.io/omc3/>.
+
+## License
+
+This project is licensed under the `MIT License` - see the [LICENSE](LICENSE) file for details.
+
+
+%package -n python3-omc3
+Summary: An accelerator physics tools package for the OMC team at CERN.
+Provides: python-omc3
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-omc3
+# <img src="https://raw.githubusercontent.com/pylhc/pylhc.github.io/master/docs/assets/logos/OMC_logo.svg" height="28"> 3
+
+[![Tests](https://github.com/pylhc/omc3/actions/workflows/coverage.yml/badge.svg?branch=master)](https://github.com/pylhc/omc3/actions/workflows/coverage.yml)
+[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/pylhc/omc3.svg?style=popout)](https://codeclimate.com/github/pylhc/omc3)
+[![Code Climate maintainability (percentage)](https://img.shields.io/codeclimate/maintainability-percentage/pylhc/omc3.svg?style=popout)](https://codeclimate.com/github/pylhc/omc3)
+[![GitHub last commit](https://img.shields.io/github/last-commit/pylhc/omc3.svg?style=popout)](https://github.com/pylhc/omc3/)
+[![GitHub release](https://img.shields.io/github/release/pylhc/omc3.svg?style=popout)](https://github.com/pylhc/omc3/)
+[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5705625.svg)](https://doi.org/10.5281/zenodo.5705625)
+
+This is the python-tool package of the Optics Measurements and Corrections team (OMC) at CERN.
+
+Most of the codes are generic and not limited to CERN accelerators, and the package can easily be used for your favorite circular accelerator.
+To see how to adapt this for your machine, see our [documentation](https://pylhc.github.io/omc3/), `Model` section.
+To contribute, see [our guidelines](https://pylhc.github.io/packages/development/contributing/) on the OMC website.
+
+## Documentation
+
+- Autogenerated docs via `Sphinx` can be found at <https://pylhc.github.io/omc3/>.
+- General documentation of the OMC Team is located at <https://pylhc.github.io/>.
+
+## Installing
+
+Installation is easily done via `pip`:
+
+```
+pip install omc3
+```
+
+
+For development purposes, we recommend creating a new virtual environment and installing from VCS in editable mode with all extra dependencies (`cern` for packages only available in the CERN GPN, `test` for `pytest` and relevant plugins, and `doc` for packages needed to build documentation)
+```bash
+git clone https://github.com/pylhc/omc3
+pip install --editable "omc3[all]"
+```
+
+Codes can then be run with either `python -m omc3.SCRIPT --FLAG ARGUMENT` or calling the `.py` file directly.
+
+## Functionality
+
+#### Main Scripts
+
+Main scripts to be executed lie in the [`/omc3`](omc3) directory. These include:
+- `global_correction.py` to calculate corrections from measurement files.
+- `hole_in_one.py` to perform frequency analysis on turn by turn BPM data and infer optics (and more) for a given accelerator.
+- `madx_wrapper.py` to start a `MAD-X` run with a file or string as input.
+- `model_creator.py` to generate optics models required for optics analysis.
+- `response_creator.py` to provide correction response files.
+- `run_kmod.py` to analyze data from K-modulation and return the measured optics functions.
+- `tbt_converter.py` to convert different turn by turn data types to `SDDS`, potentially adding noise.
+- `amplitude_detuning_analysis.py` to perform amp. det. analysis on optics data with tune correction.
+- `knob_extractor.py` to extract from `NXCALS` the value of given knobs in the machine at a given time.
+
+#### Plotting Scripts
+
+Plotting scripts for analysis outputs can be found in [`/omc3/plotting`](omc3/plotting):
+- `plot_spectrum.py` to generate plots from files generated by frequency analysis.
+- `plot_bbq.py` to generate plots from files generated by BBQ analysis.
+- `plot_amplitude_detuning.py` to generate plots from files generated by amplitude detuning analysis.
+- `plot_optics_measurements.py` to generate plots from files generated by optics_measurements.
+- `plot_tfs.py` all-purpose tfs-file plotter.
+
+#### Other Scripts
+
+Other general utility scripts are in [`/omc3/scripts`](omc3/scripts):
+- `update_nattune_in_linfile.py` to update the natural tune columns in the lin files by finding the highest peak in the spectrum in a given interval.
+- `write_madx_macros.py` to generate `MAD-X` tracking macros with observation points from a TWISS file.
+- `merge_kmod_results.py` to merge LSA results files created by kmod, and add the luminosity imbalance if the 4 needed IP/Beam files combination are present.
+- `fake_measurement_from_model.py` to create a fake measurement based on a model TWISS file.
+- `betabeatsrc_output_converter.py` to convert outputs from our old codes to `omc3`'s new standardized format.
+- `linfile_clean.py` to automatically clean given columns in lin files.
+
+Example use for these scripts can be found in the [`tests`](tests) files.
+Documentation including relevant flags and parameters can be found at <https://pylhc.github.io/omc3/>.
+
+## License
+
+This project is licensed under the `MIT License` - see the [LICENSE](LICENSE) file for details.
+
+
+%package help
+Summary: Development documents and examples for omc3
+Provides: python3-omc3-doc
+%description help
+# <img src="https://raw.githubusercontent.com/pylhc/pylhc.github.io/master/docs/assets/logos/OMC_logo.svg" height="28"> 3
+
+[![Tests](https://github.com/pylhc/omc3/actions/workflows/coverage.yml/badge.svg?branch=master)](https://github.com/pylhc/omc3/actions/workflows/coverage.yml)
+[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/pylhc/omc3.svg?style=popout)](https://codeclimate.com/github/pylhc/omc3)
+[![Code Climate maintainability (percentage)](https://img.shields.io/codeclimate/maintainability-percentage/pylhc/omc3.svg?style=popout)](https://codeclimate.com/github/pylhc/omc3)
+[![GitHub last commit](https://img.shields.io/github/last-commit/pylhc/omc3.svg?style=popout)](https://github.com/pylhc/omc3/)
+[![GitHub release](https://img.shields.io/github/release/pylhc/omc3.svg?style=popout)](https://github.com/pylhc/omc3/)
+[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5705625.svg)](https://doi.org/10.5281/zenodo.5705625)
+
+This is the python-tool package of the Optics Measurements and Corrections team (OMC) at CERN.
+
+Most of the codes are generic and not limited to CERN accelerators, and the package can easily be used for your favorite circular accelerator.
+To see how to adapt this for your machine, see our [documentation](https://pylhc.github.io/omc3/), `Model` section.
+To contribute, see [our guidelines](https://pylhc.github.io/packages/development/contributing/) on the OMC website.
+
+## Documentation
+
+- Autogenerated docs via `Sphinx` can be found at <https://pylhc.github.io/omc3/>.
+- General documentation of the OMC Team is located at <https://pylhc.github.io/>.
+
+## Installing
+
+Installation is easily done via `pip`:
+
+```
+pip install omc3
+```
+
+
+For development purposes, we recommend creating a new virtual environment and installing from VCS in editable mode with all extra dependencies (`cern` for packages only available in the CERN GPN, `test` for `pytest` and relevant plugins, and `doc` for packages needed to build documentation)
+```bash
+git clone https://github.com/pylhc/omc3
+pip install --editable "omc3[all]"
+```
+
+Codes can then be run with either `python -m omc3.SCRIPT --FLAG ARGUMENT` or calling the `.py` file directly.
+
+## Functionality
+
+#### Main Scripts
+
+Main scripts to be executed lie in the [`/omc3`](omc3) directory. These include:
+- `global_correction.py` to calculate corrections from measurement files.
+- `hole_in_one.py` to perform frequency analysis on turn by turn BPM data and infer optics (and more) for a given accelerator.
+- `madx_wrapper.py` to start a `MAD-X` run with a file or string as input.
+- `model_creator.py` to generate optics models required for optics analysis.
+- `response_creator.py` to provide correction response files.
+- `run_kmod.py` to analyze data from K-modulation and return the measured optics functions.
+- `tbt_converter.py` to convert different turn by turn data types to `SDDS`, potentially adding noise.
+- `amplitude_detuning_analysis.py` to perform amp. det. analysis on optics data with tune correction.
+- `knob_extractor.py` to extract from `NXCALS` the value of given knobs in the machine at a given time.
+
+#### Plotting Scripts
+
+Plotting scripts for analysis outputs can be found in [`/omc3/plotting`](omc3/plotting):
+- `plot_spectrum.py` to generate plots from files generated by frequency analysis.
+- `plot_bbq.py` to generate plots from files generated by BBQ analysis.
+- `plot_amplitude_detuning.py` to generate plots from files generated by amplitude detuning analysis.
+- `plot_optics_measurements.py` to generate plots from files generated by optics_measurements.
+- `plot_tfs.py` all-purpose tfs-file plotter.
+
+#### Other Scripts
+
+Other general utility scripts are in [`/omc3/scripts`](omc3/scripts):
+- `update_nattune_in_linfile.py` to update the natural tune columns in the lin files by finding the highest peak in the spectrum in a given interval.
+- `write_madx_macros.py` to generate `MAD-X` tracking macros with observation points from a TWISS file.
+- `merge_kmod_results.py` to merge LSA results files created by kmod, and add the luminosity imbalance if the 4 needed IP/Beam files combination are present.
+- `fake_measurement_from_model.py` to create a fake measurement based on a model TWISS file.
+- `betabeatsrc_output_converter.py` to convert outputs from our old codes to `omc3`'s new standardized format.
+- `linfile_clean.py` to automatically clean given columns in lin files.
+
+Example use for these scripts can be found in the [`tests`](tests) files.
+Documentation including relevant flags and parameters can be found at <https://pylhc.github.io/omc3/>.
+
+## License
+
+This project is licensed under the `MIT License` - see the [LICENSE](LICENSE) file for details.
+
+
+%prep
+%autosetup -n omc3-0.11.1
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-omc3 -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.11.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..f6e5c10
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+3f3b600e8c6ab206687d49a610a0a66c omc3-0.11.1.tar.gz