Re: [yt-users] Subtracting datasets
Hi Matthew and Jonah, Firstly, thanks to Matt for the answer! Secondly, to add to the answer to Johah's question - without knowing the details, I've heard about "covering grid" in yt that interpolates the data from the existing grid hierarchy onto a uniform mesh. Perhaps someone else can elaborate. I already tried something like Matt suggested: ds1.index.grids[0][field] = ds1.index.grids[0][field] - ds2.index.grids[0][field] print ds1.index.grids[0][field] plot = SlicePlot(ds1, "y", field) It printed the modified values but SlicePlot didn't know about it. Some time ago I noticed that derived fields don't preserve the calculated values if they are being accessed more than once. I wonder if it is for the same reason. Best regards, --Boyan
Today's Topics (Digest, Vol 88, Issue 38, Jun 16, 2015, at 9:57)
1. Subtracting datasets (bh11e) 2. An error when using yt on PLUTO 4.1 (=?GBK?B?t72+/A==?=) 3. Re: Subtracting datasets (Matthew Turk) 4. Re: Subtracting datasets (Jonah Miller) 5. Re: Subtracting datasets (Matthew Turk) 6. Re: Subtracting datasets (Jonah Miller)
----------------------------------------------------------------------
Message: 1 Date: Tue, 16 Jun 2015 00:05:52 -0400 From: bh11e <bh11e@my.fsu.edu> To: <yt-users@lists.spacepope.org> Subject: [yt-users] Subtracting datasets Message-ID: <D0CA8853-F36E-4FA8-815C-93676BF4E6EC@my.fsu.edu> Content-Type: text/plain; charset="us-ascii"
Hi,
I was wondering if someone could advise on the following problem. Consider two (Enzo) datasets with identical grids. What is the way to plot the difference between a field in one set and a field in the other. Alternatively is there a way to create a new dataset with the calculated difference, after which plotting will be as usual.
Thanks,
--Boyan Hristov
------------------------------
Message: 2 Date: Tue, 16 Jun 2015 20:57:22 +0800 From: "=?GBK?B?t72+/A==?=" <fangjun@ynu.edu.cn> To: yt-users@lists.spacepope.org Subject: [yt-users] An error when using yt on PLUTO 4.1 Message-ID: <15061620572294f6197f024e15786d70ba0f25fa12a9@ynu.edu.cn> Content-Type: text/plain; charset="gbk"
Dear everyone, I recently used yt to plot the slice files for the hdf5 file from PLUTO 4.1. An error exists when ploting, i.e., [('chombo', 'rho'), ('chombo', 'vx1'), ('chombo', 'vx2'), ('chombo', 'vx3'), ('chombo', 'prs')] Traceback (most recent call last): File "simple_slice.py", line 18, in <module> p = yt.ProjectionPlot(ds, "y", "density") File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 1227, in __init__ field_parameters = field_parameters, method = method) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 250, in __init__ self.get_data(field) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/construction_data_containers.py", line 295, in get_data chunk_fields, "io", local_only = True)): File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 506, in parallel_objects for obj_id, obj in oiter: File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 592, in chunks self.get_data(fields) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 681, in get_data fluids, self, self._current_chunk) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/geometry/geometry_handler.py", line 252, in _read_fluid_fields chunk_size) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/io.py", line 147, in _read_fluid_selection data = self._read_data(g, fname) File "/home/fangjun/yt/yt-x86_64/src/yt-hg/yt/frontends/chombo/io.py", line 104, in _read_data shape = grid.ActiveDimensions + 2*self.ghost
AttributeError: 'IOHandlerPlutoHDF5' object has no attribute 'ghost'
Could you give some instructions on it? Best wishes, Jun
participants (1)
-
bh11e