aboutsummaryrefslogtreecommitdiff
path: root/acquisition
diff options
context:
space:
mode:
Diffstat (limited to 'acquisition')
-rw-r--r--acquisition/chapter.tex103
-rw-r--r--acquisition/shots_processing.py29
2 files changed, 93 insertions, 39 deletions
diff --git a/acquisition/chapter.tex b/acquisition/chapter.tex
index 7f6d43f..8ca947c 100644
--- a/acquisition/chapter.tex
+++ b/acquisition/chapter.tex
@@ -605,7 +605,7 @@ Each of these classes can be directly instantiated as a minimum-viable instance,
\begin{figure}
\includebash{"acquisition/hardware_inheritance"}
\caption[Hardware inheritance.]{
- CAPTION TODO
+ Full PyCMDS hardware inheritance tree.
}
\label{acq:fig:hardware_inheritance}
\end{figure}
@@ -674,8 +674,8 @@ Nothing can be changed in the advanced menu except the label, and the offset can
\begin{landscape}
\begin{figure}
\includegraphics[width=9in]{"acquisition/screenshots/007"}
- \caption[Representative spectrometer advanced menu.]{
- CAPTION TODO
+ \caption{
+ Representative spectrometer advanced menu.
}
\label{acq:fig:spectrometer_advanced}
\end{figure}
@@ -728,8 +728,8 @@ Each motor can be independently set and homed. %
\begin{landscape}
\begin{figure}
\includegraphics[width=9in]{"acquisition/screenshots/008"}
- \caption[Representative OPA advanced menu.]{
- CAPTION TODO
+ \caption{
+ Representative OPA advanced menu.
}
\label{acq:fig:opa_advanced}
\end{figure}
@@ -765,7 +765,12 @@ Each point is one processed value from all of the samples designated for that pa
Because this instrument is using dual chopping at this time, only one out of four shots has a large
amount of light, so most shots are near zero in \autoref{acq:fig:shots}. %
-[SHOTS PROCESSING]
+Finally, the shot-level information is passed through a ``shots processing'' script that is
+entirely user defined. %
+\autoref{acq:fig:shots_processing} shows a typical shots processing script for a dual chopping
+experiment. %
+Because the script is entirely user defined, exciting statistical treatments are possible moving
+forward. %
% BJT: more about the power of digital processing
%Old boxcar: 300 ns window, ~10 micosecond delay. Onset of saturation ~2 V.
@@ -774,7 +779,7 @@ amount of light, so most shots are near zero in \autoref{acq:fig:shots}. %
\begin{figure}
\includegraphics[width=9in]{"acquisition/screenshots/003"}
\caption{
- CAPTION TODO
+ PCI-6251 samples tab.
}
\label{acq:fig:samples}
\end{figure}
@@ -784,16 +789,18 @@ amount of light, so most shots are near zero in \autoref{acq:fig:shots}. %
\begin{figure}
\includegraphics[width=9in]{"acquisition/screenshots/002"}
\caption{
- CAPTION TODO
+ PCI-6251 shots tab.
}
\label{acq:fig:shots}
\end{figure}
\end{landscape}
\begin{figure}
+ \includepython{acquisition/shots_processing.py}
\caption{
- TODO: SHOTS PROCESSING SCRIPT
+ Simple shots processing script for dual chopping.
}
+ \label{acq:fig:shots_processing}
\end{figure}
\subsection{Multidimensional sensors} % ----------------------------------------------------------
@@ -821,7 +828,7 @@ It has been derived previously by \textcite{KainSchuyler2017a}. %
\begin{figure}
\includegraphics[scale=0.5]{"acquisition/tune_test"}
\caption[Array detector serving as an axis.]{
- CAPTION TODO (2017-11-06 OPA2)
+ Array detector serving as an axis. Data collected 2017-11-06. % OPA2
}
\label{acq:fig:array_as_axis}
\end{figure}
@@ -853,12 +860,21 @@ of linear interpolation and extrapolation at the edges. %
A single hardware can be offset by multiple other hardwares. %
In such cases, \emph{offsets always add}. %
-[DESCRIPTION OF FIGURE]
+\autoref{acq:fig:autonomic} displays the GUI of the autonomic system, in this case for ``d1'' on
+the picosecond system. %
+Note the triple-nested tab structure---there are one of these tabs for each hardware loaded by
+PyCMDS. %
+A large display occupies the middle of the program, displaying the offsets as applied by ``w1'' in
+this case. %
+On the right-hand side users can add as many \bash{.coset} files as desired. %
\begin{landscape}
\begin{figure}
\includegraphics[width=9in]{"acquisition/screenshots/009"}
- \caption{AUTONOMIC SDC SCREENSHOT}
+ \caption{
+ Autonomic tab.
+ }
+ \label{acq:fig:autonomic}
\end{figure}
\end{landscape}
@@ -873,8 +889,7 @@ PyCMDS uses the words ``scan'' and ``acquisition'' in very careful ways. %
\item An acquisition is a single user-defined, enqueable, instruction.
\item A scan is a single traversal in the multidimensional hardware space. %
\end{ditemize}
-Each scan corresponds to one \bash{.data} file, and one WrightTools \python{Data} instance (see
-section ...) %
+Each scan corresponds to one \bash{.data} file, and one WrightTools \python{Data} instance. %
There can be many scans within a single acquisition. %
And there can be many acquisitions in a queue. %
@@ -984,8 +999,8 @@ Acquisition modules are defined interfaces which know how to assemble a scan. %
\begin{figure}
\includebash{"acquisition/example.aqn"}
- \caption[Example aqn file.]{
- CAPTION TODO
+ \caption{
+ Representative aqn file.
}
\label{acq:fig:aqn_file}
\end{figure}
@@ -1010,17 +1025,23 @@ As a convinience, a new point curve with remapped colors is automatically create
\subsubsection{MOTORTUNE}
-Arbitrary tuning acquisitions.
+MOTORTUNE is capable of arbitrary acquisitions in OPA motor space. %
+Users are free to choose any set of positions for any set of motors, and PyCMDS will broadcast all
+of those positions against eachother to form a multidimensional acquisition. %
+Optionally, a leading dimension of \emph{setpoint} may be added, with motor positions being scanned
+about the points in the old curve. %
\subsubsection{AUTOTUNE}
-Automatically do appropriate scans and process as in chapter...
+AUTOTUNE does multiple scans to tune OPAs as automatically as possible. %
+The interface and procedure is different for each model of OPA. %
+The procedures are like those described in \autoref{cha:opa}. %
\subsubsection{POYNTING TUNE}
-Dedicated to poynting (get content from Kyle S)...
+POYNTING TUNE is much like AUTOTUNE, except that it deals with Poynting correction instead of
+regular tuning. See \autoref{act:sec:poynting} for more information. %
-\clearpage
\section{Conditional validity} % =================================================================
The central conceit of the PyCMDS modular hardware abstraction is that experiments can be boiled
@@ -1060,17 +1081,29 @@ Conceptually, can imagine a 4 quadrant system. %
Thus PyCMDS can be proud to try and generalize the hardware-complex part of acquisition software
because indeed that is all that can be generalized. %
-\clearpage
\section{Integrations} % =========================================================================
-[GOOGLE DRIVE]
+PyCMDS has several \emph{integrations} to assist users. %
-[SLACK]
+PyCMDS automatically uploads all collected data to Google Drive. %
+This provides an easy way for remote users to access the newest data, and it provides a data backup
+in case something goes wrong. %
+
+PyCMDS interacts with users through a custom slack bot, the Wright Instrument Technology
+Communication Handler (WITCH). %
+WITCH automatically posts when scans are done, and responds to simple commands like ``status''. %
+This allows users to be aware of what PyCMDS is doing without physically being in the laser lab. %
+\autoref{acq:fig:slack} is a screenshot of a typical interaction with WITCH. %
+Note Kyle Sunden asking for the status of the queue. %
+
+These integrations are particularly useful because MR-CMDS scans take so long. %
+When the lasers are working and everything is tuned, PyCMDS is typically \emph{constantly} scanning
+to get as much use as possible out of the available time. %
\begin{figure}
\frame{\includegraphics[width=\textwidth]{"acquisition/slack"}}
- \caption[TODO]{
- TODO
+ \caption{
+ Slack screenshot.
}
\label{acq:fig:slack}
\end{figure}
@@ -1141,7 +1174,6 @@ constitute a regular array with-respect-to the scanned axes. %
We can acquire arbitrary points along each axis, but not for the multidimensional scan. %
This means that we cannot achieve strictly ideal pixel distributions for arbitrary datasets. %
Still, we can do much better than linear spacing.
-% TODO: refer to PyCMDS/WrightTools 'regularity' requirement when that section exists
Almost all CMDS lineshapes (in frequency and delay) can be described using just a few lineshape
functions:
@@ -1160,10 +1192,7 @@ The measured line-shapes are actually convolutions of the above. %
I will ignore the convolution except for a few illustrative special cases. %
More exotic lineshapes are possible in CMDS---quantum beating and breathing modes, for example---I
will also ignore these. %
-Derivations of the ideal pixel positions for each of these lineshapes appear below.
-% TODO: cite Wright Group quantum beating paper, Kambempati breathing paper
-
-\subsubsection{Exponential}
+Derivation of the ideal pixel positions for a single exponential appear below.
Simple exponential decays are typically used to describe population and coherence-level dynamics in
CMDS. %
@@ -1201,16 +1230,12 @@ S_n &=& (1-c)\left(\frac{n}{N}\right)^{\frac{\tau_{\mathrm{step}}}{\tau_{\mathrm
\begin{figure}
\includegraphics[scale=0.5]{"processing/PyCMDS/ideal axis positions/exponential"}
- \caption[TODO]{TODO}
+ \caption{
+ Ideal axis positions, exponential decay.
+ }
\label{acq:fig:exponential_steps}
\end{figure}
-\subsubsection{Gaussian}
-
-\subsubsection{Lorentzian}
-
-\subsubsection{Bimolecular}
-
\subsection{Simultanious acquisitions} % ---------------------------------------------------------
Sometimes PyCMDS needs to do multiple scans that are completely orthogonal. %
@@ -1240,8 +1265,8 @@ wt5 files are smaller on disk, have richer metadata and self-descriptive propert
scans can be stored in the same file using \python{Collections}. % TODO: again, link
Because wt5 files are stored on disk but fully accessible through slicing, PyCMDS could have full
access to the scan arrays without risk of memory overflow, which promises to allow for new
-potential visualizations during acquisition. % TODO: presumably we talk about buffered file
- % writing above?
+potential visualizations during acquisition.
+See \autoref{cha:pro} for more information about WrightTools. %
Even more exciting, wt5 files can be instantiated as empty and \textit{then} filled. %
This means that the wt5 file can be a self-describing set of destinations that actually defines
diff --git a/acquisition/shots_processing.py b/acquisition/shots_processing.py
new file mode 100644
index 0000000..a112ebd
--- /dev/null
+++ b/acquisition/shots_processing.py
@@ -0,0 +1,29 @@
+import numpy as np
+
+def process(shots, names, kinds):
+ channel_indicies = [i for i, x in enumerate(kinds) if x == 'channel']
+ out = np.full(len(channel_indicies)+1, np.nan)
+ channel_indicies.pop(0)
+ out_names = []
+ # signal diff
+ # A B C D
+ # chopper 1: - + + -
+ # chopper 2: - - + +
+ # we want A-B+C-D
+ c1 = shots[-2]
+ c2 = shots[-1]
+ a = np.mean(shots[0, (c1==-1)*(c2==-1)])
+ b = np.mean(shots[0, (c1==+1)*(c2==-1)])
+ c = np.mean(shots[0, (c1==+1)*(c2==+1)])
+ d = np.mean(shots[0, (c1==-1)*(c2==+1)])
+ out[0] = a-b+c-d
+ out_names.append('signal_diff')
+ # signal mean
+ out[1] = np.mean(shots[0])
+ out_names.append('signal_mean')
+ # others
+ for i in channel_indicies:
+ out[i+1] = np.mean(shots[i])
+ out_names.append(names[i])
+ # finish
+ return [out, out_names]