Commits

Matthew Turk committed faafc37

Volume rendering script & slide

Comments (0)

Files changed (4)

scripts/popiii_offaxis.py

+from yt.mods import *
+
+pf = load("DD0087/DD0087")
+v, c = pf.h.find_max("Density")
+
+sp = pf.h.sphere("max", (1000.0, 'au'))
+L = sp.quantities["AngularMomentumVector"]()
+
+image = off_axis_projection(pf, c, L, 1000.0/pf['au'],
+        1024, "Density", "Density")
+write_image(na.log10(image), "DD0087_offaxis.png")

scripts/popiii_proj.py

+from yt.mods import *
+
+pf = load("DD0087/DD0087")
+v, c = pf.h.find_max("Density")
+pc = PlotCollection(pf, c)
+pc.add_projection("Density", 0, "Density")
+pc.set_width(1000.0, 'au')
+pc.save()

scripts/volume_rendering_ptf.py

+from yt.mods import *
+pf = load("DD0087/DD0087")
+v, c = pf.h.find_max("Density")
+sp = pf.h.sphere(c, (250, 'au'))
+L = sp.quantities["AngularMomentumVector"]()
+
+tf = ColorTransferFunction((1e-14, 1e-10))
+tf.add_layers(6, colormap="kamae", w=0.001)
+
+cam = pf.h.camera(c, L, 200.0/pf['au'], (512, 512), tf)
+cam.snapshot("DD0087_isocontour.png", 4.0) # clip by 4.0 * std()
 \fullimage{DD0087_Profile2D_0_Density_Temperature_MagneticEnergy.png}
 \fullimage{DD0087_Profile2D_1_Density_Temperature_CellMassMsun.png}
 
+\bigsimple{Advanced Plots}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/popiii_proj.py|fn|pyg|l']>>
+\hline
+<<d['scripts/popiii_proj.py|fn|py|pyg|l']>>
+\end{frame}
+\fullimage{DD0087_Projection_x_Density_Density.png}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/popiii_offaxis.py|fn|pyg|l']>>
+\hline
+<<d['scripts/popiii_offaxis.py|fn|py|pyg|l']>>
+\end{frame}
+\fullimage{DD0087_offaxis.png}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/volume_rendering_ptf.py|fn|pyg|l']>>
+\hline
+<<d['scripts/volume_rendering_ptf.py|fn|py|pyg|l']>>
+\end{frame}
+\fullimage{DD0087_isocontour.png}
+
 \end{document}