
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie

Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24, "DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi John,
Thanks for this. So I now have this in, and it is being applied to my SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using code units. There is an excerpt below.
pf =
load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6})
pc = PlotCollection(pf) tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25",
"grid['z'] > 0.01"])
pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
Can I force it to use physical units?
Thanks, Stephanei
On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone jzuhone@gmail.com wrote:
Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24,
"DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in
my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot
or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi Stephanie,
First off, if I recall correctly we only support setting LengthUnits, DensityUnits, and TimeUnits. Everything else (such as mass, velocity, energy, etc.) should be derived from those.
Secondly, the reason why you're seeing this for the grid "z" is that it always defaults to the code units (as well as "x" and "y", and the cell deltas). I don't think we have a built-in field for "z" in centimeters (or anything else other than code units), so I think you might have to define a field on your own for "z" in whatever units you want.
Anyone else want to chime in?
Best,
John
On Oct 22, 2013, at 11:31 AM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi John,
Thanks for this. So I now have this in, and it is being applied to my SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using code units. There is an excerpt below.
pf = load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6}) pc = PlotCollection(pf) tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25", "grid['z'] > 0.01"]) pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
Can I force it to use physical units?
Thanks, Stephanei
On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone jzuhone@gmail.com wrote: Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24, "DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Yes, velocity_z is in code units as well because it's an athena field. You'll need to define a new x-velocity field (to match the naming scheme elsewhere in yt) that converts the athena velocity field to CGS.
This is all being fixed with our new sympy powered units system and will be much easier in yt 3.0 or 3.1 (whichever version gets the new units support).
-Nathan
On Tue, Oct 22, 2013 at 9:23 AM, John ZuHone jzuhone@gmail.com wrote:
Hi Stephanie,
First off, if I recall correctly we only support setting LengthUnits, DensityUnits, and TimeUnits. Everything else (such as mass, velocity, energy, etc.) should be derived from those.
Secondly, the reason why you're seeing this for the grid "z" is that it always defaults to the code units (as well as "x" and "y", and the cell deltas). I don't think we have a built-in field for "z" in centimeters (or anything else other than code units), so I think you might have to define a field on your own for "z" in whatever units you want.
Anyone else want to chime in?
Best,
John
On Oct 22, 2013, at 11:31 AM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi John,
Thanks for this. So I now have this in, and it is being applied to my SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using code units. There is an excerpt below.
pf =
load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6})
pc = PlotCollection(pf) tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25",
"grid['z'] > 0.01"])
pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
Can I force it to use physical units?
Thanks, Stephanei
On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone jzuhone@gmail.com wrote:
Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24,
"DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in
my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot,
ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

But, "z-velocity" is a defined derived field in the Athena frontend, and should give it in CGS units.
On Oct 22, 2013, at 12:32 PM, Nathan Goldbaum nathan12343@gmail.com wrote:
Yes, velocity_z is in code units as well because it's an athena field. You'll need to define a new x-velocity field (to match the naming scheme elsewhere in yt) that converts the athena velocity field to CGS.
This is all being fixed with our new sympy powered units system and will be much easier in yt 3.0 or 3.1 (whichever version gets the new units support).
-Nathan
On Tue, Oct 22, 2013 at 9:23 AM, John ZuHone jzuhone@gmail.com wrote: Hi Stephanie,
First off, if I recall correctly we only support setting LengthUnits, DensityUnits, and TimeUnits. Everything else (such as mass, velocity, energy, etc.) should be derived from those.
Secondly, the reason why you're seeing this for the grid "z" is that it always defaults to the code units (as well as "x" and "y", and the cell deltas). I don't think we have a built-in field for "z" in centimeters (or anything else other than code units), so I think you might have to define a field on your own for "z" in whatever units you want.
Anyone else want to chime in?
Best,
John
On Oct 22, 2013, at 11:31 AM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi John,
Thanks for this. So I now have this in, and it is being applied to my SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using code units. There is an excerpt below.
pf = load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6}) pc = PlotCollection(pf) tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25", "grid['z'] > 0.01"]) pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
Can I force it to use physical units?
Thanks, Stephanei
On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone jzuhone@gmail.com wrote: Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24, "DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Ah, sorry for the misinformation!
On Tue, Oct 22, 2013 at 9:36 AM, John ZuHone jzuhone@gmail.com wrote:
But, "z-velocity" is a defined derived field in the Athena frontend, and should give it in CGS units.
On Oct 22, 2013, at 12:32 PM, Nathan Goldbaum nathan12343@gmail.com wrote:
Yes, velocity_z is in code units as well because it's an athena field. You'll need to define a new x-velocity field (to match the naming scheme elsewhere in yt) that converts the athena velocity field to CGS.
This is all being fixed with our new sympy powered units system and will be much easier in yt 3.0 or 3.1 (whichever version gets the new units support).
-Nathan
On Tue, Oct 22, 2013 at 9:23 AM, John ZuHone jzuhone@gmail.com wrote:
Hi Stephanie,
First off, if I recall correctly we only support setting LengthUnits, DensityUnits, and TimeUnits. Everything else (such as mass, velocity, energy, etc.) should be derived from those.
Secondly, the reason why you're seeing this for the grid "z" is that it always defaults to the code units (as well as "x" and "y", and the cell deltas). I don't think we have a built-in field for "z" in centimeters (or anything else other than code units), so I think you might have to define a field on your own for "z" in whatever units you want.
Anyone else want to chime in?
Best,
John
On Oct 22, 2013, at 11:31 AM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi John,
Thanks for this. So I now have this in, and it is being applied to my SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using code units. There is an excerpt below.
pf =
load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6})
pc = PlotCollection(pf) tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25",
"grid['z'] > 0.01"])
pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
Can I force it to use physical units?
Thanks, Stephanei
On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone jzuhone@gmail.com wrote:
Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24,
"DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in
my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot,
ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

No worries--it just points to the importance of getting these things documented soon.
On Oct 22, 2013, at 12:39 PM, Nathan Goldbaum nathan12343@gmail.com wrote:
Ah, sorry for the misinformation!
On Tue, Oct 22, 2013 at 9:36 AM, John ZuHone jzuhone@gmail.com wrote: But, "z-velocity" is a defined derived field in the Athena frontend, and should give it in CGS units.
On Oct 22, 2013, at 12:32 PM, Nathan Goldbaum nathan12343@gmail.com wrote:
Yes, velocity_z is in code units as well because it's an athena field. You'll need to define a new x-velocity field (to match the naming scheme elsewhere in yt) that converts the athena velocity field to CGS.
This is all being fixed with our new sympy powered units system and will be much easier in yt 3.0 or 3.1 (whichever version gets the new units support).
-Nathan
On Tue, Oct 22, 2013 at 9:23 AM, John ZuHone jzuhone@gmail.com wrote: Hi Stephanie,
First off, if I recall correctly we only support setting LengthUnits, DensityUnits, and TimeUnits. Everything else (such as mass, velocity, energy, etc.) should be derived from those.
Secondly, the reason why you're seeing this for the grid "z" is that it always defaults to the code units (as well as "x" and "y", and the cell deltas). I don't think we have a built-in field for "z" in centimeters (or anything else other than code units), so I think you might have to define a field on your own for "z" in whatever units you want.
Anyone else want to chime in?
Best,
John
On Oct 22, 2013, at 11:31 AM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi John,
Thanks for this. So I now have this in, and it is being applied to my SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using code units. There is an excerpt below.
pf = load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6}) pc = PlotCollection(pf) tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25", "grid['z'] > 0.01"]) pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
Can I force it to use physical units?
Thanks, Stephanei
On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone jzuhone@gmail.com wrote: Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24, "DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Thanks for all the tips/info, I got what I wanted using "z-velocity" and defining my own variable "zkpc".
-Stephanie
On Tue, Oct 22, 2013 at 12:41 PM, John ZuHone jzuhone@gmail.com wrote:
No worries--it just points to the importance of getting these things documented soon.
On Oct 22, 2013, at 12:39 PM, Nathan Goldbaum nathan12343@gmail.com wrote:
Ah, sorry for the misinformation!
On Tue, Oct 22, 2013 at 9:36 AM, John ZuHone jzuhone@gmail.com wrote:
But, "z-velocity" is a defined derived field in the Athena frontend, and should give it in CGS units.
On Oct 22, 2013, at 12:32 PM, Nathan Goldbaum nathan12343@gmail.com wrote:
Yes, velocity_z is in code units as well because it's an athena field. You'll need to define a new x-velocity field (to match the naming scheme elsewhere in yt) that converts the athena velocity field to CGS.
This is all being fixed with our new sympy powered units system and will be much easier in yt 3.0 or 3.1 (whichever version gets the new units support).
-Nathan
On Tue, Oct 22, 2013 at 9:23 AM, John ZuHone jzuhone@gmail.com wrote:
Hi Stephanie,
First off, if I recall correctly we only support setting LengthUnits, DensityUnits, and TimeUnits. Everything else (such as mass, velocity, energy, etc.) should be derived from those.
Secondly, the reason why you're seeing this for the grid "z" is that it always defaults to the code units (as well as "x" and "y", and the cell deltas). I don't think we have a built-in field for "z" in centimeters (or anything else other than code units), so I think you might have to define a field on your own for "z" in whatever units you want.
Anyone else want to chime in?
Best,
John
On Oct 22, 2013, at 11:31 AM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi John,
Thanks for this. So I now have this in, and it is being applied to my SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using code units. There is an excerpt below.
pf =
load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6})
pc = PlotCollection(pf) tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25",
"grid['z'] > 0.01"])
pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
Can I force it to use physical units?
Thanks, Stephanei
On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone jzuhone@gmail.com wrote:
Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24,
"DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of
in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot,
ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi Stephanie,
First off, if I recall correctly we only support setting LengthUnits, DensityUnits, and TimeUnits. Everything else (such as mass, velocity, energy, etc.) should be derived from those.
Secondly, the reason why you're seeing this for the grid "z" is that it always defaults to the code units (as well as "x" and "y", and the cell deltas). I don't think we have a built-in field for "z" in centimeters (or anything else other than code units), so I think you might have to define a field on your own for "z" in whatever units you want.
Anyone else want to chime in?
Best,
John
On Oct 22, 2013, at 11:31 AM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi John,
Thanks for this. So I now have this in, and it is being applied to my SlicePlot and ProjectionPlot, but my pc.add_phase_object is still using code units. There is an excerpt below.
pf = load("id0/rps."+outstring[i]+".vtk",parameters={"TimeUnits":9.78262,"LengthUnits":26.,"DensityUnits":9.999e-30,"VelocityUnits":2.6e3,"MassUnits":2.596e6}) pc = PlotCollection(pf) tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.25", "grid['z'] > 0.01"]) pc.add_phase_object(tracerp25,["z","velocity_z","CellMass"],weight=None,x_log=False,y_log=False)
Can I force it to use physical units?
Thanks, Stephanei
On Mon, Oct 21, 2013 at 10:24 PM, John ZuHone jzuhone@gmail.com wrote: Stephanie,
You can set it up like this:
pf = load("virgo_weak_mag.0054.vtk", parameters={"TimeUnits":3.1557e13, "LengthUnits":3.0856e24, "DensityUnits":6.770424595218825e-27})
Sorry, this is a little-documented feature.
Best,
John
On Oct 21, 2013, at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

I am now looking at a few more variables, and am not sure whether I should be getting code units or physical units. In the Athena vtk file, Pressure is one of the variables--will this be plotted in code units or will yt attempt to give me physical units since I am inputting some physical unit conversions in the load command? Also , is "BMagnitude" in code units? I am loading my data using the command:
pf = load("id0/rps."+outstring[i]+" .vtk",parameters={"TimeUnits":9.78262,"LengthUnits":8.0236e22,"DensityUnits":9.999e-30})
Thanks!
Stephanie
On Mon, Oct 21, 2013 at 10:20 PM, Stephanie Tonnesen stonnes@gmail.comwrote:
Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie

Hi Stephanie,
In general, fields with the normal Athena names will be in code units, whereas the yt names will always be in cgs.
Roughly, it goes like this:
Density = cgs, density = code units Pressure = cgs, pressure = code units B[xyz] = cgs, cell_centered_B_[xyz] = code units [xyz]-velocity = cgs, velocity_[xyz] = code units momentum_[xyz] = code units
Note that the names are case-sensitive. Now, in yt-3.0 we will be adopting a different set of field names, but for now this should be good.
Best,
John
Sent from John ZuHone's iPad
On Nov 21, 2013, at 8:43 PM, Stephanie Tonnesen stonnes@gmail.com wrote:
I am now looking at a few more variables, and am not sure whether I should be getting code units or physical units. In the Athena vtk file, Pressure is one of the variables--will this be plotted in code units or will yt attempt to give me physical units since I am inputting some physical unit conversions in the load command? Also , is "BMagnitude" in code units? I am loading my data using the command:
pf = load("id0/rps."+outstring[i]+" .vtk",parameters={"TimeUnits":9.78262,"LengthUnits":8.0236e22,"DensityUnits":9.999e-30})
Thanks!
Stephanie
On Mon, Oct 21, 2013 at 10:20 PM, Stephanie Tonnesen stonnes@gmail.com wrote: Hi Again, Everyone!
So I would also like my figures to be in physical units, instead of in my code units. I *think* the Athena frontend doesn't read in what the unit conversions are (and I am not sure how it would do that). Can I just do something simple like:
DensityUnits = 3. density_physunits = grid['density'] * DensityUnits
Then, of course, I don't know how I would do a SlicePlot, ProjectionPlot or phaseplot in physical units...
Any help/advice/direction is appreciated!
Thanks, Stephanie
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
John ZuHone
-
Nathan Goldbaum
-
Stephanie Tonnesen