yt astrophysically aware analysis and viz
play

yt: Astrophysically-Aware Analysis and Viz Matthew Turk (Columbia) - PowerPoint PPT Presentation

yt: Astrophysically-Aware Analysis and Viz Matthew Turk (Columbia) Britton Smith (Michigan State) and the yt collaboration First, some motivation. the stars how to make a star 76% 24% hydrodynamics (example) There is only one sky.


  1. yt: Astrophysically-Aware Analysis and Viz Matthew Turk (Columbia) Britton Smith (Michigan State) and the yt collaboration

  2. First, some motivation.

  3. the stars

  4. how to make a star

  5. 76% 24%

  6. hydrodynamics

  7. (example)

  8. There is only one sky. (but there are many simulation codes)

  9. Different methods, data structures, assumptions, IO methods, units, variable names, ...

  10. Analysis.

  11. astro-ph/1011.3514 yt-project.org

  12. install script: Full dependency stack Source code Development environment GUI Sample data

  13. yt has been designed to address physical, not computational, entities.

  14. The Universe is full of gas, dark matter and stars. yt makes it easy to access that material.

  15. Transparent IO, masking of overlapping data, load-on-demand, geometric and non- geometric selection, field generation, and common interfaces to different datatypes.

  16. Enzo, Orion, CASTRO, FLASH Chombo, Tiger, Athena , ART, RAMSES yt is designed to be the lingua franca of astrophysical codes.

  17. Objects (conceptual, uniformly accessible NumPy stores)

  18. Objects Orthogonal Rays 1D Non-orthogonal Rays Slices Oblique Slices 2D Projections Spheres Rectangular Prisms Disks/Cylinders Inclined Boxes 3D Clumps Extracted Regions Boolean combinations

  19. Objects All respect unified interface: from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) ray = pf.h.ray([0.1, 0.2, 0.5], [0.4, 0.9, 0.1]) print ray[“Density”]

  20. Objects All respect unified interface: from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) sl = pf.h.slice(0, 0.5) print sl[“Density”]

  21. Objects All respect unified interface: from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) sp = pf.h.sphere(100.0/pf[‘au’], ‘max’) print sp[“Density”]

  22. from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) v, c = pf.h.find_max(“Density”)

  23. Adding new fields should be easy.

  24. from yt.mods import * @derived_field(“Pressure”) def Pressure(field, data): return (data.pf["Gamma"] - 1.0) * \ data["Density"]*data["ThermalEnergy"]

  25. Scripts should be simple and clear.

  26. from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) pc = PlotCollection(pf) pc.add_phase_sphere(1000.0, ‘au’, [“Density”, “Temperature”, “H2I_Fraction”]) pc.save()

  27. from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) pc = PlotCollection(pf) pc.add_phase_sphere(1000.0, ‘au’, [“Density”, “Temperature”, “CellMassMsun”], weight = None) pc.save()

  28. from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) pc = PlotCollection(pf) pc.add_slice(“Density”, 0) pc.set_width(0.5, ‘unitary’) pc.save()

  29. from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) pc = PlotCollection(pf) pc.add_slice(“Density”, 0) pc.set_width(1.0, ‘pc’) pc.save()

  30. from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) pc = PlotCollection(pf) pc.add_slice(“Density”, 0) pc.set_width(1000.0, ‘au’) pc.save()

  31. Some Highlights!

  32. (px, py, pdx, pdy, z) Projections

  33. (px, py, pdx, pdy, z) Image Buffer

  34. (px, py, pdx, pdy, z) Image Buffer

  35. Project once, pixelize many

  36. Slices

  37. Oblique Slices

  38. Isocontour Extraction

  39. Parallelism

  40. Parallelism Embarassingly Parallel Spatial Decomposition Decomposed by load or Helper functions to IO characteristics decompose the domain

  41. Parallelism Embarassingly Parallel Spatial Decomposition Quantities Profiles Slices Halo Finding Projections Volume Rendering

  42. Multi-level parallelism: dynamic workgroups, communicators, subgroups and task queues

  43. Volume Rendering

  44. Designed around integrating through a volume: visualization is a side effect. dI ν ds = j ν − α ν I ν

  45. Credit: Sam Skillman, 3rd Place at SciDAV Viz Night

  46. from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) v, c = pf.h.find_max("Density") L = [1.0, 1.0, 1.0] W = 1000.0/pf['au'] tf = vr.ColorTransferFunction((-14.0, -4)) tf.add_layers(8) cam = pf.h.camera(c, L, W, 1024, tf) cam.snapshot()

  47. from yt.mods import * pf = load(“DataDump0155.dir/DataDump0155”) v, c = pf.h.find_max("Density") sp = pf.h.sphere(c, 1000.0/pf['au']) L = sp.quantities["AngularMomentumVector"]() W = 1000.0/pf['au'] tf = vr.ColorTransferFunction((-14.0, -4)) tf.add_layers(8) cam = pf.h.camera(c, L, W, 1024, tf) cam.snapshot()

  48. cam.zoom(100.0) cam.snapshot()

  49. from yt.mods import * pf = load(“DD1701/DD1701”) v, c = pf.h.find_max("Density") L = [1.0, 1.0, 1.0] W = 100.0/pf['mpc'] tf = vr.PlanckTransferFunction() cam = pf.h.camera(c, L, W, 1024, tf) cam.snapshot()

  50. Off-axis Projection

  51. Canned Analysis Tasks

  52. Absorption Spectrum Coordinate Transformations Halo Finding Mass Functions Merger Trees Halo Profiling Level Sets Light Cones Light Rays Time Series Star Analysis Two-Point Analysis

  53. Level Sets

  54. Synthetic Spectra

  55. Two-Point Functions

  56. Three Halo Finders: Standard HOP Friends of Friends Parallel HOP Rockstar (beta)

  57. co-scheduled & in situ viz

  58. Process Simulation yt Thin NumPy wrappers and stop-n-go

  59. On Disc → In-situ

  60. Inter-comm Simulation yt Fire and forget, no embedded interpreter

  61. Developing as a Team

  62. Code review: eyes on (nearly) every changeset

  63. Forky development: very low barrier to entry; everything comes in the box.

  64. Testing: answer as well as integration tests get run every 30 minutes.

  65. 80,000 lines of code Python, Cython, C 20 contributors (60+ users) Contributors from 10+ institutions 8AM 6PM

  66. Challenges

  67. Low bus factor.

  68. Chores nobody wants to do.

  69. The import problem!

  70. What’s next?

  71. initialization

  72. better astrophysical object selection

  73. solvers

  74. non-astrophysical data

Recommend


More recommend