% Created 2024-11-24 Sun 13:51
% Intended LaTeX compiler: pdflatex
\documentclass[dvipsnames,colorlinks,aspectratio=169]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{color}
\usepackage{listings}
\usepackage{pdfpages}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{siunitx}
\usepackage{libertine}
\usepackage{fontawesome}
\mode<beamer>{\usetheme{Boadilla}}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{alerted text}{series=\bfseries}
\setbeamercolor{alerted text}{fg=blue}
\usecolortheme{default}
\usefonttheme{serif}
\usefonttheme{professionalfonts}
\usetheme{default}
\author{Brett Viren}
\date{\today}
\title{Rastering a fast signal}
\hypersetup{
 pdfauthor={Brett Viren},
 pdftitle={Rastering a fast signal},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 29.3 (Org mode 9.8-pre)}, 
 pdflang={English}}
\begin{document}

\maketitle
\begin{frame}[label={sec:org32a0f80}]{Problem statement}
\begin{block}{Raster (here) means to \alert{integrate and sample} a signal.}
\begin{itemize}
\item Integrate over some small volume near each grid point.
\begin{itemize}
\item We are free to choose any integration method \(\to\) \alert{effective charge}.
\end{itemize}
\item 2D grid formed as the \alert{impact positions} of field response path start points.
\end{itemize}
\end{block}
\begin{block}{Ionization electron distribution signal can be \alert{fast} or \alert{sharp}}
\begin{itemize}
\item Extreme case, no diffusion: a 0-D point depo or 1-D step line produced at anode.
\item Essentially all signal may fall between grid points.
\end{itemize}
\end{block}
\begin{block}{Two problems}
\begin{enumerate}
\item The raster must not ``miss'' sharp signal peaking between grid points.
\item How to choose a ``best'' effective charge estimate.
\end{enumerate}
\end{block}
\end{frame}
\begin{frame}[label={sec:org42d9721}]{Simple Gaussian depo method formalism}
Charge density for depo \(d\) has independent Gaussian profiles in each of \(D\) dimensions.

\[ Q_d(\vec{r}) = q_d\Pi_{i=1}^D \frac{1}{\sqrt{2\pi\sigma_{d,i}}}e^{-\frac{(r_i-c_{d,i})^2}{\sigma_{d,i}^2}}  \]

Integrate \(Q_d(\vec{r})\) over small elements centered on a grid point \(\vec{p}_{lmn}\) in each of \(D\) dimensions.

\[q_{lmn,d} = q_d\Pi_{i=1}^D (erf(\rho_{lmn,i}+\Delta_i) - erf(\rho_{lmn,i})) \]

Where a coordinate transformation in each dimension \(i\) is defined:

\[\rho_{lmn,i} = ((\vec{p}_lmn)_i - (\vec{c}_d)_i)/\sigma_{d,i} \]

In order to convert Gaussian to Normal and allow \(erf(\cdot)\) to be used.
\end{frame}
\begin{frame}[label={sec:org5785f72},fragile]{Simple Gaussian depo method in practice}
 For each dimension:
\begin{itemize}
\item Find maximum range the contains all depos.
\item Calculate offsets of ranges given depo centers \(\vec{c}_d\).
\item Define array of positions across that range \alert{plus one more} for each depo.
\item Apply Gauss \(\to\) Normal transform to array \((N_{depos}, 2)\) holding \((c_{d,i}, \sigma_{d,i})\)
\item Form cumulative integral across positions using \(erf(\cdot)\) and subtract:
\end{itemize}

\begin{verbatim}
cumu = [erf(p[i]) for i in range(N+1)]
q = cumu[1:] - cumu[:-1]
\end{verbatim}

Note, all these are array-operations and parallelized by PyTorch.
\begin{itemize}
\item There are no explicit loops over depos nor positions.
\item For now, we do loop over dimensions.
\end{itemize}
Results in \(N+1\) dimension array, same shape \(N\)-D array for each depo.
\end{frame}
\begin{frame}[label={sec:orgfa3835f}]{Integrate+sample vs sample+integrate}
Integration of arbitrary distributions difficult in general.

\begin{itemize}
\item Gaussian + \(erf(\cdot)\) allows for a special case.
\end{itemize}

May consider the reverse: sample then integrate.
\begin{itemize}
\item Eg, apply Newton's method to samples of \alert{density}.
\item Must sample \alert{fine enough} to avoid bias / inefficiency.
\end{itemize}
What does \alert{fine enough} mean?
\end{frame}
\begin{frame}[label={sec:org32c6de8}]{Field response bandwidth and sampling}
\begin{block}{Field responses are continuous functions in space.}
\begin{itemize}
\item They have some natural \alert{band limit} in each dimension.
\item But, we calculate them on a discrete grid and thus produce a \alert{sampling}.
\item Ideally, define a grid that samples at least \(2\times\) faster than the band limit.
\end{itemize}
\end{block}
\begin{block}{Reality}
100ns for wires and 50ns for pixels time sampling is marginal.
\begin{itemize}
\item Some spectral power remains at these Nyquist frequencies.
\end{itemize}
In space the FR changes radically faster than sampling period/distance in some regions.
\begin{itemize}
\item Eg, near boundaries between wire regions or pixels.
\item Oversampling these regions would require very close-spaced paths.
\end{itemize}

At the end of the day, the discrete FRs are band-limited
\begin{itemize}
\item Either naturally or by their (under) sampling.
\end{itemize}
\end{block}
\end{frame}
\begin{frame}[label={sec:org87db53a},fragile]{Spectrum of a Gaussian signal}
 \[ f(x) = e^{-\frac{(x-\mu)^2}{2\sigma^2}} \leftrightarrow F(\omega) = e^{-i\mu \omega}e^{-\frac{1}{2}(\sigma \omega)^2} = e^{-i\mu \omega}e^{-\frac{1}{2}(\omega/\sigma_\omega)^2}\]

Where we have identified a ``frequency sigma'' \(\sigma_\omega \equiv 1/\sigma\) in units of \texttt{[1/distance]}.
\begin{block}{Example}
A depo with \(\sigma=\qty{100}{\mu{}m}\) has a \(3-\sigma\) band limit at \(\omega=3\sigma_\omega=\frac{3 \mathrm{samples}}{\qty{100}{\mu{}m}}\).

Ideally, we sample at least that frequently.
\end{block}
\begin{columns}
\begin{column}{1.0\columnwidth}
But, what if we must sample less freqently?
\end{column}
\end{columns}
\end{frame}
\end{document}
