|
15 | 15 | },
|
16 | 16 | "outputs": [],
|
17 | 17 | "source": [
|
18 |
| - "from yt.config import ytcfg\n", |
19 |
| - "\n", |
20 | 18 | "import yt\n",
|
21 | 19 | "import numpy as np\n",
|
22 | 20 | "from yt.extensions.astro_analysis.ppv_cube.api import PPVCube\n",
|
|
125 | 123 | "name": "stderr",
|
126 | 124 | "output_type": "stream",
|
127 | 125 | "text": [
|
128 |
| - "yt : [INFO ] 2017-08-10 16:21:34,359 Parameters: current_time = 0.0\n", |
129 |
| - "yt : [INFO ] 2017-08-10 16:21:34,360 Parameters: domain_dimensions = [64 64 64]\n", |
130 |
| - "yt : [INFO ] 2017-08-10 16:21:34,362 Parameters: domain_left_edge = [-0.5 -0.5 -0.5]\n", |
131 |
| - "yt : [INFO ] 2017-08-10 16:21:34,363 Parameters: domain_right_edge = [ 0.5 0.5 0.5]\n", |
132 |
| - "yt : [INFO ] 2017-08-10 16:21:34,364 Parameters: cosmological_simulation = 0.0\n" |
| 126 | + "yt : [INFO ] 2023-10-02 09:48:06,889 Parameters: current_time = 0.0\n", |
| 127 | + "yt : [INFO ] 2023-10-02 09:48:06,891 Parameters: domain_dimensions = [64 64 64]\n", |
| 128 | + "yt : [INFO ] 2023-10-02 09:48:06,892 Parameters: domain_left_edge = [-0.5 -0.5 -0.5]\n", |
| 129 | + "yt : [INFO ] 2023-10-02 09:48:06,893 Parameters: domain_right_edge = [0.5 0.5 0.5]\n", |
| 130 | + "yt : [INFO ] 2023-10-02 09:48:06,894 Parameters: cosmological_simulation = 0\n" |
133 | 131 | ]
|
134 | 132 | }
|
135 | 133 | ],
|
|
153 | 151 | },
|
154 | 152 | {
|
155 | 153 | "cell_type": "code",
|
156 |
| - "execution_count": 5, |
| 154 | + "execution_count": 7, |
157 | 155 | "metadata": {
|
158 | 156 | "collapsed": false
|
159 | 157 | },
|
|
162 | 160 | "name": "stderr",
|
163 | 161 | "output_type": "stream",
|
164 | 162 | "text": [
|
165 |
| - "yt : [INFO ] 2017-08-10 16:21:34,863 xlim = -0.500000 0.500000\n", |
166 |
| - "yt : [INFO ] 2017-08-10 16:21:34,864 ylim = -0.500000 0.500000\n", |
167 |
| - "yt : [INFO ] 2017-08-10 16:21:34,866 xlim = -0.500000 0.500000\n", |
168 |
| - "yt : [INFO ] 2017-08-10 16:21:34,867 ylim = -0.500000 0.500000\n", |
169 |
| - "yt : [INFO ] 2017-08-10 16:21:34,875 Making a fixed resolution buffer of (('gas', 'density')) 800 by 800\n", |
170 |
| - "yt : [INFO ] 2017-08-10 16:21:34,885 Making a fixed resolution buffer of (('gas', 'velocity_x')) 800 by 800\n", |
171 |
| - "yt : [INFO ] 2017-08-10 16:21:34,893 Making a fixed resolution buffer of (('gas', 'velocity_y')) 800 by 800\n", |
172 |
| - "yt : [INFO ] 2017-08-10 16:21:34,899 Making a fixed resolution buffer of (('gas', 'velocity_magnitude')) 800 by 800\n", |
173 |
| - "yt : [WARNING ] 2017-08-10 16:21:34,920 Plot image for field ('gas', 'velocity_x') has both positive and negative values. Min = -16485822.496297, Max = 16485822.496296.\n", |
174 |
| - "yt : [WARNING ] 2017-08-10 16:21:34,921 Switching to symlog colorbar scaling unless linear scaling is specified later\n", |
175 |
| - "yt : [WARNING ] 2017-08-10 16:21:35,687 Plot image for field ('gas', 'velocity_y') has both positive and negative values. Min = -16485822.496296, Max = 16485822.496297.\n", |
176 |
| - "yt : [WARNING ] 2017-08-10 16:21:35,688 Switching to symlog colorbar scaling unless linear scaling is specified later\n" |
| 163 | + "yt : [INFO ] 2023-10-02 09:51:15,566 xlim = -0.500000 0.500000\n", |
| 164 | + "yt : [INFO ] 2023-10-02 09:51:15,567 ylim = -0.500000 0.500000\n", |
| 165 | + "yt : [INFO ] 2023-10-02 09:51:15,571 xlim = -0.500000 0.500000\n", |
| 166 | + "yt : [INFO ] 2023-10-02 09:51:15,573 ylim = -0.500000 0.500000\n", |
| 167 | + "yt : [INFO ] 2023-10-02 09:51:15,575 Making a fixed resolution buffer of (('gas', 'velocity_magnitude')) 800 by 800\n", |
| 168 | + "yt : [INFO ] 2023-10-02 09:51:15,795 Making a fixed resolution buffer of (('gas', 'density')) 800 by 800\n", |
| 169 | + "yt : [INFO ] 2023-10-02 09:51:16,011 Making a fixed resolution buffer of (('gas', 'velocity_y')) 800 by 800\n", |
| 170 | + "yt : [INFO ] 2023-10-02 09:51:16,235 Making a fixed resolution buffer of (('gas', 'velocity_x')) 800 by 800\n" |
177 | 171 | ]
|
178 | 172 | }
|
179 | 173 | ],
|
180 | 174 | "source": [
|
181 |
| - "slc = yt.SlicePlot(ds, \"z\", [\"density\",\"velocity_x\",\"velocity_y\",\"velocity_magnitude\"])" |
| 175 | + "slc = yt.SlicePlot(\n", |
| 176 | + " ds,\n", |
| 177 | + " \"z\",\n", |
| 178 | + " fields=[\n", |
| 179 | + " (\"gas\", \"density\"),\n", |
| 180 | + " (\"gas\", \"velocity_x\"),\n", |
| 181 | + " (\"gas\", \"velocity_y\"),\n", |
| 182 | + " (\"gas\", \"velocity_magnitude\"),\n", |
| 183 | + " ]\n", |
| 184 | + ")" |
182 | 185 | ]
|
183 | 186 | },
|
184 | 187 | {
|
185 | 188 | "cell_type": "code",
|
186 |
| - "execution_count": 6, |
| 189 | + "execution_count": 8, |
187 | 190 | "metadata": {
|
188 | 191 | "collapsed": false,
|
189 | 192 | "scrolled": false
|
|
203 | 206 | }
|
204 | 207 | ],
|
205 | 208 | "source": [
|
206 |
| - "slc.set_log(\"velocity_x\", False)\n", |
207 |
| - "slc.set_log(\"velocity_y\", False)\n", |
208 |
| - "slc.set_log(\"velocity_magnitude\", False)\n", |
209 |
| - "slc.set_unit(\"velocity_magnitude\", \"km/s\")\n", |
| 209 | + "slc.set_log((\"gas\", \"velocity_x\"), False)\n", |
| 210 | + "slc.set_log((\"gas\", \"velocity_y\"), False)\n", |
| 211 | + "slc.set_log((\"gas\", \"velocity_magnitude\"), False)\n", |
| 212 | + "slc.set_unit((\"gas\", \"velocity_magnitude\"), \"km/s\")\n", |
210 | 213 | "slc.show()"
|
211 | 214 | ]
|
212 | 215 | },
|
|
219 | 222 | },
|
220 | 223 | {
|
221 | 224 | "cell_type": "code",
|
222 |
| - "execution_count": 7, |
| 225 | + "execution_count": 9, |
223 | 226 | "metadata": {
|
224 | 227 | "collapsed": false
|
225 | 228 | },
|
|
238 | 241 | },
|
239 | 242 | {
|
240 | 243 | "cell_type": "code",
|
241 |
| - "execution_count": 8, |
| 244 | + "execution_count": 10, |
242 | 245 | "metadata": {
|
243 | 246 | "collapsed": false,
|
244 | 247 | "scrolled": true
|
|
265 | 268 | },
|
266 | 269 | {
|
267 | 270 | "cell_type": "code",
|
268 |
| - "execution_count": 9, |
| 271 | + "execution_count": 11, |
269 | 272 | "metadata": {
|
270 | 273 | "collapsed": false
|
271 | 274 | },
|
|
274 | 277 | "name": "stderr",
|
275 | 278 | "output_type": "stream",
|
276 | 279 | "text": [
|
277 |
| - "yt : [INFO ] 2017-08-10 16:21:43,375 Making a FITS image of field density\n", |
278 |
| - "yt : [WARNING ] 2017-08-10 16:21:43,389 update_all_headers is deprecated. Use update_header('all', key, value) instead.\n", |
279 |
| - "yt : [WARNING ] 2017-08-10 16:21:43,390 update_all_headers is deprecated. Use update_header('all', key, value) instead.\n", |
280 |
| - "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n" |
| 280 | + "yt : [INFO ] 2023-10-02 09:51:37,535 Making a FITS image of field density\n" |
281 | 281 | ]
|
282 | 282 | }
|
283 | 283 | ],
|
|
294 | 294 | },
|
295 | 295 | {
|
296 | 296 | "cell_type": "code",
|
297 |
| - "execution_count": 10, |
| 297 | + "execution_count": 12, |
298 | 298 | "metadata": {
|
299 | 299 | "collapsed": false
|
300 | 300 | },
|
301 |
| - "outputs": [ |
302 |
| - { |
303 |
| - "name": "stderr", |
304 |
| - "output_type": "stream", |
305 |
| - "text": [ |
306 |
| - "yt : [INFO ] 2017-08-10 16:21:43,619 Making a FITS image of field density\n", |
307 |
| - "yt : [WARNING ] 2017-08-10 16:21:43,629 update_all_headers is deprecated. Use update_header('all', key, value) instead.\n", |
308 |
| - "yt : [WARNING ] 2017-08-10 16:21:43,629 update_all_headers is deprecated. Use update_header('all', key, value) instead.\n", |
309 |
| - "WARNING: AstropyDeprecationWarning: \"clobber\" was deprecated in version 1.3 and will be removed in a future version. Use argument \"overwrite\" instead. [astropy.utils.decorators]\n" |
310 |
| - ] |
311 |
| - } |
312 |
| - ], |
| 301 | + "outputs": [], |
313 | 302 | "source": [
|
314 | 303 | "sky_scale = (1.0, \"arcsec/kpc\")\n",
|
315 | 304 | "sky_center = (30., 45.) # RA, Dec in degrees\n",
|
|
0 commit comments