Source

yt.workshop2012.frontends / frontends.tex

\documentclass[14pt]{beamer}
\newcommand{\bigsimple}[1]{
  \begin{frame}[c]{}
  \begin{center}
    {\huge \textbf{#1} }
  \end{center}
  \end{frame}
}
\newcommand{\mediumsimple}[1]{
  \begin{frame}[c]{}
  \begin{center}
    \textbf{#1}
  \end{center}
  \end{frame}
}
\newcommand{\fullimage}[1]{
  {
    \usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{#1}}
    \begin{frame}[plain]{}
    \end{frame}
  }
}
\newcommand{\defslide}[2]{
  \begin{frame}[t]{}
  \begin{center}
  ``#1''
  \end{center}
  \\
  \vspace{1in}
  \\
  #2
  \end{frame}
}

\setbeamercolor{normal text}{bg=black,fg=white}
\setbeamertemplate{navigation symbols}{}
\usecolortheme[named=white]{structure}
\usetheme{default}
\usepackage{relsize}
\newcommand{\yt}{{\larger\texttt{yt}}}

\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

%\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{tgadventor}
\newcommand\smfont{\fontsize{8}{6.4}\selectfont}

\usepackage{graphicx}
\usepackage{color}
\usepackage{fancyvrb}
\usepackage{../pastie}

\title{What is a ``frontend'' anyway?}

\begin{document}

\begin{frame}
 \titlepage
\end{frame}

\mediumsimple{How does \yt{} see data?}

\defslide{frontend}{
A frontend is a mechanism for \yt{} to translate data from on-disk structures
(such as files) into memory, with semantic information.
}

\tinysimple{\texttt{hg.yt-project.org/yt/wiki/CodeSupportLevels}}

\begin{frame}[t]{What do we need to know?}
\begin{itemize}
\item How is data distributed throughout memory?
\item How do I load it?
\item What does it correspond to?
\item What are units, domain volume, etc etc
\end{itemize}
\end{frame}

\begin{frame}[c]
\begin{center}
\tiny
\texttt{hg.yt-project.org/yt/wiki/AddingSupportForANewCode}
\end{center}
\end{frame}

\mediumsimple{\texttt{yt/frontends/your\_code}}

\begin{frame}[t, fragile]{Layout of a Frontend}
\begin{center}
\smfont{}
\begin{tabular}{l|p{2.5in}}
\texttt{fields.py} & Definitions of fields \\[9pt]
\texttt{data\_structures.py} & Hierarchy, grid, so on \\[9pt]
\texttt{io.py} & Data loaders \\[9pt]
\texttt{definitions.py} & Necessary definitions \\[9pt]
\texttt{misc.py} & Anything else \\[9pt]
\texttt{api.py} & Imports \\[9pt]
\texttt{\_\_init\_\_.py} & Empty! \\[9pt]
\end{tabular}
\end{center}
\end{frame}

\mediumsimple{How do I get started?}

\begin{frame}[t]{Flowchart}
\begin{enumerate}
\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
\end{enumerate}
\end{frame}

\mediumsimple{How do I load raw data?}

\begin{frame}[fragile, t]
\tiny
<<d['scripts/stream_load.py|fn|pyg|l']>>
\end{frame}

\begin{frame}[fragile, t]
\tiny
<<d['scripts/stream_vr.py|fn|pyg|l']>>
\end{frame}

\fullimage{../first_earth.png}

\mediumsimple{(right now it can get a bit copy pasta, but we're working to
improve that)}

\begin{frame}[t]{Objects to Implement}
\begin{center}
\smfont{}
\begin{tabular}{l|p{2.5in}}
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
\end{tabular}
\end{center}
\end{frame}

\begin{frame}[t]{What about N-body?}
Several clear steps:
\begin{itemize}
\item Identify bounding boxes for particles
\item (optional) Identify pseudo-AMR levels
\item Read in by bounding box
\item (optional) Convert to fluid values
\end{itemize}
\end{frame}

\bigsimple{What's next?}
\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{Community.}
\bigsimple{}
\bigsimple{Community.}

\bigsimple{Thank you.}

\end{document}
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 ProjectModifiedEvent.java.
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.