[yt-users] HopAnalysis.out velocity units
Matthew Turk
matthewturk at gmail.com
Sat Nov 28 10:28:27 PST 2009
Hi Shankar,
It's in cm/s.
-Matt
On Nov 28, 2009, at 10:11 AM, "Agarwal, Shankar" <sagarwal at ku.edu>
wrote:
> Hey Matt, Never mind. I can live with that. By the way, here is the
> first few lines from HopAnalysis.out
>
>
> # HALOS FOUND WITH HOP
> # Group Mass # part max densx y z center-of-mass x y
> z vx vy vz max_r
> 0 1.009603589e+15 3202 6.803410660e+03
> 2.691574395e-01 1.892197430e-01 8.293117285e-01 2.701045173e-01
> 1.889703433e-01 8.276973165e-01 -6.232934392e+06 -2.872425257e+07
> 1.526929994e+06 1.886896417e-02
>
>
> Here, vx=-6.232934392e+06
> vy=-2.872425257e+07
> vz= 1.526929994e+06
>
>
> http://yt.enzotools.org/doc/extensions/running_halofinder.html says
> that "the velocity of the center of mass of the halo is in
> simulation units."
>
> And I found this in the RedshiftOutput0002 file...
>
> DataLabel[3] = x-velocity
> DataUnits[3] = none
> #DataCGSConversionFactor[3] = 5.70277e+09
> DataLabel[4] = y-velocity
> DataUnits[4] = none
> #DataCGSConversionFactor[4] = 5.70277e+09
> DataLabel[5] = z-velocity
> DataUnits[5] = none
> #DataCGSConversionFactor[5] = 5.70277e+09
>
>
> The factor of 5.70277e+09 when MULTIPLIED with the simulation
> velocities is supposed to convert them into cm/sec. I have checked
> this to be correct against the particle-velocity dump by Enzo.
>
> But the Hop velocities above are weird. I have no idea how to
> incorporate 5.70277e+09 with vx,vy,vz above.
>
> I tried... print lagos.fieldInfo["velocity"].units
> but got... KeyError: 'velocity'
>
>
> shankar
>
>
>
>
>
>
> -----Original Message-----
> From: yt-users-bounces at lists.spacepope.org on behalf of Matthew Turk
> Sent: Sat 11/28/2009 11:29 AM
> To: Discussion of the yt analysis package
> Subject: Re: [yt-users] Is pc.add_projection("Density",ax) a valid
> statement ?
>
> Hi Shankar,
>
> I'm afraid this error is new to me. The projection unable to find a
> field generated by the projection itself, which I've never seen
> before. The code you pasted works for me.
>
> There are two things I can think of to try:
>
> 1. delete any *.yt files you can find in the directory
> 2. change "pc.save(fn)" to "pc.save()"
>
> Other than that, I'm afraid I'm at a loss. Changing "0" to "ax"
> should not have this impact... Sorry!
>
> -Matt
>
> On Thu, Nov 26, 2009 at 12:06 PM, Agarwal, Shankar <sagarwal at ku.edu>
> wrote:
>> Hi Matt,
>>
>> Here is the error message...
>>
>> yt.lagos  INFO    2009-11-26 14:57:00,795 No HDF4 support
>> /home/ba01/u118/agarwa23/enzo1/src/yt/doc/yt-x86_64/lib/python2.6/
>> site-packages/IPython/Magic.py:38: DeprecationWarning: the sets
>> module is deprecated
>> Â from sets import Set
>> yt     INFO    2009-11-26 14:58:34,533 Skipping
>> serialization!
>> yt     INFO    2009-11-26 14:58:34,534 Caching
>> hierarchy information
>> yt     INFO    2009-11-26 14:58:34,615 Getting
>> field ParticleMassMsun from 8
>> yt     INFO    2009-11-26 14:58:45,462 Getting
>> field particle_position_x from 8
>> yt     INFO    2009-11-26 14:58:49,431 Getting
>> field particle_position_y from 8
>> yt     INFO    2009-11-26 14:58:52,990 Getting
>> field particle_position_z from 8
>> yt     INFO    2009-11-26 14:58:56,095 Getting
>> field ParticleMassMsun from 8
>> yt     INFO    2009-11-26 14:58:58,251
>> Initializing HOP
>> yt     WARNING   2009-11-26 14:58:58,251 No
>> particle_type, no creation_time, so not distinguishing.
>> Calling hop... 2097152 1.600e+02
>> nSmooth = 65 kd->nActive = 2097152
>> Calling regroup...
>> No minimum group size specified. Â Assuming 10 particles.
>> ngroups = 6345
>> yt     INFO    2009-11-26 15:00:01,907 Parsing
>> outputs
>> yt     INFO    2009-11-26 15:00:02,334 Getting
>> field particle_velocity_x from 8
>> yt     INFO    2009-11-26 15:00:09,888 Getting
>> field particle_velocity_y from 8
>> yt     INFO    2009-11-26 15:00:15,740 Getting
>> field particle_velocity_z from 8
>> yt     INFO    2009-11-26 15:00:22,477 Created
>> plot collection with default plot-center = [0.5, 0.5, 0.5]
>> Traceback (most recent call last):
>> Â File "hop_yt.py", line 20, in <module>
>> Â Â p = pc.add_projection("Density", ax)
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/raven/PlotCollecti
>> on.py", line 262, in add_projection
>> Â Â return self._add_projection(PlotTypes.ProjectionPlot, *args,
>> **kwargs)
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/raven/PlotCollecti
>> on.py", line 285, in _add_projection
>> Â Â center=center, **kwargs)
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/BaseDataType
>> s.py", line 952, in __init__
>> Â Â if self._okay_to_serialize and self.serialize: self._serializ
>> e(node_name=self._node_name)
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/BaseDataType
>> s.py", line 630, in _serialize
>> Â Â self._store_fields(self._key_fields, node_name, force)
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/BaseDataType
>> s.py", line 605, in _store_fields
>> Â Â self.hierarchy.save_data(self[field], node_name,
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/BaseDataType
>> s.py", line 199, in __getitem__
>> Â Â self.get_data(key)
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/BaseDataType
>> s.py", line 1135, in get_data
>> Â Â self._get_dependencies(fields), self.hierarchy.queue)
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/ParallelTool
>> s.py", line 418, in _get_dependencies
>> Â Â deps += ensure_list(fi[field].get_dependencies(pf=self.pf).re
>> quested)
>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/lagos/FieldInfoCon
>> tainer.py", line 97, in __getitem__
>> Â Â raise KeyError(key)
>> KeyError: 'py'
>>
>>
>> And here is the code...
>>
>> from yt.mods import *
>> fn = "RedshiftOutput0002"
>> pf = load(fn)
>> halos = HaloFinder(pf)
>> halos.write_out("HopAnalysis.out")
>> pc = PlotCollection(pf,center=[0.5,0.5,0.5])
>> for ax in range(3):
>> Â Â p = pc.add_projection("Density", ax)
>> Â Â p.modify["hop_circles"](halos, max_number=None, annotate=True
>> , min_size=400, max_size=100000, font_size=8, print_halo_size=True
>> , print_halo_mass=True, width=None)
>> pc.save(fn)
>>
>>
>>
>> shankar
>>
>>
>> -----Original Message-----
>> From: yt-users-bounces at lists.spacepope.org on behalf of Matthew Turk
>> Sent: Thu 11/26/2009 1:54 PM
>> To: Discussion of the yt analysis package
>> Subject: Re: [yt-users] Is pc.add_projection("Density",ax) a valid
>> statement ?
>>
>> Hi Shankar,
>>
>> The code looks okay to me. Can you please send the whole error
>> message
>> or run with --paste so that we can see what is going wrong? The
>> traceback seems truncated.
>>
>> Does it work without the hop circles?
>>
>> -Matt
>>
>>
>>
>> On Nov 26, 2009, at 10:57 AM, "Agarwal, Shankar" <sagarwal at ku.edu>
>> wrote:
>>
>>> Hi, In the following code, I am getting an error when I use
>>> pc.add_projection("Density", ax). But If I specifically use
>>> pc.add_projection("Density", 0) then it runs fine. Any idea ?
>>>
>>>
>>> Code...
>>>
>>> from yt.mods import *
>>> pf = load("RedshiftOutput0002")
>>> pc = PlotCollection(pf)
>>> for ax in range(3):
>>> Â Â p = pc.add_projection("Density", ax)
>>> Â Â p.modify["hop_circles"](halos, max_number=None, annotate=T
>>> rue,
>>> min_size=0, max_size=100000000, font_size=8, print_halo_size=True,
>>> print_halo_mass=True, width=None)
>>> pc.save()
>>>
>>>
>>>
>>> Error....
>>>
>>> Traceback (most recent call last):
>>> Â File "hop_yt.py", line 20, in <module>
>>> Â Â p = pc.add_projection("Density", ax)
>>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/raven/
>>> PlotCollection.py", line 262, in add_projection
>>> Â Â return self._add_projection(PlotTypes.ProjectionPlot, *args,
>>> **kwargs)
>>> Â File "/autohome/u118/agarwa23/enzo1/src/yt/yt/raven/
>>> PlotCollection.py", line 285, in _add_projection
>>> Â Â center=center, **kwargs)
>>>
>>>
>>> Shankar
>>> KU cosmology
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
> <winmail.dat>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
More information about the yt-users
mailing list