Hi all,
Does anybody know how exactly projections work with field parameters? Suppose I have a field called "ProjectedVelocity" that takes a field parameter "axis" that chooses between the velocity components depending on the axis of projection.
The code goes like this:
proj = pf.h.proj(axis, "ProjectedVelocity", weight_field="DensitySquared")
proj.set_field_parameter("axis", axis)
But it looks like this field is being projected before the field parameter is set. Will I get the correct …
[View More]behavior when I do something later with the proj object, like generate an FRB?
Best,
John Z
[View Less]
Hi guys,
Is it possible to perform multiple projections with just one pf.h.proj (even with different weights)?
I am currently doing something like:
proj1 = pf.h.proj(axis, "Temperature", weight1)
proj2 = pf.h.proj(axis, "Density", weight2)
proj3 ....
frb1 = FixedResolutionBuffer(proj1, (xmin, xmax, zmin, zmax), res)
frb2 = FixedResolutionBuffer(proj2, (xmin, xmax, zmin, zmax), res)
frb3 ....
This way yt recomputes projections for each variable, which is obviously slow. Is it the only …
[View More]way?
I have also a doubt on FixedResolutionBuffer. Is this always necessary after projection in order to access the data? Or can I access the data projected via pf.h.proj even without resampling?
Thank you as always.
Cheers,
Max
[View Less]
I am trying to make projections and slices in the same script and an
iterating over several DD datasets, but after a while I get this error
pasted below, it seems that there's some hdf5 error where h5py cannot open
a file. I've made sure the file exists and the script continues to run if
I change the DD#### to continue where it failed. I've already modified the
script so that each DD is using a new python instace intead of iterating
through the files with one python call. I tried this in …
[View More]queue and
interactive and get the same error, sometimes after many DD, but sometimes
after only 1 or 2. Is this indicative of memory issue? If it is, I'm not
getting the OOM messages even in interactive node. Has anyone encountered
this before? I've stuck in import gc at the top and gc.collect() at the
end of the script, too, but doesn't help.
From
G.S.
Traceback (most recent call last):
File "moviesGrey.py", line 35, in <module>
proj = pf.h.proj(0, field, weight_field=field)
File
"/home/ux455076/dev-yt/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.egg/yt/data_objects/data_containers.py",
line 2001, in __init__
if self._okay_to_serialize and self.serialize:
self._serialize(node_name=self._node_name)
File
"/home/ux455076/dev-yt/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.egg/yt/data_objects/data_containers.py",
line 970, in _serialize
self._store_fields(self._key_fields, node_name, force)
File
"/home/ux455076/dev-yt/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.egg/yt/data_objects/data_containers.py",
line 947, in _store_fields
passthrough = True)
File
"/home/ux455076/dev-yt/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.egg/yt/utilities/parallel_tools/parallel_analysis_interface.py",
line 241, in in_order
f2(*args, **kwargs)
File
"/home/ux455076/dev-yt/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.egg/yt/data_objects/hierarchy.py",
line 278, in _reload_data_file
self._data_file = h5py.File(self.__data_filename, self._data_mode)
File
"/home/ux455076/dev-yt/lib/python2.7/site-packages/h5py/_hl/files.py", line
150, in __init__
fid = make_fid(name, mode, fapl)
File
"/home/ux455076/dev-yt/lib/python2.7/site-packages/h5py/_hl/files.py", line
45, in make_fid
fid = h5f.open(name, h5f.ACC_RDONLY, fapl=plist)
File "h5f.pyx", line 70, in h5py.h5f.open (h5py/h5f.c:1618)
IOError: unable to open file (File accessability: Unable to open file)
Exception AttributeError: "'EnzoHierarchy' object has no attribute
'_data_file'" in <bound method EnzoHierarchy.__del__ of
<yt.frontends.enzo.data_structures.EnzoHierarchy object at 0x32a4d10>>
ignored
[View Less]
Hello,
I am having trouble using a derived field with a CoveringGrid. I am making
fields for dPhi/dx, dPhi/dy, dPhi/dz using the PotentialField from ENZO.
The derivative fields do not get passed into the CoveringGrid and get
recalculated. This leads to the derivative being zero in areas that were
originally in coarse cells.
Density and DivV fields were passed to the CoveringGrid properly. As a test
I defined a field that was Density^2 and that was passed to the
CoveringGrid properly, so I …
[View More]think it is a problem specific to derived
fields based on the ENZO-specific PotentialField. I have included the
source for my derivative functions.
Thank you,
Nathan Butcher
[View Less]