diff options
author | Blaise Thompson <blaise@untzag.com> | 2018-03-26 22:34:02 -0500 |
---|---|---|
committer | Blaise Thompson <blaise@untzag.com> | 2018-03-26 22:34:02 -0500 |
commit | 5aa9d5e00d28c91190a2c07866bb0139275133e3 (patch) | |
tree | efee9a2879b774cdcad22cffd9e6218f852e0604 | |
parent | 8c899a01c80fdceab395e5c11389ca8334c67864 (diff) |
2018-03-26 22:34
-rw-r--r-- | MoS2_TSF.wt5 | bin | 0 -> 800 bytes | |||
-rw-r--r-- | acquisition/chapter.tex | 23 | ||||
-rw-r--r-- | processing/MX2_TSF.wt5 | bin | 0 -> 4561160 bytes | |||
-rw-r--r-- | processing/TSF_MoS2.wt5 | bin | 0 -> 874248 bytes | |||
-rw-r--r-- | processing/chapter.tex | 7 | ||||
-rw-r--r-- | processing/join.py | 49 | ||||
-rw-r--r-- | processing/join_example.png | bin | 0 -> 116930 bytes | |||
-rw-r--r-- | processing/join_example.py | 64 |
8 files changed, 134 insertions, 9 deletions
diff --git a/MoS2_TSF.wt5 b/MoS2_TSF.wt5 Binary files differnew file mode 100644 index 0000000..82daee0 --- /dev/null +++ b/MoS2_TSF.wt5 diff --git a/acquisition/chapter.tex b/acquisition/chapter.tex index e3035a0..8e75cc1 100644 --- a/acquisition/chapter.tex +++ b/acquisition/chapter.tex @@ -1,7 +1,14 @@ -\chapter{Acquistion}
+\chapter{Acquistion} \label{cha:acq}
% TODO: cool quote, if I can think of one
+\begin{dquote}
+ The question of software correctness ultimately boils down to, “Does it do what we have in our
+ minds, even the things we have not gotten around to thinking about yet?”
+
+ \dsignature{Alistair Cockburn}
+\end{dquote}
+
\clearpage
In the Wright Group, \gls{PyCMDS} replaces the old acquisition softwares `ps control', written by
@@ -13,15 +20,15 @@ PyCMDS directly addresses the hardware during experiments. PyCMDS has, through software improvements alone, dramatically lessened scan times...
-\begin{itemize}[topsep=-1.5ex, itemsep=0ex, partopsep=0ex, parsep=0ex, label=$\rightarrow$]
- \item simultaneous motor motion
+\begin{ditemize}
+ \item simultaneous motor motion
\item digital signal processing % TODO: reference section when it exists
- \item ideal axis positions \ref{sec:ideal_axis_positions}
-\end{itemize}
+ \item ideal axis positions \ref{acq:sec:ideal_axis_positions}
+\end{ditemize}
\section{Future directions} % ====================================================================
-\subsection{Ideal Axis Positions}\label{sec:ideal_axis_positions} % ------------------------------
+\subsection{Ideal Axis Positions} \label{acq:sec:ideal_axis_positions} % -------------------------
Frequency domain multidimensional spectroscopy is a time-intensive process. %
A typical \gls{pixel} takes between one-half second and three seconds to acquire. %
@@ -85,7 +92,7 @@ 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
-\subsection{Exponential}
+\subsubsection{Exponential}
Simple exponential decays are typically used to describe population and coherence-level dynamics in
CMDS. %
@@ -124,7 +131,7 @@ 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}
- \label{fig:exponential_steps}
+ \label{aqn:fig:exponential_steps}
\end{figure}
\subsubsection{Gaussian}
diff --git a/processing/MX2_TSF.wt5 b/processing/MX2_TSF.wt5 Binary files differnew file mode 100644 index 0000000..f13c74b --- /dev/null +++ b/processing/MX2_TSF.wt5 diff --git a/processing/TSF_MoS2.wt5 b/processing/TSF_MoS2.wt5 Binary files differnew file mode 100644 index 0000000..f905737 --- /dev/null +++ b/processing/TSF_MoS2.wt5 diff --git a/processing/chapter.tex b/processing/chapter.tex index a32f170..db8da3b 100644 --- a/processing/chapter.tex +++ b/processing/chapter.tex @@ -795,7 +795,12 @@ It is also not a method of the \python{Data} class, it is a bare function. % Join accepts multiple data objects and attempts to join them together. %
To do this, the variable and channel names must agree. %
-% TODO: join example (from Darien on slack)
+\begin{figure}
+ \includegraphics[width=\textwidth]{"processing/join_example"}
+ \caption[CAPTION TODO]{
+ CAPTION TODO}
+ \label{pro:fig:join_example}
+\end{figure}
\section{Fitting} % ==============================================================================
diff --git a/processing/join.py b/processing/join.py new file mode 100644 index 0000000..f3a4203 --- /dev/null +++ b/processing/join.py @@ -0,0 +1,49 @@ +"""Join figure.""" + + +# --- import -------------------------------------------------------------------------------------- + + +import os + +import matplotlib.pyplot as plt + +import WrightTools as wt + + +# --- define -------------------------------------------------------------------------------------- + + +here = os.path.abspath(os.path.dirname(__file__)) + + +# --- workspace ----------------------------------------------------------------------------------- + + +wt.artists.apply_rcparams('publication') + +fig, gs = wt.artists.create_figure(width='double', cols=[1, 0, 1, 1, 1, 'cbar'], nrows=4) + +root = wt.open(os.path.join(here, 'MX2_TSF.wt5')) + +def plot(ax, d): + d.transform('w1', 'w2') + d.sig.clip(0, 4) + ax.pcolor(d) + +# II +ax = plt.subplot(gs[0, 0]) +plot(ax, root.processed_tsf.divided_tsf.II) + +# IS +ax = plt.subplot(gs[1, 0]) +plot(ax, root.processed_tsf.divided_tsf.IS) + +# SS +ax = plt.subplot(gs[2, 0]) +plot(ax, root.processed_tsf.divided_tsf.SS) + + +# savefig +p = os.path.join(here, 'join.png') +plt.show() diff --git a/processing/join_example.png b/processing/join_example.png Binary files differnew file mode 100644 index 0000000..a2c83f5 --- /dev/null +++ b/processing/join_example.png diff --git a/processing/join_example.py b/processing/join_example.py new file mode 100644 index 0000000..ce1e18e --- /dev/null +++ b/processing/join_example.py @@ -0,0 +1,64 @@ +"""Join example.""" + + +# --- import -------------------------------------------------------------------------------------- + + +import os + +import WrightTools as wt + +import numpy as np + +import matplotlib.pyplot as plt + + +# --- define and import --------------------------------------------------------------------------- + + +here = os.path.abspath(os.path.dirname(__file__)) + +p = os.path.join(here, 'MX2_TSF.wt5') +root = wt.open(p) +divided = root.processed_tsf.divided_tsf + +def individual_plotter(gs, d, j): + ax = plt.subplot(gs[0,j]) + ax.pcolor(d) + ax.grid() + wt.artists.set_ax_labels(ax=ax, xlabel=d.w1.label, ylabel=d.w2.label) + + # join +ds = [divided[0], divided[1], divided[2]] +joined = wt.data.join(ds, parent=divided, ) +# pretty up indivudal +for d in ds: + d.transform('w1', 'w2') + d.sig.clip(0,4) +# pretty up joined +joined.sig.clip(0,4) +joined.transform('w1', 'w2') + + +# --- workspace ----------------------------------------------------------------------------------- + + +# instantiate figure +fig, gs = wt.artists.create_figure(width='double', nrows=3, cols=[1,'cbar',1,'cbar',1,'cbar'], hspace=.75, wspace=.35) +# plot indiviudal data +d = divided[0] +individual_plotter(gs, d, 0) +d = divided[1] +individual_plotter(gs, d, 2) +d = divided[2] +individual_plotter(gs, d, 4) +# plot joined data +ax = plt.subplot(gs[1:,:-1]) +ax.pcolor(joined) +ax.grid() +wt.artists.set_ax_labels(ax=ax, xlabel=d.w1.label, ylabel=d.w2.label) +# colorbar +cax = plt.subplot(gs[:,-1]) +ticks = np.linspace(joined.sig.min(), joined.sig.max(), 11) +label = 'TSF amplitude' +wt.artists.plot_colorbar(cax=cax, ticks=ticks, label=label) |