Matthew Turk avatar Matthew Turk committed 9e2e971

Final talk

Comments (0)

Files changed (2)

 (such as files) into memory, with semantic information.
 \begin{frame}[t]{What do we need to know?}
 \item How is data distributed throughout memory?
+\begin{frame}[t, fragile]{Layout of a Frontend}
+\texttt{} & Definitions of fields \\[9pt]
+\texttt{data\} & Hierarchy, grid, so on \\[9pt]
+\texttt{} & Data loaders \\[9pt]
+\texttt{} & Necessary definitions \\[9pt]
+\texttt{} & Anything else \\[9pt]
+\texttt{} & Imports \\[9pt]
+\texttt{\_\_init\_\} & Empty! \\[9pt]
+\mediumsimple{How do I get started?}
+\item Start by loading data with \texttt{Stream}
+\item Build up grid objects
+\item Implement IO
+\item Implement hierarchy
+\item Translate fields
+\item Run integration tests
 \mediumsimple{How do I load raw data?}
 \begin{frame}[fragile, t]
+\mediumsimple{(right now it can get a bit copy pasta, but we're working to
+improve that)}
+\begin{frame}[t]{Objects to Implement}
+Hierarchy & Spatial information for coarse identification \\[9pt]
+Grid patch & Fine-grained identification, and fluid deposition \\[9pt]
+Static Output & Parameters for the file \\[9pt]
+IO Handler & Translate grids or spatial regions to returned data sets \\[9pt]
+Fields & Units, known fields, and so on
+\begin{frame}[t]{What about N-body?}
+Several clear steps:
+\item Identify bounding boxes for particles
+\item (optional) Identify pseudo-AMR levels
+\item Read in by bounding box
+\item (optional) Convert to fluid values
 \bigsimple{What's next?}
-\mediumsimple{Geometry refactoring.}
-\mediumsimple{Better volume rendering.}
-\mediumsimple{Deeper code integration.}
-\mediumsimple{Fixing broken windows and rusty gates.}
+\mediumsimple{Geometry refactoring}
+\mediumsimple{IO: Grid Data Format}
+\mediumsimple{Better volume rendering}
+\mediumsimple{Deeper code integration}
+\mediumsimple{Fixing \textit{broken windows} and \textit{rusty gates}}
 \bigsimple{Thank you.}


+from yt.mods import *
+import h5py
+import as stream
+center = na.array([0.5, 0.5, 0.5])
+f = h5py.File("spec.h5")
+class StreamFieldHandler(object):
+    def __init__(self):
+        self.cached = {}
+    def __getitem__(self, key):
+        if field != "Density": raise KeyError
+        return f["/data"][:]
+    @property
+    def all_fields(self):
+        return ("Density",)
+sfh = StreamFieldHandler()
+grid_left_edges = na.array([
+  [0, 0, 0],
+], dtype='int64')
+grid_right_edges = na.array([
+  [269, 269, 269],
+], dtype='int64')
+domain_dimensions = na.array([269, 269, 269])
+domain_left_edge = na.zeros(3, 'float64')
+domain_right_edge = na.ones(3, 'float64')    
+grid_levels = na.array([0], dtype='int32').reshape((1,1))
+grid_dimensions = grid_right_edges - grid_left_edges
+grid_left_edges  = grid_left_edges.astype("float64")
+grid_left_edges /= domain_dimensions*2**grid_levels
+grid_left_edges *= domain_right_edge - domain_left_edge
+grid_left_edges += domain_left_edge
+grid_right_edges  = grid_right_edges.astype("float64")
+grid_right_edges /= domain_dimensions*2**grid_levels
+grid_right_edges *= domain_right_edge - domain_left_edge
+grid_right_edges += domain_left_edge
+handler = stream.StreamHandler(
+    grid_left_edges,
+    grid_right_edges,
+    grid_dimensions,
+    grid_levels,
+    na.array([-1], dtype='int64'),
+    na.zeros(1, dtype='int64').reshape((1,1)),
+    na.zeros(1).reshape((1,1)),
+    sfh,
+ = "simple_test"
+handler.domain_left_edge = domain_left_edge
+handler.domain_right_edge = domain_right_edge
+handler.refine_by = 2
+handler.dimensionality = 3
+handler.domain_dimensions = domain_dimensions
+handler.simulation_time = 0.0
+handler.cosmology_simulation = 0
+spf = stream.StreamStaticOutput(handler)
+spf.units["cm"] = 1.0
+spf.units["unitary"] = 1.0
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.