maxwell-bloch-solver 9.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- maxwell_bloch_solver-9.0.0.dist-info/METADATA +167 -0
- maxwell_bloch_solver-9.0.0.dist-info/RECORD +49 -0
- maxwell_bloch_solver-9.0.0.dist-info/WHEEL +5 -0
- maxwell_bloch_solver-9.0.0.dist-info/entry_points.txt +3 -0
- maxwell_bloch_solver-9.0.0.dist-info/licenses/LICENSE +21 -0
- maxwell_bloch_solver-9.0.0.dist-info/top_level.txt +1 -0
- mbsolver/__init__.py +1 -0
- mbsolver/__main__.py +5 -0
- mbsolver/app/__init__.py +2 -0
- mbsolver/app/main_window.py +1211 -0
- mbsolver/app/parameter_tabs.py +202 -0
- mbsolver/app/plot.py +620 -0
- mbsolver/app/settings_manager.py +344 -0
- mbsolver/app/solver_adapter.py +77 -0
- mbsolver/app/solver_controller.py +167 -0
- mbsolver/app/update_checker.py +133 -0
- mbsolver/app/update_pipeline.py +414 -0
- mbsolver/app/velocity_bar_controller.py +546 -0
- mbsolver/config/__init__.py +1 -0
- mbsolver/config/app_metadata.py +49 -0
- mbsolver/config/app_style.py +105 -0
- mbsolver/config/splash_state.py +4 -0
- mbsolver/config/ui_defaults.py +15 -0
- mbsolver/io/__init__.py +2 -0
- mbsolver/io/data_io.py +515 -0
- mbsolver/io/legacy_keys.py +119 -0
- mbsolver/io/parameter_io.py +236 -0
- mbsolver/main.py +68 -0
- mbsolver/paths.py +33 -0
- mbsolver/resources/equations_reference.pdf +0 -0
- mbsolver/resources/icons/app_icon.png +0 -0
- mbsolver/resources/icons/app_image.png +0 -0
- mbsolver/resources/settings.json +857 -0
- mbsolver/resources/user_guide.pdf +0 -0
- mbsolver/ui/__init__.py +1 -0
- mbsolver/ui/dialogs.py +207 -0
- mbsolver/ui/solver_step_viewer.py +363 -0
- mbsolver/ui/splash_screen.py +184 -0
- mbsolver/ui/widgets/__init__.py +1 -0
- mbsolver/ui/widgets/_common.py +27 -0
- mbsolver/ui/widgets/initial_conditions.py +248 -0
- mbsolver/ui/widgets/pulse_function.py +910 -0
- mbsolver/ui/widgets/sample_properties.py +258 -0
- mbsolver/ui/widgets/scaling_parameters.py +394 -0
- mbsolver/ui/widgets/step_function.py +1053 -0
- mbsolver/utils/__init__.py +2 -0
- mbsolver/utils/constants_si.py +45 -0
- mbsolver/utils/helper_funcs.py +381 -0
- mbsolver/utils/units.py +20 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: maxwell-bloch-solver
|
|
3
|
+
Version: 9.0.0
|
|
4
|
+
Summary: Desktop app for simulating and fitting Maxwell-Bloch models of astrophysical maser light curves
|
|
5
|
+
Author-email: Vahid Anari <vahid.anari8@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/vahid-anari/maxwell-bloch-solver
|
|
8
|
+
Project-URL: Repository, https://github.com/vahid-anari/maxwell-bloch-solver
|
|
9
|
+
Project-URL: Issues, https://github.com/vahid-anari/maxwell-bloch-solver/issues
|
|
10
|
+
Keywords: maxwell-bloch,maser,superradiance,astrophysics,light-curve,fitting,pyside6,gui
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Environment :: X11 Applications :: Qt
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: PySide6<7,>=6.5
|
|
26
|
+
Requires-Dist: numpy>=1.24
|
|
27
|
+
Requires-Dist: matplotlib>=3.7
|
|
28
|
+
Requires-Dist: psutil>=5.9
|
|
29
|
+
Requires-Dist: pygments>=2.0
|
|
30
|
+
Requires-Dist: sciwidgets~=0.5.0
|
|
31
|
+
Requires-Dist: maxbloch~=0.1.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: build; extra == "dev"
|
|
34
|
+
Requires-Dist: twine; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# Maxwell Bloch Solver
|
|
38
|
+
|
|
39
|
+
A PySide6 desktop application for simulating, visualizing, and fitting one-dimensional Maxwell-Bloch models to astronomical maser light-curve data. The application combines an interactive Qt interface, configurable physical and numerical parameters, Numba-accelerated time evolution, and publication-oriented plotting/export tools.
|
|
40
|
+
|
|
41
|
+
## Screenshot
|
|
42
|
+
|
|
43
|
+
<img src="https://raw.githubusercontent.com/vahid-anari/maxwell-bloch-solver/main/assets/main_window.png" width="1512" alt="Maxwell Bloch Solver main window">
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
- Interactive GUI for Maxwell-Bloch model configuration and visualization.
|
|
48
|
+
- Numba-accelerated numerical solver using Runge-Kutta time stepping, from the [maxbloch](https://github.com/vahid-anari/maxbloch) package.
|
|
49
|
+
- Interface built with [sciwidgets](https://github.com/vahid-anari/sciwidgets) (sliders, parameter panels, plot canvas).
|
|
50
|
+
- Light-curve import from velocity-tagged text files.
|
|
51
|
+
- Support for period-tagged source folders, e.g. multiple folded periods for the same source.
|
|
52
|
+
- Adjustable source, sample, initial-condition, pump-profile, and plotting parameters.
|
|
53
|
+
- Built-in visualization of fitted flux, inversion/population, pump terms, and other solver quantities.
|
|
54
|
+
- Parameter saving/loading using JSON files.
|
|
55
|
+
- Export to PDF, PNG, or SVG, with PDF exports including metadata and parameter reports.
|
|
56
|
+
- Local user guide and equations reference.
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
The app needs Python 3.10 or newer. The easiest way is [pipx](https://pipx.pypa.io),
|
|
61
|
+
which installs the app in its own environment and puts the command on your path:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pipx install maxwell-bloch-solver
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If you work in a conda or virtual environment, install it there with pip instead:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install maxwell-bloch-solver
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Running the application
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
maxwell-bloch-solver
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
(`mbsolver` is a shorter name for the same command, and `python -m mbsolver` works too.)
|
|
80
|
+
Use the menu bar to load data folders, adjust parameters, run the solver and export plots.
|
|
81
|
+
|
|
82
|
+
## Updating
|
|
83
|
+
|
|
84
|
+
The app tells you when a new version is available. To update:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pipx upgrade maxwell-bloch-solver
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
or `pip install -U maxwell-bloch-solver` in the environment where you installed it.
|
|
91
|
+
|
|
92
|
+
## Input data format
|
|
93
|
+
|
|
94
|
+
The application expects light-curve files as plain text files with at least two whitespace-separated columns:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
time flux
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Blank lines and lines beginning with `#` are ignored.
|
|
101
|
+
|
|
102
|
+
Supported file-name patterns are:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
Source_v=12.3.txt
|
|
106
|
+
Source_p1_v=12.3.txt
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
where:
|
|
110
|
+
|
|
111
|
+
- `Source` is the source name,
|
|
112
|
+
- `p1`, `p2`, etc. are optional period labels,
|
|
113
|
+
- `v=12.3` is the velocity-component label.
|
|
114
|
+
|
|
115
|
+
Matching parameter files can be stored as:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
Source_params.json
|
|
119
|
+
Source_p1_params.json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
When period-tagged files are present, the application lets the user select the period set to load.
|
|
123
|
+
|
|
124
|
+
## Exporting results
|
|
125
|
+
|
|
126
|
+
Plots can be exported from the GUI as:
|
|
127
|
+
|
|
128
|
+
- PDF
|
|
129
|
+
- PNG
|
|
130
|
+
- SVG
|
|
131
|
+
|
|
132
|
+
PDF exports include the plot plus a report page containing metadata and the current parameter state.
|
|
133
|
+
|
|
134
|
+
## Documentation
|
|
135
|
+
|
|
136
|
+
The user guide and the equations reference (PDF) are installed with the app;
|
|
137
|
+
open them from the Help and Info menus.
|
|
138
|
+
|
|
139
|
+
## Development
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
git clone https://github.com/vahid-anari/maxwell-bloch-solver.git
|
|
143
|
+
cd maxwell-bloch-solver
|
|
144
|
+
pip install -e .
|
|
145
|
+
mbsolver
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
`python main.py` in the repository root also starts the app from the source
|
|
149
|
+
folder. The code lives in `src/mbsolver/`:
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
src/mbsolver/
|
|
153
|
+
├── main.py # application entry point
|
|
154
|
+
├── app/ # main window, plotting, solver controller, update pipeline
|
|
155
|
+
├── ui/ # physics parameter widgets, dialogs, splash screen, step viewer
|
|
156
|
+
├── io/ # data and parameter import/export
|
|
157
|
+
├── config/ # app metadata, style and UI defaults
|
|
158
|
+
├── utils/ # units, constants, helper functions
|
|
159
|
+
└── resources/ # settings.json, icons, user guide and equations PDFs
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The numerical solver is the [maxbloch](https://github.com/vahid-anari/maxbloch)
|
|
163
|
+
package; the widgets come from [sciwidgets](https://github.com/vahid-anari/sciwidgets).
|
|
164
|
+
|
|
165
|
+
## License
|
|
166
|
+
|
|
167
|
+
This project is released under the MIT License. See [`LICENSE`](https://github.com/vahid-anari/maxwell-bloch-solver/blob/main/LICENSE) for details.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
maxwell_bloch_solver-9.0.0.dist-info/licenses/LICENSE,sha256=2LJWhyNdKcg9IB3iYNYwz5J7iP5VfXv4aDTGS15iY98,1068
|
|
2
|
+
mbsolver/__init__.py,sha256=W-hO1poowO8gnJBHHyibjIGZWGwL44ONVXXfUcUXR7I,92
|
|
3
|
+
mbsolver/__main__.py,sha256=yxeGUepYG02Snf7BI6nYBzWh0Flfaja1s6nqKz2A1rE,107
|
|
4
|
+
mbsolver/main.py,sha256=s4c46GKuonVjJ_d1iKxLDcMvUrono1C2c2cWYEFNsjY,1927
|
|
5
|
+
mbsolver/paths.py,sha256=GuxuYX7oib4g03LoqEyCoIbsI5Np9WptsV4vrNHYAQQ,1052
|
|
6
|
+
mbsolver/app/__init__.py,sha256=GxCHWvxF8zBB4kmbBw7ihi3upXJBT6a-JDmZMWuuvMU,61
|
|
7
|
+
mbsolver/app/main_window.py,sha256=t5VXSEtUlPgp2-7W34Yrz8JtJNDGyP2FANEH0Qf5Cbo,46943
|
|
8
|
+
mbsolver/app/parameter_tabs.py,sha256=nCYrcWgivyhkqM84zfBmD8WVCkzrtjW0ouXIbayn9Ho,7970
|
|
9
|
+
mbsolver/app/plot.py,sha256=Ep_ZZw_r49df2bU5LIovLk01G7VSrNYEUQ895R8whIg,24280
|
|
10
|
+
mbsolver/app/settings_manager.py,sha256=d303cE1kamlpN3hTERWxDbOBsybMLiJYr7tTJqtSWF8,12041
|
|
11
|
+
mbsolver/app/solver_adapter.py,sha256=gav8ryV3IXVy-7-Q0DrXP5Rh1BcyLPt9uc1lxbzYV6k,2695
|
|
12
|
+
mbsolver/app/solver_controller.py,sha256=PvQwCCNxb4CdCMHlunK3MwylTLZx1s3AuiQ6Au6l98w,5896
|
|
13
|
+
mbsolver/app/update_checker.py,sha256=G4ODb_-n7pZ3MffaiIaUK0Bf2rUkYq0oLeNSY3jYkjQ,4212
|
|
14
|
+
mbsolver/app/update_pipeline.py,sha256=l4SX69YBKMshGwGBGw8h0YlPg6MRrjYS03L8uMdNkBE,13881
|
|
15
|
+
mbsolver/app/velocity_bar_controller.py,sha256=txLicO4OZOqNaW7wZu_hYl4cfmpOs0QmRekfzUWR3_k,17846
|
|
16
|
+
mbsolver/config/__init__.py,sha256=mYj8lJnXeH8Pe2W0mtiCzXP8snAbC91iBrg_HCFQrJE,62
|
|
17
|
+
mbsolver/config/app_metadata.py,sha256=7vW6TfWq8UwisTtSwPbBslPB3Wig3aKUNugKSB6iFo8,1505
|
|
18
|
+
mbsolver/config/app_style.py,sha256=T0AZbGWvzK7KES5DaiCUdeTVP_huPbbS3pPxDJZR0jU,3159
|
|
19
|
+
mbsolver/config/splash_state.py,sha256=XnkNcJ_Om6ZLSJooPs2cNix1WbwFg49TzRlFbmeKM_A,154
|
|
20
|
+
mbsolver/config/ui_defaults.py,sha256=bRQS7lRui57-HdLhRyjhl9TD3D-twVYozgr91SxG_e0,484
|
|
21
|
+
mbsolver/io/__init__.py,sha256=2S7l1vEAEyt7f39lMvnG53pA8Dr08OE6inYQMhuMfgg,70
|
|
22
|
+
mbsolver/io/data_io.py,sha256=qFraC8WRMl2JZft0tld9tD4CLgNFiA-i0xqXXj6oQAo,14136
|
|
23
|
+
mbsolver/io/legacy_keys.py,sha256=0ZKuxX96kTKRTrV7r3Eyd_6kqVxOWWR0YaRA1n8LZ98,3778
|
|
24
|
+
mbsolver/io/parameter_io.py,sha256=svXHGvBfOQKu55eT7xTeMAw_i66IArRdydQMctVpoX4,7228
|
|
25
|
+
mbsolver/resources/equations_reference.pdf,sha256=6QH_guT_gAaZ_JrUBTH8KNDD1U2jxIyfIWj6BBpIDls,316302
|
|
26
|
+
mbsolver/resources/settings.json,sha256=JpmRdQ8XvWFltoQSYueM7lJWhMfclkIN_cGDrRjZGM8,21991
|
|
27
|
+
mbsolver/resources/user_guide.pdf,sha256=WH5EdYpcVcREDag9UNX_EIC4z07v7DnKLEWjrZnrOsM,324919
|
|
28
|
+
mbsolver/resources/icons/app_icon.png,sha256=8y5_tAemdxz14JGCHNOVAP0utFeO9TCZ_jG9txKFbNs,629852
|
|
29
|
+
mbsolver/resources/icons/app_image.png,sha256=QlXtkEumMnmFFW-wbP3Foh2Iq2OGd7IviJu2pNfp4Ks,1002314
|
|
30
|
+
mbsolver/ui/__init__.py,sha256=3MPRmc4ttJWdSc60uZVHkgSTMXOQPl5aU73QGjz0yMI,86
|
|
31
|
+
mbsolver/ui/dialogs.py,sha256=LHUkw3ojVtc1OFWxQQb1mDw8FC7MH45AH5UpKJAF1h8,6040
|
|
32
|
+
mbsolver/ui/solver_step_viewer.py,sha256=nQvQ2RVuRC-C-4kr2LIw1OaCXujXnx3H4NN-4yqa80w,11215
|
|
33
|
+
mbsolver/ui/splash_screen.py,sha256=1WILTVsI7dfsZ2-0hYH6OvCIizdaXgoOik1_mSNnZTo,4703
|
|
34
|
+
mbsolver/ui/widgets/__init__.py,sha256=CfFJsfHrwdXR1KU_vanz5MepflwMgALonsf3MUHLAss,63
|
|
35
|
+
mbsolver/ui/widgets/_common.py,sha256=qpCNHsHA0QQ9loYiO_-8WD3Xi_39W5tPKbv3f1ZIG9k,762
|
|
36
|
+
mbsolver/ui/widgets/initial_conditions.py,sha256=OCJ9ftK-PboAn3bCP94rPvRHB0zpaKlOP8Hv-IaCVyo,7750
|
|
37
|
+
mbsolver/ui/widgets/pulse_function.py,sha256=2yoOszXhw59JM3FPWC5tjTn4jLt1Dsl1WDp1Vwj5bmk,32891
|
|
38
|
+
mbsolver/ui/widgets/sample_properties.py,sha256=FelCOJNjwaNUOKM5yZNGxxeqFFdAqW7rbhYnpvKlc4Y,9426
|
|
39
|
+
mbsolver/ui/widgets/scaling_parameters.py,sha256=v65S2cTSwOC6RkcycZDXQQhTApJwCoNtjXMFtoTDjIQ,12798
|
|
40
|
+
mbsolver/ui/widgets/step_function.py,sha256=IIUF63qQwZZk_i1Iv0h8fTacrCV39VhsZ0f8M3t-_rM,37832
|
|
41
|
+
mbsolver/utils/__init__.py,sha256=INdnH4g-uc8KWWCdkz2rAxKMxWw6PUpexNqELCsSHJ4,58
|
|
42
|
+
mbsolver/utils/constants_si.py,sha256=EZqmrWuKWf60tXqzn8Ici5qeeckoJp_wH6ZMOYSnQv0,1145
|
|
43
|
+
mbsolver/utils/helper_funcs.py,sha256=yDeJXzTVqJaf5RFg_7ZGodaLf_e13JWgYggwgFVNDrA,11104
|
|
44
|
+
mbsolver/utils/units.py,sha256=RYN6B1y-_EzWI4WRlOki0OD0XNHL4yoUxyxr6JSenos,487
|
|
45
|
+
maxwell_bloch_solver-9.0.0.dist-info/METADATA,sha256=n2nHnpZYka1C63MbbVYjG9MsYr4qvwoOLUh8Jae62BM,5819
|
|
46
|
+
maxwell_bloch_solver-9.0.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
47
|
+
maxwell_bloch_solver-9.0.0.dist-info/entry_points.txt,sha256=eA5s8gwQBtgr67w2R9i908Ensb0xzqHW4fb6UIqshEs,86
|
|
48
|
+
maxwell_bloch_solver-9.0.0.dist-info/top_level.txt,sha256=IesY1KJhnA-0KgpmrT1HztFrbvqYiKLh-OVbYdbW6yc,9
|
|
49
|
+
maxwell_bloch_solver-9.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vahid Anari
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
mbsolver
|
mbsolver/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Maxwell Bloch Solver: a desktop app for Maxwell-Bloch models of astrophysical masers."""
|
mbsolver/__main__.py
ADDED
mbsolver/app/__init__.py
ADDED