jaxion 0.0.9__tar.gz → 0.0.10__tar.gz

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.
Files changed (27) hide show
  1. {jaxion-0.0.9 → jaxion-0.0.10}/PKG-INFO +15 -10
  2. {jaxion-0.0.9 → jaxion-0.0.10}/README.md +14 -9
  3. jaxion-0.0.10/jaxion/__init__.py +20 -0
  4. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/hydro.py +18 -12
  5. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion.egg-info/PKG-INFO +15 -10
  6. {jaxion-0.0.9 → jaxion-0.0.10}/pyproject.toml +1 -1
  7. jaxion-0.0.9/jaxion/__init__.py +0 -3
  8. {jaxion-0.0.9 → jaxion-0.0.10}/LICENSE +0 -0
  9. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/analysis.py +0 -0
  10. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/constants.py +0 -0
  11. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/cosmology.py +0 -0
  12. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/defaults.json +0 -0
  13. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/gravity.py +0 -0
  14. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/particles.py +0 -0
  15. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/quantum.py +0 -0
  16. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/simulation.py +0 -0
  17. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/utils.py +0 -0
  18. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion/visualization.py +0 -0
  19. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion.egg-info/SOURCES.txt +0 -0
  20. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion.egg-info/dependency_links.txt +0 -0
  21. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion.egg-info/requires.txt +0 -0
  22. {jaxion-0.0.9 → jaxion-0.0.10}/jaxion.egg-info/top_level.txt +0 -0
  23. {jaxion-0.0.9 → jaxion-0.0.10}/requirements.txt +0 -0
  24. {jaxion-0.0.9 → jaxion-0.0.10}/setup.cfg +0 -0
  25. {jaxion-0.0.9 → jaxion-0.0.10}/tests/test_analysis.py +0 -0
  26. {jaxion-0.0.9 → jaxion-0.0.10}/tests/test_cosmology.py +0 -0
  27. {jaxion-0.0.9 → jaxion-0.0.10}/tests/test_examples.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaxion
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: A differentiable simulation library for fuzzy dark matter in JAX
5
5
  Author-email: Philip Mocz <philip.mocz@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -77,13 +77,7 @@ Install with:
77
77
  pip install jaxion
78
78
  ```
79
79
 
80
- or, for GPU support, use:
81
-
82
- ```console
83
- pip install jaxion[cuda12]
84
- ```
85
-
86
- See the docs for more info on how to [build from source](https://jaxion.readthedocs.io/en/latest/pages/installation.html).
80
+ or see the docs for how to [build from source](https://jaxion.readthedocs.io/en/latest/pages/installation.html).
87
81
 
88
82
 
89
83
  ## Examples
@@ -123,6 +117,11 @@ Check out the [`examples/`](https://github.com/JaxionProject/jaxion/tree/main/ex
123
117
  </p>
124
118
 
125
119
 
120
+ ## Try it out!
121
+
122
+ Launch a live demo in Google Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JaxionProject/jaxion/blob/main/notebooks/soliton_binary_merger/soliton_binary_merger.ipynb)
123
+
124
+
126
125
  ## High-Performance
127
126
 
128
127
  Jaxion is scalable on multiple GPUs!
@@ -139,6 +138,12 @@ Jaxion is scalable on multiple GPUs!
139
138
  Jaxion welcomes community contributions of all kinds. Open an issue or fork the code and submit a pull request. Please check out the [Contributing Guidelines](CONTRIBUTING.md)
140
139
 
141
140
 
141
+ ## TODO/Wishlist
142
+
143
+ * cosmological initial condition generator
144
+ * add cosmological factors to gas evolution
145
+
146
+
142
147
  ## Links
143
148
 
144
149
  * [Code repository](https://github.com/JaxionProject/jaxion) on GitHub (this page).
@@ -153,10 +158,10 @@ If you use this software, please cite it as below.
153
158
  @software{Mocz_Jaxion_2025,
154
159
  author = {Mocz, Philip},
155
160
  doi = {10.5281/zenodo.17438467},
156
- month = oct,
161
+ month = dec,
157
162
  title = {{Jaxion}},
158
163
  url = {https://github.com/JaxionProject/jaxion},
159
- version = {0.0.4},
164
+ version = {0.0.9},
160
165
  year = {2025}
161
166
  }
162
167
  ```
@@ -53,13 +53,7 @@ Install with:
53
53
  pip install jaxion
54
54
  ```
55
55
 
56
- or, for GPU support, use:
57
-
58
- ```console
59
- pip install jaxion[cuda12]
60
- ```
61
-
62
- See the docs for more info on how to [build from source](https://jaxion.readthedocs.io/en/latest/pages/installation.html).
56
+ or see the docs for how to [build from source](https://jaxion.readthedocs.io/en/latest/pages/installation.html).
63
57
 
64
58
 
65
59
  ## Examples
@@ -99,6 +93,11 @@ Check out the [`examples/`](https://github.com/JaxionProject/jaxion/tree/main/ex
99
93
  </p>
100
94
 
101
95
 
96
+ ## Try it out!
97
+
98
+ Launch a live demo in Google Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JaxionProject/jaxion/blob/main/notebooks/soliton_binary_merger/soliton_binary_merger.ipynb)
99
+
100
+
102
101
  ## High-Performance
103
102
 
104
103
  Jaxion is scalable on multiple GPUs!
@@ -115,6 +114,12 @@ Jaxion is scalable on multiple GPUs!
115
114
  Jaxion welcomes community contributions of all kinds. Open an issue or fork the code and submit a pull request. Please check out the [Contributing Guidelines](CONTRIBUTING.md)
116
115
 
117
116
 
117
+ ## TODO/Wishlist
118
+
119
+ * cosmological initial condition generator
120
+ * add cosmological factors to gas evolution
121
+
122
+
118
123
  ## Links
119
124
 
120
125
  * [Code repository](https://github.com/JaxionProject/jaxion) on GitHub (this page).
@@ -129,10 +134,10 @@ If you use this software, please cite it as below.
129
134
  @software{Mocz_Jaxion_2025,
130
135
  author = {Mocz, Philip},
131
136
  doi = {10.5281/zenodo.17438467},
132
- month = oct,
137
+ month = dec,
133
138
  title = {{Jaxion}},
134
139
  url = {https://github.com/JaxionProject/jaxion},
135
- version = {0.0.4},
140
+ version = {0.0.9},
136
141
  year = {2025}
137
142
  }
138
143
  ```
@@ -0,0 +1,20 @@
1
+ from importlib.metadata import version, PackageNotFoundError
2
+
3
+ from .simulation import Simulation as Simulation
4
+ from .constants import constants as constants
5
+ from .analysis import radial_power_spectrum as radial_power_spectrum
6
+
7
+ """
8
+ jaxion: A JAX library for simulations of fuzzy dark matter, stars, gas + more!
9
+ """
10
+
11
+ try:
12
+ __version__ = version("jaxion")
13
+ except PackageNotFoundError:
14
+ __version__ = "unknown"
15
+
16
+ __all__ = [
17
+ "Simulation",
18
+ "constants",
19
+ "radial_power_spectrum",
20
+ ]
@@ -197,36 +197,42 @@ def slope_limiter(f, dx, f_dx, f_dy, f_dz):
197
197
  denom = adjust_denominator(orig_f_dx)
198
198
  num = (f - jnp.roll(f, 1, axis=0)) / dx
199
199
  ratio = num / denom
200
- limiter = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
201
- f_dx = limiter * f_dx
200
+ limiter_left = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
202
201
 
203
202
  num = -(f - jnp.roll(f, -1, axis=0)) / dx
204
203
  ratio = num / denom # Use the same adjusted denominator
205
- limiter = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
206
- f_dx = limiter * f_dx
204
+ limiter_right = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
205
+
206
+ # Take minimum of both limiters and apply to original slope
207
+ limiter = jnp.minimum(limiter_left, limiter_right)
208
+ f_dx = limiter * orig_f_dx
207
209
 
208
210
  # For y-direction
209
211
  denom = adjust_denominator(orig_f_dy)
210
212
  num = (f - jnp.roll(f, 1, axis=1)) / dx
211
213
  ratio = num / denom
212
- limiter = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
213
- f_dy = limiter * f_dy
214
+ limiter_left = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
214
215
 
215
216
  num = -(f - jnp.roll(f, -1, axis=1)) / dx
216
217
  ratio = num / denom
217
- limiter = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
218
- f_dy = limiter * f_dy
218
+ limiter_right = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
219
+
220
+ # Take minimum of both limiters and apply to original slope
221
+ limiter = jnp.minimum(limiter_left, limiter_right)
222
+ f_dy = limiter * orig_f_dy
219
223
 
220
224
  # For z-direction
221
225
  denom = adjust_denominator(orig_f_dz)
222
226
  num = (f - jnp.roll(f, 1, axis=2)) / dx
223
227
  ratio = num / denom
224
- limiter = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
225
- f_dz = limiter * f_dz
228
+ limiter_left = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
226
229
 
227
230
  num = -(f - jnp.roll(f, -1, axis=2)) / dx
228
231
  ratio = num / denom
229
- limiter = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
230
- f_dz = limiter * f_dz
232
+ limiter_right = jnp.maximum(0.0, jnp.minimum(1.0, ratio))
233
+
234
+ # Take minimum of both limiters and apply to original slope
235
+ limiter = jnp.minimum(limiter_left, limiter_right)
236
+ f_dz = limiter * orig_f_dz
231
237
 
232
238
  return f_dx, f_dy, f_dz
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaxion
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: A differentiable simulation library for fuzzy dark matter in JAX
5
5
  Author-email: Philip Mocz <philip.mocz@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -77,13 +77,7 @@ Install with:
77
77
  pip install jaxion
78
78
  ```
79
79
 
80
- or, for GPU support, use:
81
-
82
- ```console
83
- pip install jaxion[cuda12]
84
- ```
85
-
86
- See the docs for more info on how to [build from source](https://jaxion.readthedocs.io/en/latest/pages/installation.html).
80
+ or see the docs for how to [build from source](https://jaxion.readthedocs.io/en/latest/pages/installation.html).
87
81
 
88
82
 
89
83
  ## Examples
@@ -123,6 +117,11 @@ Check out the [`examples/`](https://github.com/JaxionProject/jaxion/tree/main/ex
123
117
  </p>
124
118
 
125
119
 
120
+ ## Try it out!
121
+
122
+ Launch a live demo in Google Colab: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JaxionProject/jaxion/blob/main/notebooks/soliton_binary_merger/soliton_binary_merger.ipynb)
123
+
124
+
126
125
  ## High-Performance
127
126
 
128
127
  Jaxion is scalable on multiple GPUs!
@@ -139,6 +138,12 @@ Jaxion is scalable on multiple GPUs!
139
138
  Jaxion welcomes community contributions of all kinds. Open an issue or fork the code and submit a pull request. Please check out the [Contributing Guidelines](CONTRIBUTING.md)
140
139
 
141
140
 
141
+ ## TODO/Wishlist
142
+
143
+ * cosmological initial condition generator
144
+ * add cosmological factors to gas evolution
145
+
146
+
142
147
  ## Links
143
148
 
144
149
  * [Code repository](https://github.com/JaxionProject/jaxion) on GitHub (this page).
@@ -153,10 +158,10 @@ If you use this software, please cite it as below.
153
158
  @software{Mocz_Jaxion_2025,
154
159
  author = {Mocz, Philip},
155
160
  doi = {10.5281/zenodo.17438467},
156
- month = oct,
161
+ month = dec,
157
162
  title = {{Jaxion}},
158
163
  url = {https://github.com/JaxionProject/jaxion},
159
- version = {0.0.4},
164
+ version = {0.0.9},
160
165
  year = {2025}
161
166
  }
162
167
  ```
@@ -10,7 +10,7 @@ license = "Apache-2.0"
10
10
  dynamic = ["version", "dependencies"]
11
11
 
12
12
  [tool.setuptools.packages.find]
13
- include = ["jaxio*"]
13
+ include = ["jaxion*"]
14
14
  exclude = ["paper"]
15
15
 
16
16
  [tool.setuptools.package-data]
@@ -1,3 +0,0 @@
1
- from .simulation import Simulation as Simulation
2
- from .constants import constants as constants
3
- from .analysis import radial_power_spectrum as radial_power_spectrum
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes