diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 05:56:36 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 05:56:36 +0000 |
commit | 8e6c7098ac0e85e4d188943e486186e3d7921ed2 (patch) | |
tree | 8d5f7acf78d12428ca3b5c913f9cfc52e7b260b7 /python-madgui.spec | |
parent | 5157edf0624165845a475a92346c2970e35e519f (diff) |
automatic import of python-madguiopeneuler20.03
Diffstat (limited to 'python-madgui.spec')
-rw-r--r-- | python-madgui.spec | 1931 |
1 files changed, 1931 insertions, 0 deletions
diff --git a/python-madgui.spec b/python-madgui.spec new file mode 100644 index 0000000..b2a96cd --- /dev/null +++ b/python-madgui.spec @@ -0,0 +1,1931 @@ +%global _empty_manifest_terminate_build 0 +Name: python-madgui +Version: 20.10.0 +Release: 1 +Summary: GUI for accelerator simulations using MAD-X. +License: GPLv3+ +URL: https://github.com/hibtc/madgui +Source0: https://mirrors.aliyun.com/pypi/web/packages/eb/31/576dafc106307cbfcc7d41b7cde2925057386b38d178f84470c62765804f/madgui-20.10.0.tar.gz +BuildArch: noarch + +Requires: python3-cpymad +Requires: python3-docopt +Requires: python3-matplotlib +Requires: python3-numpy +Requires: python3-scipy +Requires: python3-PyYAML +Requires: python3-PyQt5 +Requires: python3-Pint +Requires: python3-docutils +Requires: python3-importlib-resources +Requires: python3-pyqtconsole +Requires: python3-jedi +Requires: python3-PyOpenGL +Requires: python3-sphinx + +%description +madgui is a Qt5 python GUI for interactive accelerator simulations using +MAD-X_ via cpymad_. It currently runs on python 3.4 and above, but higher +python versions may be required in the near future. +Installation +~~~~~~~~~~~~ + pip install madgui +Usage +~~~~~ +Now, you should be able to start madgui with the command:: + madgui +Optionally, madgui can take a filename for a madx/model file:: + madgui /path/to/model.madx +Note that madgui is currently only suited for relatively small sequences, on +the scale of few hundred elements at the most. +Configuration +~~~~~~~~~~~~~ +The application loads a YAML config file ``madgui.yml`` in the current +directory or the user's home directory. +Example file: + model_path: ../hit_models + session_file: madgui.session.yml + online_control: + connect: true + backend: 'hit_acs.plugin:TestACS' + onload: | + code to execute on startup +Development guidelines +~~~~~~~~~~~~~~~~~~~~~~ +See `Developer's Guide`_. +Copying +~~~~~~~ +Copyright 2016-2019 HIT Betriebs GmbH +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +For a full text version of the license, see ``COPYING.GPLv3.txt``. +CHANGELOG +~~~~~~~~~ +20.10.0 +~~~~~~~ +Date: 15.10.2020 +- Add Optic Variation Method for orbit flattening +- Add Sphinx V4.2.4 as default for documentation +20.7.0 +~~~~~~ +Date: 28.07.2020 +- Change Pyqtconsole v1.2.1 +20.6.0 +~~~~~~ +Date: 03.06.2020 +- Fix bugs in optic variation method +- Downgrade PyQt Version to 5.12.3 +20.4.2 +~~~~~~ +Date: 25.04.2020 +- Update the User Guide. Work in progress +- Add dynamical color to snapshots +20.4.1 +~~~~~~ +Date: 22.04.2020 +- Add constrain to the match feature. If the residual is too high, then the + optics are not changed +20.4.0 +~~~~~~ +Date: 08.04.2020 +- Add execute button to match widget +- Downgrade pyqtconsole to 1.1.3 +- Add sample_model dependency +20.1.0 +~~~~~~ +Date: 25.01.2020 +- revisit auto load model feature +- auto loading was subtituted by a button in the read strengths dialog +- updating pyqtconsole dependency to 1.1.5 +19.8.0 +~~~~~~ +Date: 19.08.2019 +- add auto load model feature +19.6.3 +~~~~~~ +Date: 06.06.2019 +- use the ORM orbit correction method by default +- add tooltips for the elementinfo tabs +19.6.2 +~~~~~~ +Date: 05.06.2019 +- fix exception in GLWidget.closeEvent +- explicitly request OpenGL version to improve chances of getting a 3.0 context +- request OpenGL 3.2 core profile (disallow deprecated features) to avoid + running into backward incompatibilities later on +19.6.1 +~~~~~~ +Date: 05.06.2019 +- fix menuitem "Interpolation points" not updating the plot +- fix monitor indicators not being updated after de-/selecting monitors +- fix 3D survey widget by adding missing shaders to the installation +- log OpenGL version and show a nicer error message for incompatible version +- fix incorrect display of element indicators after sequence reversal +- cpymad 1.2.1 fixes deadlock that occurs when clicking "About MAD-X" menuitem + in application context without stdin (e.g. windows GUI) +19.6.0 +~~~~~~ +Date: 02.06.2019 +- fix exception when using element info after opening new model +- deal with issues of lingering signal handlers of the element Selection + after opening new model (by voiding the selection) +- decrease alpha for element indicators +19.5.5 +~~~~~~ +Date: 27.05.2019 +- fix drawing elements only once that occur multiple times in sequence +- add more documentation +- split twiss widget code from plotting module to allow using the plot + functions externally without importing GUI code +3D survey widget: + - fix bug in diffuse lighting direction calculations + - show thin elements as discs + - show more element types, colorful crowd + - fix not drawing the initial model + - scale number of points on circles with radius +19.5.4 +~~~~~~ +Date: 16.05.2019 +- add true 3D OpenGL based survey widget (WIP) +- fix exception in curvemanager tool when clicking snapshot button +- fix TypeError when importing a table without a text column +- show warning when entering invalid number format (instead of silently + ignoring the invalid input) +- show warnings when ignoring invalid knob strings +19.5.3 +~~~~~~ +Date: 13.05.2019 +- allow negative values in step field (ORM measurement dialog) +- fix AttributeError if using model without undo stack +- fix ValueError for "Add" button in match dialog +- separate "Write strengths" menu item further from "Read strengths" +- add hotkey for "Read strengths" +- find models in breadth-first manner, not depth first +- fix bug that caused incorrect update when changing plot, especially from + plots with many curves to plots with less curves +19.5.2 +~~~~~~ +Date: 11.05.2019 +- add a selection of survey/sectormap plots +- show legend outside graph by default in shared plot mode +19.5.1 +~~~~~~ +Date: 11.05.2019 +- show UndoStack.macro invocations in the logging area +- add menuitem to reverse current sequence inplace (experimental) +- show DRIFT attributes as inherited +- start usrguide (very basic atm), document QT_SCALE_FACTOR +- add toolbar item to show/hide BPMs +- add Backend.read_params method to read all/multiple params + (requires hit_acs>=19.5.0) +- export full parameter dump in orm measurement procedure +- update to cpymad 1.2.0, MAD-X version 5.05.00 +19.5.0 +~~~~~~ +Date: 07.05.2019 +- fix a TypeError when changing the model +- export time along with BPM values in ORM measurement dialog +19.4.4 +~~~~~~ +Date: 25.04.2019 +- fix several minor exceptions that can occur in corrector dialog under rare + circumstances +19.4.3 +~~~~~~ +Date: 25.04.2019 +- fix RecursionError in ``UndoStack.macro()``, that occurs e.g. when using + the MATCH/sectormap methods of corrector dialog +- fix potential NameError in ``UndoStack.rollback()`` +- fix unwanted signal connections that can lead to TypeErrors and multiple + signal handler executions (e.g. triggering the EditConfigDialog twice) +19.4.2 +~~~~~~ +Date: 24.04.2019 +- fix log widget to have monospace on windows +- fix exception when setting max log size via menu +- fix exception in corrector dialog when using MATCH or sectormap methods: + "TypeError: macro() missing 1 requried positional argument" +- fix TypeError in corrector dialog when changing config (combo box): + "TypeError: itemText(self, int): argument 1 has unexpected type 'str'" +19.4.1 +~~~~~~ +Date: 13.04.2019 +- fix empty log after changing log level +- improve performance of log widget even after long use (#35) +- add menu and config entry for setting a maximum log length +- fix log entries without specified color receiving the color from the + previous entry +- improve non-GUI mode app support +- make it possible to show the mainwindow on top of other windows, by turning + dialogs into top-level windows +- simplify Dialog instanciation and internal logic +- fix the "Calibrate" button in "orbit correction -> measured response" + widget. It was missing the implementation after an earlier refactoring +- implement notifyEvent in terms of eventFilter. This makes it possible to + these event notifications, and therefore prevent bugs due to calling dead + objects. +- turn shell from dockwidget into a normal dialog +- allow opening multiple console windows at a time +- replace qtconsole by the faster and more lightweight pyqtconsole +- this fixes an "AttributeError" when calling "exit()" +- also fixes "Execution aborted" error that prevents further statements from + being executed in the console after any exception has been raised in a + previous command +- work on improving documentation and cross-referencing +- use pint 0.9 +19.4.0 +~~~~~~ +Date: 01.04.2019 +- drop python 3.5 compatibility, require at least 3.6 +- fix exception when trying to show plots if loading a madx file that includes + a ``SELECT, flag=TWISS`` command +- fix weird matplotlib offset behaviour when showing a nearly constant quantity + (by plotting an invisible horizontal line at y=0) +- add menuitem to redo twiss and refresh plot +- add menuitem to set number of interpolation points +- add config entry for number of interpolation points +- fix some warnings/errors in documentation +- replace QUndoStack by our own implementation to simplify using Model in + non-GUI contexts +- remove QUndoView for now (limitation due to replacing QUndoStack) +- simplify setup.py using static metadata and rework travis scripts +19.3.3 +~~~~~~ +Date: 21.03.2019 +- install as gui script +- fix ``ValueError: fallback required but not specified`` in pyqtconsole due + to missing stdout when called as gui script +19.3.2 +~~~~~~ +Date: 21.03.2019 +- fix TypeError: set_draggable() missing 1 required positional argument + (in shared plot mode) +- add units in curve y labels +- change some quantity labels +- separate function to edit model parameters, for use in plugins etc +19.3.1 +~~~~~~ +Date: 12.03.2019 +- add missing file ``twissfigure.yml`` +- add ``import_path`` config entry for adding plugin folders to ``sys.path`` +- expand '~' and environment variable in config: ``run_path``, ``model_path``, + ``import_path``, ``session_file`` +19.3.0 +~~~~~~ +Date: 12.03.2019 +- drop python 3.4 support +- remove the "by delta" checkbox in orbit correction dialogs, always use the + measured monitor position if possible +- depend on cpymad 1.1.0 +- auto-update plotted monitor markers +- fix Ctrl+P closing mainwindow +- handle menu hotkeys within all application windows +- add menu options and hotkeys to increase or decrease font size +- remember font size setting +- some bugfixes +- remove obsolute "Update" buttons from diagnostic dialogs +internal: +- move ORM analysis code its own independent package +- add PyQt5 as regular dependency (can automatically installed via pip) +- add tests on py35 +- refactor modules in ``madgui.plot`` +- remove context-managing ability from ``Session`` +- replace ``pyqtSignal`` by our own lightweight solution (in preparation for + letting models etc be instanciated without GUI) +- not subclassing ``cpymad.madx.Madx`` anymore, moved functionality directly + to cpymad +- refactor/simplify caching classes +- make ``twissfigure`` module more independent from mainwindow/session and + simplify plotting API (standalone functions that can be used without madgui) +- refactor scene graphs, prepare for fully consistent management of all scene + elements via curvemanager dialog +- optimize performance when updating plot +- fix error while building the documentation +- start a developer's guide documentation section +- introduce a lightweight history type to manage history in several components +- use PyQt5 imports directly, remove the ``madgui.qt`` compatibilty module +- split up the correction dialogs into components, in preparation for a great + unification +19.01.0 +~~~~~~~ +Date: 19.01.2019 +- fix SyntaxError in py3.4 +- internal development of ORM analysis utilities +- add method to model to reverse sequence inplace +- generalize and slightly simplify the orbit fitting API +- treat only "direct" variables (i.e. not deferred expressions) as knobs +- search for knobs recursively through deferred expressions +- parse unit strings from ACS backend on the fly +- adapt to the renaming hit_csys -> hit_acs +- adapt to changes in hit_acs 19.01.0 +- basic version of measured response method for empirical orbit correction +- install a common BeamSampler that monitors and publishes new readouts +18.12.0 +~~~~~~~ +Date: 11.12.2018 +Updated dependencies: +- update to cpymad ``1.0.10`` +- new dependency on scipy! +Bug fixes: +- fix a TypeError in beam tab widget +- fix bug that some widgets are shown only on second click +- explicitly specify the correct datatype for most editable tables +- fix exceptions in some import routines +- fix exception when starting without config file +- fix early exception on some systems due to encoding name +Misc: +- display sectormap and beam matrix as matrix-like table +- improve lookup logic for beam matrix +- remove the "Expression" column in favor of a composite edit widget +- some internal API changes +- add fitting API in ``madgui.util.fit`` +- allow loading table files with text column +- infer missing ``S`` from ``name`` column loading table files +- autogenerate apidoc files during travis build +- update travis config for phased out support of container based infrastructure +- mark build as dev version by default (travis) +- recognize that consts cannot be used as knobs +- move load_yaml function to ``madgui.util.yaml`` +- add simpler API for back-fitting orbit +- never require betx, bety when backtracking +- development on the ORM utility API +18.10.3 +~~~~~~~ +Date: 31.10.2018 +bugfixes: +- fix undo feature not working because of using the wrong stack +- fix exception in Model.twiss when a table is specified +ORM analysis: +- share get_orm() implementation with orbit correction +- deduplications, several code improvements and simplifications +- use base_orbit to backtrack initial conditions +- add plot functions to the analysis script +- better output +- add ability to fit X and Y independently +- compacter ealign notation in undocumented spec file +18.10.2 +~~~~~~~ +Date: 25.10.2018 +bugfixes: +- fix for missing setObsolete on Qt<5.9 (was previously fixed only partially) +- fix empty list of optic elements in output file +- fix beamoptikdll not initiating device download due to flooding +- fix duplicate value bug in the readout logic +- decrease chance of race condition leading to inconsistent readouts +UX improvements: +- log to main logwindow as well +- increase logging verbosity during orbit response measurements +- flush file after each write +- vary steerers in sequence order +- avoid one redundant readout +- increase default steerer variation to 0.2 mrad +ORM analysis: +- handle missing ORM entries as zero +- restrict to used knobs +- fix empty steerers field in record file +- handle accumulated errors in ORM analysis +- add simple plotting script +18.10.1 +~~~~~~~ +Date: 20.10.2018 +- fix exception when opening matching dialog +- fix bad fit_range leading to bad initial conditions fit +- add safeguard for ``None`` offsets in corrector widgets +- restrict orbit correction to only X/Y constraints +- let user choose whether to fit the difference between measured and design + values or just fit the design value directly (this can be different in case + the backtrack does not describe the monitor values very good) +18.10.0 +~~~~~~~ +Date: 18.10.2018 +Now in calver_ (calendaric versioning) ``YY.MM.patch`` since this better fits +the nature of madgui development and is I believe more useful for end-users. +New features: +- add app icon as .ico file (for shortcuts etc) +- add orbit response matrix (ORM) based mode for orbit correction +- add even simpler mode that assumes orbit response matrix = sectormap +- add method selection to OVM dialog +- add dialog for recording orbit response matrix +- add script for generating test ORM recordings +- add script for analyzing ORM recordings +Improvements: +- can edit the steerer values before executing +- implement prev/next buttons in optic variation dialog +- allow multiple floor plan windows +- prevent annoying busy cursor due to MPL redraws +- turn on warnings for our own modules +- close and wait for the MAD-X process properly +- improve update of steerer/monitor display tables +- don't automatically create logfile for every MAD-X session anymore +- make MAD-X less verbose: command echo off! +Bug fixes: +- fix ``AttributeError`` when clicking ``Apply`` in optic variation dialog +- fix ``NameError`` when opening curve manager widget +- fix missing reaction to changing selected config in OVM dialog +- fix missing update before recording in OVM automatic mode +- fix ``AttributeError`` after editing config in MGM dialog +- update the config combo box after editting config +- fix current config not being updated after editting config +- fix jitter option… +- fix several DeprecationWarnings +- stop ORM procedure upon closing the widget +- fix status messages for export menuitems +- fix bug in Model loader (path) +- fix ``yaml.RepresenterError`` when no csys backend is loaded +- fix error when loading stand-alone .madx file +- misc fixes to corrector code +- use button groups to safeguard against deselecting radio buttons +Meta: +- add sanity checks (pyflakes, hinting to missing imports, syntax errors, etc) +- add automatic style checks (pycodestyle) +- add first tests for the (now) non-UI components: model/session/corrector +- add rudimentary documentation (updated when pushing to master) +- automatically upload release to PyPI when pushing tags +- move source code to unimportable subdirectory +Refactoring: +- improve naming: set_rowgetter -> set_viewmodel +- deduplicate code between optic variation and multi grid modules (OVM/MGM) +- remove our ElementInfo proxy class, simply use Element from cpymad +- remove several obsolete/unused methods, dead code +- shared management of monitor readouts +- move AsyncReader functionality to cpymad +- make use cpymad multiline input for collected commands +- auto show SingleWindow widgets +- simplify access to twiss table +- let the online plugin manage its settings menu +- relocate several modules and classes +- demeterize Model: no GUI, no config, no graphs!!!! +- remove several static configuration items for MAD-X data structures that can + now be introspected via cpymad +- globalize several private methods that don't need to be part of class + interfaces +- slightly simplify the twiss args guesser +- lose obsolete thread utils [core.worker, QueuedDispatcher] +- don't need thread-safety anymore (no more threads…;) +- rename control._plugin -> .backend +- remove the need for a separate Loader class +- add ``Model.changed`` overload that passes old and new value +- inline and simplify several methods +- introduce a new ``Session`` object that replaces ``MainWindow`` as context + object and can be used without active GUI +- DRY up MANIFEST.in +- demeterize ProcBot for non-GUI usage +- make the Corrector GUI-independent +- move recording/export responsibilities to Corrector (from CorrectorWidget) +- let Corrector know only the active configuration +…and many more +1.14.0 +~~~~~~ +Date: 24.07.2018 +- refactor and simplify treeview data model, more cohesive table definitions +- monospace in tables +- autosave and restore online settings (MEFI) +- fix missing QUndoCommand.setObsolete on Qt<5.9 +- allow defining a ``limits`` parameter in multigrid config +- fix IndexError if too few monitors are selected +- implement missing export functionality in orbit/emit dialogs +- use ``data_key`` for initial conditions im-/exports +- add import/export menus as in mirko +- implement strength import from YAML +- refactor import/export logic +- set YAML as the default filter in strengths export +- recognize '!' comment character in .str files +- fix treeview edit spin boxes to fit into their column +- highlight changed items in SyncParamWidgets (read/write strengths) +- highlight explicitly specified beam/twiss parameters in bold (initial + conditions dialogs) +- code deduplication among diagnostic dialogs: share same rowgetter method +- save selected monitors for orbit/optics in different lists +- support QTableView again in parallel to QTreeView, this has some advantages + such as supporting background colors +- highlight changed steerers in bold in multigrid dialog) +- rework the optic variation dialog, based on tableview, added automation UI +- disable section highlighting in TableView +- refactor how variables are stored in orbit correction dialogs +- always show the current value versus the "to-be-applied" value in the + "steerer corrections" table +- add back/forward button in orbit correction dialogs +- nicer arrow buttons (QToolButton) in element info dialog +- show monitors during orbit correction +1.13.0 +~~~~~~ +Date: 15.07.2018 +- simplify the activate logic of the curvemanager tool (was a toggle item with + complex behaviour, is now simply a button that will create the widget) +- add "Ok" button for curvemanager widget +- fix beam diagnostic dialog staying open with blank tab when pressing Ok +- remove explicit dependency on minrpc version from setup.py (possibly fixes + problem where cpymad's requirement on the minrpc version is then ignored) +- improve knob selection/input in match dialog +- change how "assign" expressions must be defined in the multigrid config, can + now be bound to only x or y specifically +- add widget for optics-based offset calibration +- use backtracking as method for calculating initial coordinates (instead of + inverting sectormaps) +- some code deduplication between diagnostic dialog and multigrid +- allow to specify matching 'method' (lmdif/jacobian/…) in multigrid config +- can show/hide timestamps in the log window +- make treeview columns user resizable (will be reset whenever the view + changes size) +- simplify stretch logic and remove custom column stretch factors +- minor cleanup for some ColumnInfo definitions +1.12.0 +~~~~~~ +Date: 26.06.2018 +- add "About python" menuitem +- fix bugs in ``Model.get_transfer_maps`` / ``Model.sectormap`` +- collect multiple variable update commands into one RPC call +- add class for boxing generic values +- make ``Mainwindow.model`` a ``Boxed`` object!! +- remove ``Model.destroyed`` signal in favor of the more general + ``Boxed.changed`` signal +- add ``envx``/``envy`` columns to ``get_elem_twiss`` +- fix data export in "Read strengths"/"Write strengths" dialogs +- set "Ok" as default button in export widgets +- add menuitem for executing MAD-X files (i.e. CALL) +- remember folders separately for "load strengths" and "execute file" items +1.11.4 +~~~~~~ +Date: 11.06.2018 +- fix inconsistency with open-/closedness of sectormap intervals in + ``model.sectormap`` and ``get_transfer_maps`` +1.11.3 +~~~~~~ +Date: 11.06.2018 +- add 'export strengths' menu item +- add export as .str file in globals edit +- fix JSON incorrectly being listed as export format +- show globals according to var_type (predefinedness) +1.11.2 +~~~~~~ +Date: 11.06.2018 +- fix losing zoom/view on every curve redraw due to autoscaling +- fix AttributeError when trying to save session data. This appeared only if + online control was not connected and prevented saving the current model, + folder etc +- fix ValueError when computing relative path for a model on different volume +- let madgui have its own taskbar group on windows +- add preliminary window icon +- more consistent behaviour for model.get_transfer_maps +- prettify default output format for numpy arrays in python shell +element indicators: +- more distinctive lines for monitors +- flip displacement for pos/neg dipole strengths +- scale displacements/quadrupole colors according to magnet strength +- draw element indicators in background +- distinguish twiss curve by adding outlines +- set alpha=1 for element indicators +- add KICK marker within SBEND +- highlight selected and hovered elements +1.11.1 +~~~~~~ +Date: 01.06.2018 +- fix deadlock appearing mainly on windows during MAD-X commands with long + output (the fix will cause minor performance degradation for now) +- avoid some unnecessary updates/redraws on startup +- remember *which* online plugin to connect to +- some more info log statements +- change ``onload`` again to be executed before loading the model +1.11.0 +~~~~~~ +Date: 31.05.2018 +Miscellaneous: +- require cpymad 1.0.0rc3 +- fix multi grid view not being updated +- add units for K0 +- update floor plan survey after twiss +Matching: +- group multiple matching constraints at the same element and position + into one statement +- specify weights only for the used quantities +- disable matching if the number of constraints is incorrect +- don't reset matching when deactivating the match mode +Element/param dialogs: +- fix condition for when globals are editable +- display element attribute names in title case again +- show leading part of variable names in lowercase +- make use of cpymad's ``inform`` and ``var_type`` +TreeView: +- improve/refactor internal tableview API +- use tree view +- expand vectors in tree view +- expand variables occuring in expressions in GlobalsEdit/CommandEdit +Undo: +- support undoing simple .str files +- remove flawed accept/reject logic, i.e. "Cancel" buttons, leaving only + "Ok" buttons for now (the logic required to properly implement "Cancel" + is nontrivial, and the behaviour might still be confusing) +- move undo utils to their own module +- subclass QUndoStack +- never show empty macros (QUndoCommand.setObsolete) +Plotting: +- share loaded curves between all windows +- handle add_curve/del_curve in mainwindow +- "snapshot" now saves all available twiss data so that when changing + graphs, the snapshot for the other curves will be shown +- gracefully deal with missing data in user curves (showed exception very + loudly previously, showing debug message now) +- invert quadrupole focussing color codes in Y plot +- distinguish SBEND/KICKER sign by shifting the indicator position up/down +- smaller but more distinct indicators +- fade out "off-axis" kickers (e.g. HKICKER in Y plot) +- remove grid lines in Y direction +- fix missing element name in status bar +- update element markers on each draw + +%package -n python3-madgui +Summary: GUI for accelerator simulations using MAD-X. +Provides: python-madgui +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-madgui +madgui is a Qt5 python GUI for interactive accelerator simulations using +MAD-X_ via cpymad_. It currently runs on python 3.4 and above, but higher +python versions may be required in the near future. +Installation +~~~~~~~~~~~~ + pip install madgui +Usage +~~~~~ +Now, you should be able to start madgui with the command:: + madgui +Optionally, madgui can take a filename for a madx/model file:: + madgui /path/to/model.madx +Note that madgui is currently only suited for relatively small sequences, on +the scale of few hundred elements at the most. +Configuration +~~~~~~~~~~~~~ +The application loads a YAML config file ``madgui.yml`` in the current +directory or the user's home directory. +Example file: + model_path: ../hit_models + session_file: madgui.session.yml + online_control: + connect: true + backend: 'hit_acs.plugin:TestACS' + onload: | + code to execute on startup +Development guidelines +~~~~~~~~~~~~~~~~~~~~~~ +See `Developer's Guide`_. +Copying +~~~~~~~ +Copyright 2016-2019 HIT Betriebs GmbH +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +For a full text version of the license, see ``COPYING.GPLv3.txt``. +CHANGELOG +~~~~~~~~~ +20.10.0 +~~~~~~~ +Date: 15.10.2020 +- Add Optic Variation Method for orbit flattening +- Add Sphinx V4.2.4 as default for documentation +20.7.0 +~~~~~~ +Date: 28.07.2020 +- Change Pyqtconsole v1.2.1 +20.6.0 +~~~~~~ +Date: 03.06.2020 +- Fix bugs in optic variation method +- Downgrade PyQt Version to 5.12.3 +20.4.2 +~~~~~~ +Date: 25.04.2020 +- Update the User Guide. Work in progress +- Add dynamical color to snapshots +20.4.1 +~~~~~~ +Date: 22.04.2020 +- Add constrain to the match feature. If the residual is too high, then the + optics are not changed +20.4.0 +~~~~~~ +Date: 08.04.2020 +- Add execute button to match widget +- Downgrade pyqtconsole to 1.1.3 +- Add sample_model dependency +20.1.0 +~~~~~~ +Date: 25.01.2020 +- revisit auto load model feature +- auto loading was subtituted by a button in the read strengths dialog +- updating pyqtconsole dependency to 1.1.5 +19.8.0 +~~~~~~ +Date: 19.08.2019 +- add auto load model feature +19.6.3 +~~~~~~ +Date: 06.06.2019 +- use the ORM orbit correction method by default +- add tooltips for the elementinfo tabs +19.6.2 +~~~~~~ +Date: 05.06.2019 +- fix exception in GLWidget.closeEvent +- explicitly request OpenGL version to improve chances of getting a 3.0 context +- request OpenGL 3.2 core profile (disallow deprecated features) to avoid + running into backward incompatibilities later on +19.6.1 +~~~~~~ +Date: 05.06.2019 +- fix menuitem "Interpolation points" not updating the plot +- fix monitor indicators not being updated after de-/selecting monitors +- fix 3D survey widget by adding missing shaders to the installation +- log OpenGL version and show a nicer error message for incompatible version +- fix incorrect display of element indicators after sequence reversal +- cpymad 1.2.1 fixes deadlock that occurs when clicking "About MAD-X" menuitem + in application context without stdin (e.g. windows GUI) +19.6.0 +~~~~~~ +Date: 02.06.2019 +- fix exception when using element info after opening new model +- deal with issues of lingering signal handlers of the element Selection + after opening new model (by voiding the selection) +- decrease alpha for element indicators +19.5.5 +~~~~~~ +Date: 27.05.2019 +- fix drawing elements only once that occur multiple times in sequence +- add more documentation +- split twiss widget code from plotting module to allow using the plot + functions externally without importing GUI code +3D survey widget: + - fix bug in diffuse lighting direction calculations + - show thin elements as discs + - show more element types, colorful crowd + - fix not drawing the initial model + - scale number of points on circles with radius +19.5.4 +~~~~~~ +Date: 16.05.2019 +- add true 3D OpenGL based survey widget (WIP) +- fix exception in curvemanager tool when clicking snapshot button +- fix TypeError when importing a table without a text column +- show warning when entering invalid number format (instead of silently + ignoring the invalid input) +- show warnings when ignoring invalid knob strings +19.5.3 +~~~~~~ +Date: 13.05.2019 +- allow negative values in step field (ORM measurement dialog) +- fix AttributeError if using model without undo stack +- fix ValueError for "Add" button in match dialog +- separate "Write strengths" menu item further from "Read strengths" +- add hotkey for "Read strengths" +- find models in breadth-first manner, not depth first +- fix bug that caused incorrect update when changing plot, especially from + plots with many curves to plots with less curves +19.5.2 +~~~~~~ +Date: 11.05.2019 +- add a selection of survey/sectormap plots +- show legend outside graph by default in shared plot mode +19.5.1 +~~~~~~ +Date: 11.05.2019 +- show UndoStack.macro invocations in the logging area +- add menuitem to reverse current sequence inplace (experimental) +- show DRIFT attributes as inherited +- start usrguide (very basic atm), document QT_SCALE_FACTOR +- add toolbar item to show/hide BPMs +- add Backend.read_params method to read all/multiple params + (requires hit_acs>=19.5.0) +- export full parameter dump in orm measurement procedure +- update to cpymad 1.2.0, MAD-X version 5.05.00 +19.5.0 +~~~~~~ +Date: 07.05.2019 +- fix a TypeError when changing the model +- export time along with BPM values in ORM measurement dialog +19.4.4 +~~~~~~ +Date: 25.04.2019 +- fix several minor exceptions that can occur in corrector dialog under rare + circumstances +19.4.3 +~~~~~~ +Date: 25.04.2019 +- fix RecursionError in ``UndoStack.macro()``, that occurs e.g. when using + the MATCH/sectormap methods of corrector dialog +- fix potential NameError in ``UndoStack.rollback()`` +- fix unwanted signal connections that can lead to TypeErrors and multiple + signal handler executions (e.g. triggering the EditConfigDialog twice) +19.4.2 +~~~~~~ +Date: 24.04.2019 +- fix log widget to have monospace on windows +- fix exception when setting max log size via menu +- fix exception in corrector dialog when using MATCH or sectormap methods: + "TypeError: macro() missing 1 requried positional argument" +- fix TypeError in corrector dialog when changing config (combo box): + "TypeError: itemText(self, int): argument 1 has unexpected type 'str'" +19.4.1 +~~~~~~ +Date: 13.04.2019 +- fix empty log after changing log level +- improve performance of log widget even after long use (#35) +- add menu and config entry for setting a maximum log length +- fix log entries without specified color receiving the color from the + previous entry +- improve non-GUI mode app support +- make it possible to show the mainwindow on top of other windows, by turning + dialogs into top-level windows +- simplify Dialog instanciation and internal logic +- fix the "Calibrate" button in "orbit correction -> measured response" + widget. It was missing the implementation after an earlier refactoring +- implement notifyEvent in terms of eventFilter. This makes it possible to + these event notifications, and therefore prevent bugs due to calling dead + objects. +- turn shell from dockwidget into a normal dialog +- allow opening multiple console windows at a time +- replace qtconsole by the faster and more lightweight pyqtconsole +- this fixes an "AttributeError" when calling "exit()" +- also fixes "Execution aborted" error that prevents further statements from + being executed in the console after any exception has been raised in a + previous command +- work on improving documentation and cross-referencing +- use pint 0.9 +19.4.0 +~~~~~~ +Date: 01.04.2019 +- drop python 3.5 compatibility, require at least 3.6 +- fix exception when trying to show plots if loading a madx file that includes + a ``SELECT, flag=TWISS`` command +- fix weird matplotlib offset behaviour when showing a nearly constant quantity + (by plotting an invisible horizontal line at y=0) +- add menuitem to redo twiss and refresh plot +- add menuitem to set number of interpolation points +- add config entry for number of interpolation points +- fix some warnings/errors in documentation +- replace QUndoStack by our own implementation to simplify using Model in + non-GUI contexts +- remove QUndoView for now (limitation due to replacing QUndoStack) +- simplify setup.py using static metadata and rework travis scripts +19.3.3 +~~~~~~ +Date: 21.03.2019 +- install as gui script +- fix ``ValueError: fallback required but not specified`` in pyqtconsole due + to missing stdout when called as gui script +19.3.2 +~~~~~~ +Date: 21.03.2019 +- fix TypeError: set_draggable() missing 1 required positional argument + (in shared plot mode) +- add units in curve y labels +- change some quantity labels +- separate function to edit model parameters, for use in plugins etc +19.3.1 +~~~~~~ +Date: 12.03.2019 +- add missing file ``twissfigure.yml`` +- add ``import_path`` config entry for adding plugin folders to ``sys.path`` +- expand '~' and environment variable in config: ``run_path``, ``model_path``, + ``import_path``, ``session_file`` +19.3.0 +~~~~~~ +Date: 12.03.2019 +- drop python 3.4 support +- remove the "by delta" checkbox in orbit correction dialogs, always use the + measured monitor position if possible +- depend on cpymad 1.1.0 +- auto-update plotted monitor markers +- fix Ctrl+P closing mainwindow +- handle menu hotkeys within all application windows +- add menu options and hotkeys to increase or decrease font size +- remember font size setting +- some bugfixes +- remove obsolute "Update" buttons from diagnostic dialogs +internal: +- move ORM analysis code its own independent package +- add PyQt5 as regular dependency (can automatically installed via pip) +- add tests on py35 +- refactor modules in ``madgui.plot`` +- remove context-managing ability from ``Session`` +- replace ``pyqtSignal`` by our own lightweight solution (in preparation for + letting models etc be instanciated without GUI) +- not subclassing ``cpymad.madx.Madx`` anymore, moved functionality directly + to cpymad +- refactor/simplify caching classes +- make ``twissfigure`` module more independent from mainwindow/session and + simplify plotting API (standalone functions that can be used without madgui) +- refactor scene graphs, prepare for fully consistent management of all scene + elements via curvemanager dialog +- optimize performance when updating plot +- fix error while building the documentation +- start a developer's guide documentation section +- introduce a lightweight history type to manage history in several components +- use PyQt5 imports directly, remove the ``madgui.qt`` compatibilty module +- split up the correction dialogs into components, in preparation for a great + unification +19.01.0 +~~~~~~~ +Date: 19.01.2019 +- fix SyntaxError in py3.4 +- internal development of ORM analysis utilities +- add method to model to reverse sequence inplace +- generalize and slightly simplify the orbit fitting API +- treat only "direct" variables (i.e. not deferred expressions) as knobs +- search for knobs recursively through deferred expressions +- parse unit strings from ACS backend on the fly +- adapt to the renaming hit_csys -> hit_acs +- adapt to changes in hit_acs 19.01.0 +- basic version of measured response method for empirical orbit correction +- install a common BeamSampler that monitors and publishes new readouts +18.12.0 +~~~~~~~ +Date: 11.12.2018 +Updated dependencies: +- update to cpymad ``1.0.10`` +- new dependency on scipy! +Bug fixes: +- fix a TypeError in beam tab widget +- fix bug that some widgets are shown only on second click +- explicitly specify the correct datatype for most editable tables +- fix exceptions in some import routines +- fix exception when starting without config file +- fix early exception on some systems due to encoding name +Misc: +- display sectormap and beam matrix as matrix-like table +- improve lookup logic for beam matrix +- remove the "Expression" column in favor of a composite edit widget +- some internal API changes +- add fitting API in ``madgui.util.fit`` +- allow loading table files with text column +- infer missing ``S`` from ``name`` column loading table files +- autogenerate apidoc files during travis build +- update travis config for phased out support of container based infrastructure +- mark build as dev version by default (travis) +- recognize that consts cannot be used as knobs +- move load_yaml function to ``madgui.util.yaml`` +- add simpler API for back-fitting orbit +- never require betx, bety when backtracking +- development on the ORM utility API +18.10.3 +~~~~~~~ +Date: 31.10.2018 +bugfixes: +- fix undo feature not working because of using the wrong stack +- fix exception in Model.twiss when a table is specified +ORM analysis: +- share get_orm() implementation with orbit correction +- deduplications, several code improvements and simplifications +- use base_orbit to backtrack initial conditions +- add plot functions to the analysis script +- better output +- add ability to fit X and Y independently +- compacter ealign notation in undocumented spec file +18.10.2 +~~~~~~~ +Date: 25.10.2018 +bugfixes: +- fix for missing setObsolete on Qt<5.9 (was previously fixed only partially) +- fix empty list of optic elements in output file +- fix beamoptikdll not initiating device download due to flooding +- fix duplicate value bug in the readout logic +- decrease chance of race condition leading to inconsistent readouts +UX improvements: +- log to main logwindow as well +- increase logging verbosity during orbit response measurements +- flush file after each write +- vary steerers in sequence order +- avoid one redundant readout +- increase default steerer variation to 0.2 mrad +ORM analysis: +- handle missing ORM entries as zero +- restrict to used knobs +- fix empty steerers field in record file +- handle accumulated errors in ORM analysis +- add simple plotting script +18.10.1 +~~~~~~~ +Date: 20.10.2018 +- fix exception when opening matching dialog +- fix bad fit_range leading to bad initial conditions fit +- add safeguard for ``None`` offsets in corrector widgets +- restrict orbit correction to only X/Y constraints +- let user choose whether to fit the difference between measured and design + values or just fit the design value directly (this can be different in case + the backtrack does not describe the monitor values very good) +18.10.0 +~~~~~~~ +Date: 18.10.2018 +Now in calver_ (calendaric versioning) ``YY.MM.patch`` since this better fits +the nature of madgui development and is I believe more useful for end-users. +New features: +- add app icon as .ico file (for shortcuts etc) +- add orbit response matrix (ORM) based mode for orbit correction +- add even simpler mode that assumes orbit response matrix = sectormap +- add method selection to OVM dialog +- add dialog for recording orbit response matrix +- add script for generating test ORM recordings +- add script for analyzing ORM recordings +Improvements: +- can edit the steerer values before executing +- implement prev/next buttons in optic variation dialog +- allow multiple floor plan windows +- prevent annoying busy cursor due to MPL redraws +- turn on warnings for our own modules +- close and wait for the MAD-X process properly +- improve update of steerer/monitor display tables +- don't automatically create logfile for every MAD-X session anymore +- make MAD-X less verbose: command echo off! +Bug fixes: +- fix ``AttributeError`` when clicking ``Apply`` in optic variation dialog +- fix ``NameError`` when opening curve manager widget +- fix missing reaction to changing selected config in OVM dialog +- fix missing update before recording in OVM automatic mode +- fix ``AttributeError`` after editing config in MGM dialog +- update the config combo box after editting config +- fix current config not being updated after editting config +- fix jitter option… +- fix several DeprecationWarnings +- stop ORM procedure upon closing the widget +- fix status messages for export menuitems +- fix bug in Model loader (path) +- fix ``yaml.RepresenterError`` when no csys backend is loaded +- fix error when loading stand-alone .madx file +- misc fixes to corrector code +- use button groups to safeguard against deselecting radio buttons +Meta: +- add sanity checks (pyflakes, hinting to missing imports, syntax errors, etc) +- add automatic style checks (pycodestyle) +- add first tests for the (now) non-UI components: model/session/corrector +- add rudimentary documentation (updated when pushing to master) +- automatically upload release to PyPI when pushing tags +- move source code to unimportable subdirectory +Refactoring: +- improve naming: set_rowgetter -> set_viewmodel +- deduplicate code between optic variation and multi grid modules (OVM/MGM) +- remove our ElementInfo proxy class, simply use Element from cpymad +- remove several obsolete/unused methods, dead code +- shared management of monitor readouts +- move AsyncReader functionality to cpymad +- make use cpymad multiline input for collected commands +- auto show SingleWindow widgets +- simplify access to twiss table +- let the online plugin manage its settings menu +- relocate several modules and classes +- demeterize Model: no GUI, no config, no graphs!!!! +- remove several static configuration items for MAD-X data structures that can + now be introspected via cpymad +- globalize several private methods that don't need to be part of class + interfaces +- slightly simplify the twiss args guesser +- lose obsolete thread utils [core.worker, QueuedDispatcher] +- don't need thread-safety anymore (no more threads…;) +- rename control._plugin -> .backend +- remove the need for a separate Loader class +- add ``Model.changed`` overload that passes old and new value +- inline and simplify several methods +- introduce a new ``Session`` object that replaces ``MainWindow`` as context + object and can be used without active GUI +- DRY up MANIFEST.in +- demeterize ProcBot for non-GUI usage +- make the Corrector GUI-independent +- move recording/export responsibilities to Corrector (from CorrectorWidget) +- let Corrector know only the active configuration +…and many more +1.14.0 +~~~~~~ +Date: 24.07.2018 +- refactor and simplify treeview data model, more cohesive table definitions +- monospace in tables +- autosave and restore online settings (MEFI) +- fix missing QUndoCommand.setObsolete on Qt<5.9 +- allow defining a ``limits`` parameter in multigrid config +- fix IndexError if too few monitors are selected +- implement missing export functionality in orbit/emit dialogs +- use ``data_key`` for initial conditions im-/exports +- add import/export menus as in mirko +- implement strength import from YAML +- refactor import/export logic +- set YAML as the default filter in strengths export +- recognize '!' comment character in .str files +- fix treeview edit spin boxes to fit into their column +- highlight changed items in SyncParamWidgets (read/write strengths) +- highlight explicitly specified beam/twiss parameters in bold (initial + conditions dialogs) +- code deduplication among diagnostic dialogs: share same rowgetter method +- save selected monitors for orbit/optics in different lists +- support QTableView again in parallel to QTreeView, this has some advantages + such as supporting background colors +- highlight changed steerers in bold in multigrid dialog) +- rework the optic variation dialog, based on tableview, added automation UI +- disable section highlighting in TableView +- refactor how variables are stored in orbit correction dialogs +- always show the current value versus the "to-be-applied" value in the + "steerer corrections" table +- add back/forward button in orbit correction dialogs +- nicer arrow buttons (QToolButton) in element info dialog +- show monitors during orbit correction +1.13.0 +~~~~~~ +Date: 15.07.2018 +- simplify the activate logic of the curvemanager tool (was a toggle item with + complex behaviour, is now simply a button that will create the widget) +- add "Ok" button for curvemanager widget +- fix beam diagnostic dialog staying open with blank tab when pressing Ok +- remove explicit dependency on minrpc version from setup.py (possibly fixes + problem where cpymad's requirement on the minrpc version is then ignored) +- improve knob selection/input in match dialog +- change how "assign" expressions must be defined in the multigrid config, can + now be bound to only x or y specifically +- add widget for optics-based offset calibration +- use backtracking as method for calculating initial coordinates (instead of + inverting sectormaps) +- some code deduplication between diagnostic dialog and multigrid +- allow to specify matching 'method' (lmdif/jacobian/…) in multigrid config +- can show/hide timestamps in the log window +- make treeview columns user resizable (will be reset whenever the view + changes size) +- simplify stretch logic and remove custom column stretch factors +- minor cleanup for some ColumnInfo definitions +1.12.0 +~~~~~~ +Date: 26.06.2018 +- add "About python" menuitem +- fix bugs in ``Model.get_transfer_maps`` / ``Model.sectormap`` +- collect multiple variable update commands into one RPC call +- add class for boxing generic values +- make ``Mainwindow.model`` a ``Boxed`` object!! +- remove ``Model.destroyed`` signal in favor of the more general + ``Boxed.changed`` signal +- add ``envx``/``envy`` columns to ``get_elem_twiss`` +- fix data export in "Read strengths"/"Write strengths" dialogs +- set "Ok" as default button in export widgets +- add menuitem for executing MAD-X files (i.e. CALL) +- remember folders separately for "load strengths" and "execute file" items +1.11.4 +~~~~~~ +Date: 11.06.2018 +- fix inconsistency with open-/closedness of sectormap intervals in + ``model.sectormap`` and ``get_transfer_maps`` +1.11.3 +~~~~~~ +Date: 11.06.2018 +- add 'export strengths' menu item +- add export as .str file in globals edit +- fix JSON incorrectly being listed as export format +- show globals according to var_type (predefinedness) +1.11.2 +~~~~~~ +Date: 11.06.2018 +- fix losing zoom/view on every curve redraw due to autoscaling +- fix AttributeError when trying to save session data. This appeared only if + online control was not connected and prevented saving the current model, + folder etc +- fix ValueError when computing relative path for a model on different volume +- let madgui have its own taskbar group on windows +- add preliminary window icon +- more consistent behaviour for model.get_transfer_maps +- prettify default output format for numpy arrays in python shell +element indicators: +- more distinctive lines for monitors +- flip displacement for pos/neg dipole strengths +- scale displacements/quadrupole colors according to magnet strength +- draw element indicators in background +- distinguish twiss curve by adding outlines +- set alpha=1 for element indicators +- add KICK marker within SBEND +- highlight selected and hovered elements +1.11.1 +~~~~~~ +Date: 01.06.2018 +- fix deadlock appearing mainly on windows during MAD-X commands with long + output (the fix will cause minor performance degradation for now) +- avoid some unnecessary updates/redraws on startup +- remember *which* online plugin to connect to +- some more info log statements +- change ``onload`` again to be executed before loading the model +1.11.0 +~~~~~~ +Date: 31.05.2018 +Miscellaneous: +- require cpymad 1.0.0rc3 +- fix multi grid view not being updated +- add units for K0 +- update floor plan survey after twiss +Matching: +- group multiple matching constraints at the same element and position + into one statement +- specify weights only for the used quantities +- disable matching if the number of constraints is incorrect +- don't reset matching when deactivating the match mode +Element/param dialogs: +- fix condition for when globals are editable +- display element attribute names in title case again +- show leading part of variable names in lowercase +- make use of cpymad's ``inform`` and ``var_type`` +TreeView: +- improve/refactor internal tableview API +- use tree view +- expand vectors in tree view +- expand variables occuring in expressions in GlobalsEdit/CommandEdit +Undo: +- support undoing simple .str files +- remove flawed accept/reject logic, i.e. "Cancel" buttons, leaving only + "Ok" buttons for now (the logic required to properly implement "Cancel" + is nontrivial, and the behaviour might still be confusing) +- move undo utils to their own module +- subclass QUndoStack +- never show empty macros (QUndoCommand.setObsolete) +Plotting: +- share loaded curves between all windows +- handle add_curve/del_curve in mainwindow +- "snapshot" now saves all available twiss data so that when changing + graphs, the snapshot for the other curves will be shown +- gracefully deal with missing data in user curves (showed exception very + loudly previously, showing debug message now) +- invert quadrupole focussing color codes in Y plot +- distinguish SBEND/KICKER sign by shifting the indicator position up/down +- smaller but more distinct indicators +- fade out "off-axis" kickers (e.g. HKICKER in Y plot) +- remove grid lines in Y direction +- fix missing element name in status bar +- update element markers on each draw + +%package help +Summary: Development documents and examples for madgui +Provides: python3-madgui-doc +%description help +madgui is a Qt5 python GUI for interactive accelerator simulations using +MAD-X_ via cpymad_. It currently runs on python 3.4 and above, but higher +python versions may be required in the near future. +Installation +~~~~~~~~~~~~ + pip install madgui +Usage +~~~~~ +Now, you should be able to start madgui with the command:: + madgui +Optionally, madgui can take a filename for a madx/model file:: + madgui /path/to/model.madx +Note that madgui is currently only suited for relatively small sequences, on +the scale of few hundred elements at the most. +Configuration +~~~~~~~~~~~~~ +The application loads a YAML config file ``madgui.yml`` in the current +directory or the user's home directory. +Example file: + model_path: ../hit_models + session_file: madgui.session.yml + online_control: + connect: true + backend: 'hit_acs.plugin:TestACS' + onload: | + code to execute on startup +Development guidelines +~~~~~~~~~~~~~~~~~~~~~~ +See `Developer's Guide`_. +Copying +~~~~~~~ +Copyright 2016-2019 HIT Betriebs GmbH +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +For a full text version of the license, see ``COPYING.GPLv3.txt``. +CHANGELOG +~~~~~~~~~ +20.10.0 +~~~~~~~ +Date: 15.10.2020 +- Add Optic Variation Method for orbit flattening +- Add Sphinx V4.2.4 as default for documentation +20.7.0 +~~~~~~ +Date: 28.07.2020 +- Change Pyqtconsole v1.2.1 +20.6.0 +~~~~~~ +Date: 03.06.2020 +- Fix bugs in optic variation method +- Downgrade PyQt Version to 5.12.3 +20.4.2 +~~~~~~ +Date: 25.04.2020 +- Update the User Guide. Work in progress +- Add dynamical color to snapshots +20.4.1 +~~~~~~ +Date: 22.04.2020 +- Add constrain to the match feature. If the residual is too high, then the + optics are not changed +20.4.0 +~~~~~~ +Date: 08.04.2020 +- Add execute button to match widget +- Downgrade pyqtconsole to 1.1.3 +- Add sample_model dependency +20.1.0 +~~~~~~ +Date: 25.01.2020 +- revisit auto load model feature +- auto loading was subtituted by a button in the read strengths dialog +- updating pyqtconsole dependency to 1.1.5 +19.8.0 +~~~~~~ +Date: 19.08.2019 +- add auto load model feature +19.6.3 +~~~~~~ +Date: 06.06.2019 +- use the ORM orbit correction method by default +- add tooltips for the elementinfo tabs +19.6.2 +~~~~~~ +Date: 05.06.2019 +- fix exception in GLWidget.closeEvent +- explicitly request OpenGL version to improve chances of getting a 3.0 context +- request OpenGL 3.2 core profile (disallow deprecated features) to avoid + running into backward incompatibilities later on +19.6.1 +~~~~~~ +Date: 05.06.2019 +- fix menuitem "Interpolation points" not updating the plot +- fix monitor indicators not being updated after de-/selecting monitors +- fix 3D survey widget by adding missing shaders to the installation +- log OpenGL version and show a nicer error message for incompatible version +- fix incorrect display of element indicators after sequence reversal +- cpymad 1.2.1 fixes deadlock that occurs when clicking "About MAD-X" menuitem + in application context without stdin (e.g. windows GUI) +19.6.0 +~~~~~~ +Date: 02.06.2019 +- fix exception when using element info after opening new model +- deal with issues of lingering signal handlers of the element Selection + after opening new model (by voiding the selection) +- decrease alpha for element indicators +19.5.5 +~~~~~~ +Date: 27.05.2019 +- fix drawing elements only once that occur multiple times in sequence +- add more documentation +- split twiss widget code from plotting module to allow using the plot + functions externally without importing GUI code +3D survey widget: + - fix bug in diffuse lighting direction calculations + - show thin elements as discs + - show more element types, colorful crowd + - fix not drawing the initial model + - scale number of points on circles with radius +19.5.4 +~~~~~~ +Date: 16.05.2019 +- add true 3D OpenGL based survey widget (WIP) +- fix exception in curvemanager tool when clicking snapshot button +- fix TypeError when importing a table without a text column +- show warning when entering invalid number format (instead of silently + ignoring the invalid input) +- show warnings when ignoring invalid knob strings +19.5.3 +~~~~~~ +Date: 13.05.2019 +- allow negative values in step field (ORM measurement dialog) +- fix AttributeError if using model without undo stack +- fix ValueError for "Add" button in match dialog +- separate "Write strengths" menu item further from "Read strengths" +- add hotkey for "Read strengths" +- find models in breadth-first manner, not depth first +- fix bug that caused incorrect update when changing plot, especially from + plots with many curves to plots with less curves +19.5.2 +~~~~~~ +Date: 11.05.2019 +- add a selection of survey/sectormap plots +- show legend outside graph by default in shared plot mode +19.5.1 +~~~~~~ +Date: 11.05.2019 +- show UndoStack.macro invocations in the logging area +- add menuitem to reverse current sequence inplace (experimental) +- show DRIFT attributes as inherited +- start usrguide (very basic atm), document QT_SCALE_FACTOR +- add toolbar item to show/hide BPMs +- add Backend.read_params method to read all/multiple params + (requires hit_acs>=19.5.0) +- export full parameter dump in orm measurement procedure +- update to cpymad 1.2.0, MAD-X version 5.05.00 +19.5.0 +~~~~~~ +Date: 07.05.2019 +- fix a TypeError when changing the model +- export time along with BPM values in ORM measurement dialog +19.4.4 +~~~~~~ +Date: 25.04.2019 +- fix several minor exceptions that can occur in corrector dialog under rare + circumstances +19.4.3 +~~~~~~ +Date: 25.04.2019 +- fix RecursionError in ``UndoStack.macro()``, that occurs e.g. when using + the MATCH/sectormap methods of corrector dialog +- fix potential NameError in ``UndoStack.rollback()`` +- fix unwanted signal connections that can lead to TypeErrors and multiple + signal handler executions (e.g. triggering the EditConfigDialog twice) +19.4.2 +~~~~~~ +Date: 24.04.2019 +- fix log widget to have monospace on windows +- fix exception when setting max log size via menu +- fix exception in corrector dialog when using MATCH or sectormap methods: + "TypeError: macro() missing 1 requried positional argument" +- fix TypeError in corrector dialog when changing config (combo box): + "TypeError: itemText(self, int): argument 1 has unexpected type 'str'" +19.4.1 +~~~~~~ +Date: 13.04.2019 +- fix empty log after changing log level +- improve performance of log widget even after long use (#35) +- add menu and config entry for setting a maximum log length +- fix log entries without specified color receiving the color from the + previous entry +- improve non-GUI mode app support +- make it possible to show the mainwindow on top of other windows, by turning + dialogs into top-level windows +- simplify Dialog instanciation and internal logic +- fix the "Calibrate" button in "orbit correction -> measured response" + widget. It was missing the implementation after an earlier refactoring +- implement notifyEvent in terms of eventFilter. This makes it possible to + these event notifications, and therefore prevent bugs due to calling dead + objects. +- turn shell from dockwidget into a normal dialog +- allow opening multiple console windows at a time +- replace qtconsole by the faster and more lightweight pyqtconsole +- this fixes an "AttributeError" when calling "exit()" +- also fixes "Execution aborted" error that prevents further statements from + being executed in the console after any exception has been raised in a + previous command +- work on improving documentation and cross-referencing +- use pint 0.9 +19.4.0 +~~~~~~ +Date: 01.04.2019 +- drop python 3.5 compatibility, require at least 3.6 +- fix exception when trying to show plots if loading a madx file that includes + a ``SELECT, flag=TWISS`` command +- fix weird matplotlib offset behaviour when showing a nearly constant quantity + (by plotting an invisible horizontal line at y=0) +- add menuitem to redo twiss and refresh plot +- add menuitem to set number of interpolation points +- add config entry for number of interpolation points +- fix some warnings/errors in documentation +- replace QUndoStack by our own implementation to simplify using Model in + non-GUI contexts +- remove QUndoView for now (limitation due to replacing QUndoStack) +- simplify setup.py using static metadata and rework travis scripts +19.3.3 +~~~~~~ +Date: 21.03.2019 +- install as gui script +- fix ``ValueError: fallback required but not specified`` in pyqtconsole due + to missing stdout when called as gui script +19.3.2 +~~~~~~ +Date: 21.03.2019 +- fix TypeError: set_draggable() missing 1 required positional argument + (in shared plot mode) +- add units in curve y labels +- change some quantity labels +- separate function to edit model parameters, for use in plugins etc +19.3.1 +~~~~~~ +Date: 12.03.2019 +- add missing file ``twissfigure.yml`` +- add ``import_path`` config entry for adding plugin folders to ``sys.path`` +- expand '~' and environment variable in config: ``run_path``, ``model_path``, + ``import_path``, ``session_file`` +19.3.0 +~~~~~~ +Date: 12.03.2019 +- drop python 3.4 support +- remove the "by delta" checkbox in orbit correction dialogs, always use the + measured monitor position if possible +- depend on cpymad 1.1.0 +- auto-update plotted monitor markers +- fix Ctrl+P closing mainwindow +- handle menu hotkeys within all application windows +- add menu options and hotkeys to increase or decrease font size +- remember font size setting +- some bugfixes +- remove obsolute "Update" buttons from diagnostic dialogs +internal: +- move ORM analysis code its own independent package +- add PyQt5 as regular dependency (can automatically installed via pip) +- add tests on py35 +- refactor modules in ``madgui.plot`` +- remove context-managing ability from ``Session`` +- replace ``pyqtSignal`` by our own lightweight solution (in preparation for + letting models etc be instanciated without GUI) +- not subclassing ``cpymad.madx.Madx`` anymore, moved functionality directly + to cpymad +- refactor/simplify caching classes +- make ``twissfigure`` module more independent from mainwindow/session and + simplify plotting API (standalone functions that can be used without madgui) +- refactor scene graphs, prepare for fully consistent management of all scene + elements via curvemanager dialog +- optimize performance when updating plot +- fix error while building the documentation +- start a developer's guide documentation section +- introduce a lightweight history type to manage history in several components +- use PyQt5 imports directly, remove the ``madgui.qt`` compatibilty module +- split up the correction dialogs into components, in preparation for a great + unification +19.01.0 +~~~~~~~ +Date: 19.01.2019 +- fix SyntaxError in py3.4 +- internal development of ORM analysis utilities +- add method to model to reverse sequence inplace +- generalize and slightly simplify the orbit fitting API +- treat only "direct" variables (i.e. not deferred expressions) as knobs +- search for knobs recursively through deferred expressions +- parse unit strings from ACS backend on the fly +- adapt to the renaming hit_csys -> hit_acs +- adapt to changes in hit_acs 19.01.0 +- basic version of measured response method for empirical orbit correction +- install a common BeamSampler that monitors and publishes new readouts +18.12.0 +~~~~~~~ +Date: 11.12.2018 +Updated dependencies: +- update to cpymad ``1.0.10`` +- new dependency on scipy! +Bug fixes: +- fix a TypeError in beam tab widget +- fix bug that some widgets are shown only on second click +- explicitly specify the correct datatype for most editable tables +- fix exceptions in some import routines +- fix exception when starting without config file +- fix early exception on some systems due to encoding name +Misc: +- display sectormap and beam matrix as matrix-like table +- improve lookup logic for beam matrix +- remove the "Expression" column in favor of a composite edit widget +- some internal API changes +- add fitting API in ``madgui.util.fit`` +- allow loading table files with text column +- infer missing ``S`` from ``name`` column loading table files +- autogenerate apidoc files during travis build +- update travis config for phased out support of container based infrastructure +- mark build as dev version by default (travis) +- recognize that consts cannot be used as knobs +- move load_yaml function to ``madgui.util.yaml`` +- add simpler API for back-fitting orbit +- never require betx, bety when backtracking +- development on the ORM utility API +18.10.3 +~~~~~~~ +Date: 31.10.2018 +bugfixes: +- fix undo feature not working because of using the wrong stack +- fix exception in Model.twiss when a table is specified +ORM analysis: +- share get_orm() implementation with orbit correction +- deduplications, several code improvements and simplifications +- use base_orbit to backtrack initial conditions +- add plot functions to the analysis script +- better output +- add ability to fit X and Y independently +- compacter ealign notation in undocumented spec file +18.10.2 +~~~~~~~ +Date: 25.10.2018 +bugfixes: +- fix for missing setObsolete on Qt<5.9 (was previously fixed only partially) +- fix empty list of optic elements in output file +- fix beamoptikdll not initiating device download due to flooding +- fix duplicate value bug in the readout logic +- decrease chance of race condition leading to inconsistent readouts +UX improvements: +- log to main logwindow as well +- increase logging verbosity during orbit response measurements +- flush file after each write +- vary steerers in sequence order +- avoid one redundant readout +- increase default steerer variation to 0.2 mrad +ORM analysis: +- handle missing ORM entries as zero +- restrict to used knobs +- fix empty steerers field in record file +- handle accumulated errors in ORM analysis +- add simple plotting script +18.10.1 +~~~~~~~ +Date: 20.10.2018 +- fix exception when opening matching dialog +- fix bad fit_range leading to bad initial conditions fit +- add safeguard for ``None`` offsets in corrector widgets +- restrict orbit correction to only X/Y constraints +- let user choose whether to fit the difference between measured and design + values or just fit the design value directly (this can be different in case + the backtrack does not describe the monitor values very good) +18.10.0 +~~~~~~~ +Date: 18.10.2018 +Now in calver_ (calendaric versioning) ``YY.MM.patch`` since this better fits +the nature of madgui development and is I believe more useful for end-users. +New features: +- add app icon as .ico file (for shortcuts etc) +- add orbit response matrix (ORM) based mode for orbit correction +- add even simpler mode that assumes orbit response matrix = sectormap +- add method selection to OVM dialog +- add dialog for recording orbit response matrix +- add script for generating test ORM recordings +- add script for analyzing ORM recordings +Improvements: +- can edit the steerer values before executing +- implement prev/next buttons in optic variation dialog +- allow multiple floor plan windows +- prevent annoying busy cursor due to MPL redraws +- turn on warnings for our own modules +- close and wait for the MAD-X process properly +- improve update of steerer/monitor display tables +- don't automatically create logfile for every MAD-X session anymore +- make MAD-X less verbose: command echo off! +Bug fixes: +- fix ``AttributeError`` when clicking ``Apply`` in optic variation dialog +- fix ``NameError`` when opening curve manager widget +- fix missing reaction to changing selected config in OVM dialog +- fix missing update before recording in OVM automatic mode +- fix ``AttributeError`` after editing config in MGM dialog +- update the config combo box after editting config +- fix current config not being updated after editting config +- fix jitter option… +- fix several DeprecationWarnings +- stop ORM procedure upon closing the widget +- fix status messages for export menuitems +- fix bug in Model loader (path) +- fix ``yaml.RepresenterError`` when no csys backend is loaded +- fix error when loading stand-alone .madx file +- misc fixes to corrector code +- use button groups to safeguard against deselecting radio buttons +Meta: +- add sanity checks (pyflakes, hinting to missing imports, syntax errors, etc) +- add automatic style checks (pycodestyle) +- add first tests for the (now) non-UI components: model/session/corrector +- add rudimentary documentation (updated when pushing to master) +- automatically upload release to PyPI when pushing tags +- move source code to unimportable subdirectory +Refactoring: +- improve naming: set_rowgetter -> set_viewmodel +- deduplicate code between optic variation and multi grid modules (OVM/MGM) +- remove our ElementInfo proxy class, simply use Element from cpymad +- remove several obsolete/unused methods, dead code +- shared management of monitor readouts +- move AsyncReader functionality to cpymad +- make use cpymad multiline input for collected commands +- auto show SingleWindow widgets +- simplify access to twiss table +- let the online plugin manage its settings menu +- relocate several modules and classes +- demeterize Model: no GUI, no config, no graphs!!!! +- remove several static configuration items for MAD-X data structures that can + now be introspected via cpymad +- globalize several private methods that don't need to be part of class + interfaces +- slightly simplify the twiss args guesser +- lose obsolete thread utils [core.worker, QueuedDispatcher] +- don't need thread-safety anymore (no more threads…;) +- rename control._plugin -> .backend +- remove the need for a separate Loader class +- add ``Model.changed`` overload that passes old and new value +- inline and simplify several methods +- introduce a new ``Session`` object that replaces ``MainWindow`` as context + object and can be used without active GUI +- DRY up MANIFEST.in +- demeterize ProcBot for non-GUI usage +- make the Corrector GUI-independent +- move recording/export responsibilities to Corrector (from CorrectorWidget) +- let Corrector know only the active configuration +…and many more +1.14.0 +~~~~~~ +Date: 24.07.2018 +- refactor and simplify treeview data model, more cohesive table definitions +- monospace in tables +- autosave and restore online settings (MEFI) +- fix missing QUndoCommand.setObsolete on Qt<5.9 +- allow defining a ``limits`` parameter in multigrid config +- fix IndexError if too few monitors are selected +- implement missing export functionality in orbit/emit dialogs +- use ``data_key`` for initial conditions im-/exports +- add import/export menus as in mirko +- implement strength import from YAML +- refactor import/export logic +- set YAML as the default filter in strengths export +- recognize '!' comment character in .str files +- fix treeview edit spin boxes to fit into their column +- highlight changed items in SyncParamWidgets (read/write strengths) +- highlight explicitly specified beam/twiss parameters in bold (initial + conditions dialogs) +- code deduplication among diagnostic dialogs: share same rowgetter method +- save selected monitors for orbit/optics in different lists +- support QTableView again in parallel to QTreeView, this has some advantages + such as supporting background colors +- highlight changed steerers in bold in multigrid dialog) +- rework the optic variation dialog, based on tableview, added automation UI +- disable section highlighting in TableView +- refactor how variables are stored in orbit correction dialogs +- always show the current value versus the "to-be-applied" value in the + "steerer corrections" table +- add back/forward button in orbit correction dialogs +- nicer arrow buttons (QToolButton) in element info dialog +- show monitors during orbit correction +1.13.0 +~~~~~~ +Date: 15.07.2018 +- simplify the activate logic of the curvemanager tool (was a toggle item with + complex behaviour, is now simply a button that will create the widget) +- add "Ok" button for curvemanager widget +- fix beam diagnostic dialog staying open with blank tab when pressing Ok +- remove explicit dependency on minrpc version from setup.py (possibly fixes + problem where cpymad's requirement on the minrpc version is then ignored) +- improve knob selection/input in match dialog +- change how "assign" expressions must be defined in the multigrid config, can + now be bound to only x or y specifically +- add widget for optics-based offset calibration +- use backtracking as method for calculating initial coordinates (instead of + inverting sectormaps) +- some code deduplication between diagnostic dialog and multigrid +- allow to specify matching 'method' (lmdif/jacobian/…) in multigrid config +- can show/hide timestamps in the log window +- make treeview columns user resizable (will be reset whenever the view + changes size) +- simplify stretch logic and remove custom column stretch factors +- minor cleanup for some ColumnInfo definitions +1.12.0 +~~~~~~ +Date: 26.06.2018 +- add "About python" menuitem +- fix bugs in ``Model.get_transfer_maps`` / ``Model.sectormap`` +- collect multiple variable update commands into one RPC call +- add class for boxing generic values +- make ``Mainwindow.model`` a ``Boxed`` object!! +- remove ``Model.destroyed`` signal in favor of the more general + ``Boxed.changed`` signal +- add ``envx``/``envy`` columns to ``get_elem_twiss`` +- fix data export in "Read strengths"/"Write strengths" dialogs +- set "Ok" as default button in export widgets +- add menuitem for executing MAD-X files (i.e. CALL) +- remember folders separately for "load strengths" and "execute file" items +1.11.4 +~~~~~~ +Date: 11.06.2018 +- fix inconsistency with open-/closedness of sectormap intervals in + ``model.sectormap`` and ``get_transfer_maps`` +1.11.3 +~~~~~~ +Date: 11.06.2018 +- add 'export strengths' menu item +- add export as .str file in globals edit +- fix JSON incorrectly being listed as export format +- show globals according to var_type (predefinedness) +1.11.2 +~~~~~~ +Date: 11.06.2018 +- fix losing zoom/view on every curve redraw due to autoscaling +- fix AttributeError when trying to save session data. This appeared only if + online control was not connected and prevented saving the current model, + folder etc +- fix ValueError when computing relative path for a model on different volume +- let madgui have its own taskbar group on windows +- add preliminary window icon +- more consistent behaviour for model.get_transfer_maps +- prettify default output format for numpy arrays in python shell +element indicators: +- more distinctive lines for monitors +- flip displacement for pos/neg dipole strengths +- scale displacements/quadrupole colors according to magnet strength +- draw element indicators in background +- distinguish twiss curve by adding outlines +- set alpha=1 for element indicators +- add KICK marker within SBEND +- highlight selected and hovered elements +1.11.1 +~~~~~~ +Date: 01.06.2018 +- fix deadlock appearing mainly on windows during MAD-X commands with long + output (the fix will cause minor performance degradation for now) +- avoid some unnecessary updates/redraws on startup +- remember *which* online plugin to connect to +- some more info log statements +- change ``onload`` again to be executed before loading the model +1.11.0 +~~~~~~ +Date: 31.05.2018 +Miscellaneous: +- require cpymad 1.0.0rc3 +- fix multi grid view not being updated +- add units for K0 +- update floor plan survey after twiss +Matching: +- group multiple matching constraints at the same element and position + into one statement +- specify weights only for the used quantities +- disable matching if the number of constraints is incorrect +- don't reset matching when deactivating the match mode +Element/param dialogs: +- fix condition for when globals are editable +- display element attribute names in title case again +- show leading part of variable names in lowercase +- make use of cpymad's ``inform`` and ``var_type`` +TreeView: +- improve/refactor internal tableview API +- use tree view +- expand vectors in tree view +- expand variables occuring in expressions in GlobalsEdit/CommandEdit +Undo: +- support undoing simple .str files +- remove flawed accept/reject logic, i.e. "Cancel" buttons, leaving only + "Ok" buttons for now (the logic required to properly implement "Cancel" + is nontrivial, and the behaviour might still be confusing) +- move undo utils to their own module +- subclass QUndoStack +- never show empty macros (QUndoCommand.setObsolete) +Plotting: +- share loaded curves between all windows +- handle add_curve/del_curve in mainwindow +- "snapshot" now saves all available twiss data so that when changing + graphs, the snapshot for the other curves will be shown +- gracefully deal with missing data in user curves (showed exception very + loudly previously, showing debug message now) +- invert quadrupole focussing color codes in Y plot +- distinguish SBEND/KICKER sign by shifting the indicator position up/down +- smaller but more distinct indicators +- fade out "off-axis" kickers (e.g. HKICKER in Y plot) +- remove grid lines in Y direction +- fix missing element name in status bar +- update element markers on each draw + +%prep +%autosetup -n madgui-20.10.0 + +%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-madgui -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 20.10.0-1 +- Package Spec generated |