Thanks for the suggestions Stephen and Matt,
Stephen, * I fixed up the dim so that it now take into account the possibility of different root grid tile dimensions, in cases when it is not a cube. * Edited/added more comments. * I tried my scatter3D.py and it works on my laptop with python 2.7, has anyone else tried?
Matt, 1) I just put the calculation in the subsection of AMREllipsoidBase and deleted the _InEllipsoid derived field. 2) * I think I would leave it as the e1,2,3 basis vectors for now, because the way I am doing the Ellipsoid profiling from the Halo profiles, I don't use rotations of any kind, so everything is done vector wise, and the results from that will be fed into the ellipsoid object, so at least it would be easier for me to use e1,2,3. * For an arbitrarily aligned orthogonal basis vector set, I think you'll need 3 rotations to align it to another generic orthogonal basis vector set, so only Phi and Theta would be insufficient. * However, I would only need to record e1, and e2, and just calculate e3 (e1 cross e2) on the fly at the start of the calculation. Should I just record e1 and e2 or leave it in the file, saves some space...?
A few questions:
after defining the ellipsoid "ell" ell.quantities["TotalQuantity"]("CellMassMsun") works fine, but when I change CellMassMsun to ParticleMassMsun, I get the following errors, Traceback pasted to http://paste.enzotools.org/show/iZ1Ww36ZLFob49xWBfU1 Is that a bug in my code? I am not quite sure how to fix it.
Ultimately I'd want to analyze the DM and star particles in the ellipsoid separately, do I just use the derived field and particle ages to do that once the previous problem is solved?
Other than Stephen's issue, I have two suggestions then I am +1 for merging.
- Remove the InEllipsoid field and put that code directly into the
masking routine. 2) Minimally define the Ellipse -- right now it's a bit over-defined, in that you have all three unit vectors and all three axis lengths. Maybe A,B,C,theta,phi?
This will be a great addition. And, I don't think I've said this yet, but congrats on your first commit to yt! Thanks very much.
On Tue, May 10, 2011 at 2:54 PM, Stephen Skory email@example.com wrote:
To get the ellipsoid changeset you can visit: https://bitbucket.org/gsiisg/yt/compare/default..yt_analysis/yt
I scanned this and I didn't see anything glaringly wrong. You might want to change the comment block below class AMREllipsoidBase(AMR3DData) to match an ellipsoid ;). Anyway, very good work!
I did run your scripts, and I ran into a couple issues. First, in _InEllipsoid, I had to make this change to avoid a crash:
diff -r 676c7f17fb97 yt/data_objects/universal_fields.py --- a/yt/data_objects/universal_fields.py Mon May 09 20:46:16 2011 -0700 +++ b/yt/data_objects/universal_fields.py Tue May 10 15:52:39 2011 -0600 @@ -944,7 +944,7 @@ # allocate array to be filled with results from eqn of ellipsoid Inside = na.zeros(data["x"].shape, dtype='float64') # find the dimension length of the grid
- dim = shape(data["x"])
- dim = data["x"].shape
# allocate array for the dot product with the 3 e_vectors # need to take into account different grid side sizes dot_evec = na.zeros([3,dim,dim,dim])
Second, I didn't see anything in the test3D.png image... I haven't looked into why, but the 2D image looked encouraging!
Again, good work!
-- Stephen Skory firstname.lastname@example.org http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ Yt-dev mailing list Ytemail@example.com http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Ytfirstname.lastname@example.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org