aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2018-03-24 21:59:52 -0500
committerBlaise Thompson <blaise@untzag.com>2018-03-24 21:59:52 -0500
commita6a2dfeccc695a1a23733f64fc1eccdf6bd9cefa (patch)
tree3959d2846786d101f699283b09187b7ee8c234f2
parent46eb6bad8700abdfef52fd83445607228016b10b (diff)
2018-03-24 21:59
-rw-r--r--MX2/chapter.tex2
-rw-r--r--bibliography.bib122
-rw-r--r--dissertation.cls3
-rw-r--r--dissertation.tex4
-rw-r--r--outline.org21
-rw-r--r--processing/chapter.tex124
-rw-r--r--processing/fringes_transform.pngbin0 -> 378866 bytes
-rw-r--r--processing/fringes_transform.py27
8 files changed, 180 insertions, 123 deletions
diff --git a/MX2/chapter.tex b/MX2/chapter.tex
index 60aa0eb..88b496e 100644
--- a/MX2/chapter.tex
+++ b/MX2/chapter.tex
@@ -1,4 +1,4 @@
-\chapter{Transition metal dichalcogenide thin films}
+\chapter{Transition metal dichalcogenide thin films} \label{cha:mx2}
\textit{This Chapter borrows extensively from \textcite{CzechKyleJonathan2015a}.}
diff --git a/bibliography.bib b/bibliography.bib
index 30ea418..02c8475 100644
--- a/bibliography.bib
+++ b/bibliography.bib
@@ -63,20 +63,6 @@
pages = 2337,
year = 2012,
doi = {10.1364/OL.37.002337},
- issn = {0146--9592},
- month = {jun},
-}
-
-@article{AubockGerald2012a,
- author = {Aub{\"{o}}ck, Gerald and Consani, Cristina and van Mourik, Frank and Chergui,
- Majed},
- title = {{Ultrabroadband femtosecond two-dimensional ultraviolet transient absorption}},
- journal = {Optics Letters},
- volume = 37,
- number = 12,
- pages = 2337,
- year = 2012,
- doi = {10.1364/OL.37.002337},
issn = {0146-9592},
month = {jun},
}
@@ -208,17 +194,6 @@
pmid = 15332970,
}
-@article{BrixnerTobias2004a,
- author = {Brixner, Tobias and Mancal, Tomas and Stiopkin, Igor V. and Fleming, Graham R.},
- title = {Phase-stabilized two-dimensional electronic spectroscopy},
- year = {2004},
- volume = {121},
- number = {9},
- pages = {4221},
- journal = {The Journal of Chemical Physics},
- doi = {10.1063/1.1776112},
-}
-
@article{CarlsonRogerJ1990a,
author = {Carlson, Roger J. and Wright, John C.},
title = {{Line narrowing in multiresonant third order molecular spectroscopies}},
@@ -456,7 +431,6 @@ year = {1998}
month = {sep},
}
-
@article{DonaldsonPaulMurray2008a,
author = {Donaldson, Paul M and Guo, Rui and Fournier, Frederic and Gardner, Elizabeth M
and Gould, Ian R and Klug, David R},
@@ -475,6 +449,7 @@ year = {1998}
month = {jun},
}
+
@article{DonaldsonPaulMurray2010a,
author = {Donaldson, Paul M and Willison, Keith R and Klug, David R},
title = {{Generation of Simplified Protein Raman Spectra Using Three-Color Picosecond
@@ -710,6 +685,7 @@ year = {1998}
issn = {0027-8424},
month = {mar},
}
+
@article{HammPeter2000a,
author = {Hamm, Peter and Lim, Manho and DeGrado, William F. and Hochstrasser, Robin M},
title = {{Pump/probe self heterodyned 2D spectroscopy of vibrational transitions of a
@@ -723,7 +699,6 @@ year = {1998}
issn = {0021-9606},
month = {jan},
}
-
@inproceedings{HannayJoErskine2009a,
author = {Jo Erskine Hannay and Carolyn MacLeod and Janice Singer and Hans Petter
Langtangen and Dietmar Pfahl and Greg Wilson},
@@ -1242,22 +1217,6 @@ year = {1998}
pmid = 16526612,
}
-@article{PakoulevAndreiV2006a,
- author = {Andrei V. Pakoulev and Mark A. Rickard and Kent A. Meyer and
- Kathryn Kornau and Nathan A. Mathew and David E. Thompson and
- John C. Wright},
- title = {Mixed Frequency/Time Domain Optical Analogues of Heteronuclear
- Multidimensional {NMR}},
- journal = {The Journal of Physical Chemistry A},
- volume = 110,
- number = 10,
- pages = {3352--3355},
- year = 2006,
- doi = {10.1021/jp057339y},
- month = {mar},
- publisher = {American Chemical Society ({ACS})},
-}
-
@article{PakoulevAndreiV2007a,
author = {Pakoulev, Andrei V. and Rickard, Mark A and Mathew, Nathan A and Kornau, Kathryn
M. and Wright, John C.},
@@ -1581,29 +1540,17 @@ year = {1998}
month = {oct},
}
-@article{SteehlerJK1985a,
- author = {Steehler, J. K. and Wright, J. C.},
- title = {{Parametric and nonparametric four‐wave mixing in pentacene: p ‐terphenyl}},
- journal = {The Journal of Chemical Physics},
- volume = 83,
- number = 7,
- pages = {3200--3208},
- year = 1985,
- doi = {10.1063/1.449177},
- issn = {0021-9606},
- month = {oct},
-}
-
@article{StoddenVictoria2016a,
- author = {Stodden, V. and McNutt, M. and Bailey, D. H. and Deelman, E. and Gil, Y. and Hanson, B. and Heroux, M. A. and Ioannidis, J. P. A. and Taufer, M.},
- title = {Enhancing reproducibility for computational methods},
- year = {2016},
- month = {dec},
- volume = {354},
- number = {6317},
- pages = {1240--1241},
- journal = {Science},
- doi = {10.1126/science.aah6168},
+ author = {Stodden, V. and McNutt, M. and Bailey, D. H. and Deelman, E. and Gil, Y. and
+ Hanson, B. and Heroux, M. A. and Ioannidis, J. P. A. and Taufer, M.},
+ title = {Enhancing reproducibility for computational methods},
+ journal = {Science},
+ volume = 354,
+ number = 6317,
+ pages = {1240--1241},
+ year = 2016,
+ doi = {10.1126/science.aah6168},
+ month = {dec},
}
@article{SunDezheng2014a,
@@ -1662,7 +1609,7 @@ year = {1998}
month = {oct},
}
-@article{VardenyZ1981a,
+@article{tVardenyZ1981ta,
author = {Vardeny, Z. and Tauc, J.},
title = {{Picosecond coherence coupling in the pump and probe technique}},
journal = {Optics Communications},
@@ -1675,6 +1622,12 @@ year = {1998}
month = {nov},
}
+@misc{VingeVernor2012a,
+ note = {Accessed: 2018-03-24},
+ title = {A Singularity Sensation},
+ url = {http://sm.stanford.edu/archive/stanmed/2012summer/article4.html},
+}
+
@article{VolkmerAndreas2001a,
author = {Andreas Volkmer and Ji-Xin Cheng and X. Sunney Xie},
title = {Vibrational Imaging with High Sensitivity via Epidetected Coherent Anti-Stokes
@@ -1883,20 +1836,6 @@ year = {1998}
month = {nov},
}
-@article{YursLenaA2011a,
- author = {Yurs, Lena A and Block, Stephen B. and Pakoulev, Andrei V and
- Selinsky, Rachel S. and Jin, Song and Wright, John},
- title = {Multiresonant Coherent Multidimensional Electronic
- Spectroscopy of Colloidal PbSe Quantum Dots},
- journal = {The Journal of Physical Chemistry C},
- volume = 115,
- number = 46,
- pages = {22833--22844},
- year = 2011,
- doi = {10.1021/jp207273x},
- month = {nov},
-}
-
@article{ZanniMartinT2001a,
author = {Zanni, Martin T and Asplund, Matthew C and Hochstrasser, Robin M},
title = {{Two-dimensional heterodyned and stimulated infrared photon echoes of
@@ -1913,29 +1852,6 @@ year = {1998}
@article{ZengHualing2012a,
author = {Hualing Zeng and Junfeng Dai and Wang Yao and Di Xiao and Xiaodong Cui},
title = {Valley polarization in {MoS}2 monolayers by optical pumping},
- journal = {Nature Nanotechnology},
- volume = 7,
- number = 8,
- pages = {490--493},
- year = 2012,
- doi = {10.1038/nnano.2012.95},
- month = {jun},
- publisher = {Springer Nature},
-}
-
-@article{ZhaoWei1999a,
- author = {Zhao, Wei and Wright, John C.},
- title = {{Measurement of {\textless}math display="inline"{\textgreater}
- {\textless}mrow{\textgreater} {\textless}msup{\textgreater}
- {\textless}mrow{\textgreater} {\textless}mi
- mathvariant="italic"{\textgreater}$\chi${\textless}/mi{\textgreater}
- {\textless}/mrow{\textgreater} {\textless}mrow{\textgreater}
- {\textless}mo{\textgreater}({\textless}/mo{\textgreater}
- {\textless}mn{\textgreater}3{\textless}/mn{\textgreater}
- {\textless}mo{\textgreater}){\textless}/mo{\textgreater}
- {\textless}/mrow{\textgreater} {\textless}/msup{\textgreater}
- {\textless}/mrow{\textgreater} {\textless}/math{\textgreater} for Doubly
- Vibrationally Enhanced Four Wave Mixing Spectroscopy}},
journal = {Physical Review Letters},
volume = 83,
number = 10,
diff --git a/dissertation.cls b/dissertation.cls
index bf2e6f6..6d2364c 100644
--- a/dissertation.cls
+++ b/dissertation.cls
@@ -91,8 +91,9 @@
% --- code environment ----------------------------------------------------------------------------
\RequirePackage{etoolbox}
+\RequirePackage{pmboxdraw} % for box drawing charachters
\RequirePackage[section]{minted}
-\usemintedstyle{colorfuli}
+\usemintedstyle{default}
\setminted[python]{linenos=false, frame=none}
\definecolor{bg}{rgb}{0.95, 0.95, 0.95}
diff --git a/dissertation.tex b/dissertation.tex
index c5c1a1a..f80af7e 100644
--- a/dissertation.tex
+++ b/dissertation.tex
@@ -75,8 +75,8 @@ This dissertation is approved by the following members of the Final Oral Committ
%\include{software/chapter}
\part{Development}
-%\include{processing/chapter}
-%\include{acquisition/chapter}
+\include{processing/chapter}
+\include{acquisition/chapter}
%\include{active_correction/chapter}
%\include{opa/chapter}
%\include{mixed_domain/chapter}
diff --git a/outline.org b/outline.org
index 0d66e26..47368ae 100644
--- a/outline.org
+++ b/outline.org
@@ -1,12 +1,21 @@
-* abstract
-* introduction
+* META
+** labeling convention
+*** chapter:kind:identifier, where kind is one of the following:
+**** cha: chapter
+**** sec: section (including subsections)
+**** eqn: equation
+**** fig: figure
+**** tab: table
+**** lst: code listing
+* abs: abstract
+* int: introduction
** TODO cite:MaimanTheodoreHarold1960a
-* spectroscopy
+* spe: spectroscopy
** TODO paul has a great discussion of the drawbacks of homodyne detection docview:HebertPaulC2016a.pdf::150
** TODO cite:AubockGerald2012a
-* materials
-* software
-* processing
+* mat: materials
+* sof: software
+* pro: processing
** data object model
*** creating a data object
*** dimensionality manipulation
diff --git a/processing/chapter.tex b/processing/chapter.tex
index 28d1858..40055c4 100644
--- a/processing/chapter.tex
+++ b/processing/chapter.tex
@@ -1,6 +1,25 @@
-\chapter{Processing}
-
-% TODO: cool quote, if I can think of one
+\chapter{Processing} \label{cha:pro}
+
+\begin{dquote}
+ What we have is data glut.
+ What we really want is the ability to manipulate the information and to reach conclusions from
+ it.
+ I think we are at the point where that is slipping beyond unaided humans’ abilities.
+ So the real thing to be looking for is processing schemes.
+ One way is automatic processing: for instance, the sort of analysis that we saw with the IBM
+ Watson on Jeopardy.
+ Putting that in service to humankind in fields that are suffering from data glut at least gives
+ people who are in charge the ability to keep some sort of track of what is going on.
+
+ The other great thing that we have going for us is that we have billions of very intelligent
+ people out there in the world.
+ :With the networking that we have now, we’re beginning to see that those large populations,
+ coordinating amongst themselves, are an intellectual resource that trumps all institutional
+ intellectual resources and has a real possibility, if it’s supported by the proper automation, of
+ creating solutions to problems, including the problem of the data glut.
+
+ \dsignature{Vernor Vinge \cite{VingeVernor2012a}}
+\end{dquote}
\clearpage
@@ -290,6 +309,64 @@ Users can configure which files are routed to which from-function. %
% TODO (also document on wright.tools)
+\subsection{Variables and channels} % ------------------------------------------------------------
+
+Data objects are made up of many component channels and variables, each array having the same
+dimensionality of its parent data. %
+This strategy allows for maximal flexibility in data representation, but it can be overly expensive
+if certain arrays do not actually change against all of the dimensions. %
+This is often especially true with variables, which typically correspond to scannable hardware that
+may not have even moved across some (or any) dimensions. %
+To avoid unnecessarily large arrays, WrightTools allows Channels and Variables to have different
+sizes than the parent data. %
+As an example, consider the following object.
+\begin{codefragment}{bash} % TODO: need to use bash here because of box charachters :-(
+>>> import WrightTools as wt; from WrightTools import datasets
+>>> data = wt.data.from_COLORS(datasets.COLORS.v2p1_MoS2_TrEE_movie)
+>>> data.print_tree()
+MoS2 (/tmp/qhg_1b3l.wt5)
+├── axes
+│ ├── 0: w2 (nm) (41, 1, 1)
+│ ├── 1: w1=wm (nm) (1, 41, 1)
+│ └── 2: d2 (fs) (1, 1, 23)
+├── variables
+│ ├── 0: w2 (nm) (41, 1, 1)
+│ ├── 1: w1 (nm) (1, 41, 1)
+│ ├── 2: wm (nm) (1, 41, 1)
+│ ├── 3: d2 (fs) (1, 1, 23)
+│ ├── 4: w3 (nm) (1, 1, 1)
+│ ├── 5: d0 (fs) (1, 1, 1)
+│ └── 6: d1 (fs) (1, 1, 1)
+└── channels
+ ├── 0: ai0 (41, 41, 23)
+ ├── 1: ai1 (41, 41, 23)
+ ├── 2: ai2 (41, 41, 23)
+ ├── 3: ai3 (41, 41, 23)
+ ├── 4: ai4 (41, 41, 23)
+ └── 5: mc (41, 41, 23)
+\end{codefragment}
+Note that this is the primary dataset discussed in \autoref{cha:mx2}. %
+The shape of this data object is \python{(41, 41, 23)}, but none of the variables have that full
+shape. %
+From a quick inspection, one can see that \python{w1} and \python{wm} were scanned together, while
+\python{w2} and \python{d2} were the other two dimensions. %
+\python{w3}, \python{d0}, and \python{d1} were not moved at all, yet their coordinates are still
+propagated. %
+The axes have the joint shape of their component variables. %
+Although not shown in this example, channels also may have axes with length 1.
+
+Axes, variables, and channels are array-likes, so they support slicing operations. %
+In addition, all three classes have \python{points} and \python{full} attributes that return the
+squeezed and broadcasted array, respectively. %
+
+\begin{figure}
+ \includegraphics[width=\textwidth]{"processing/fringes_transform"}
+ \includepython{"processing/fringes_transform.py"}
+ \caption[CAPTION TODO]{
+ CAPTION TODO}
+\end{figure}
+
+
\subsection{Math} % ------------------------------------------------------------------------------
Now that we know the basics of how the WrightTools \python{Data} class stores data, it's time to do
@@ -300,7 +377,7 @@ Let's start with some elementary algebra. %
In Python, operators are symbols that carry out some computation. %
Consider the following:
-\begin{codefragment}{python, label=abcdefg}
+\begin{codefragment}{python, label=pro:lst:array_addition}
>>> import numpy as np
>>> a = np.array([4, 5, 6])
>>> b = np.array([-1, -2, -3])
@@ -312,7 +389,7 @@ Here, \python{a} and \python{b} are operands and \python{+} is an operator. %
When used in this simple way, operators typically create and return a \emph{new} object in the
computers memory. %
We can verify this by using Python's built-in \python{id} function on the objects created in
-\ref{abcdefg}. %
+\ref{pro:lst:array_addition}. %
\begin{codefragment}{python}
>>> id(a), id(b), id(c)
(139712529580400, 139712333712320, 139712333713040)
@@ -321,12 +398,39 @@ This is usually fine, but sometimes the operands are unwieldy large objects that
memory to store. %
In other cases operators are used millions of times such that, used as above, millions of new
arrays will be created. %
-One way to avoid these problems is to use \emph{in-place} operators
-
-Because the \python{Data} object is mostly stored outside of memory, it is better to do
-in-place... % TODO
-Broadcasting... % TODO
+One way to avoid these problems is to use \emph{in-place} operators. %
+Using a slightly different syntax, one can tell Python to overwrite one of the operands with the
+new value. %
+Continuing from \ref{pro:lst:array_addition}:
+\begin{codefragment}{python, label=pro:lst:in_place_addition}
+>>> a += b
+>>> a
+array([3, 3, 3])
+\end{codefragment}
+No output \python{c} array was created, so no additional memory footprint is needed in
+\ref{pro:lst:in_place_addition}. %
+Since WrightTools channels and variables are typically large arrays, and since these arrays are
+stored on disk inside of a larger file, WrightTools requires the use of in-place operators for all
+normal math. %
+Currently WrightTools supports addition (\python{+=}), multiplication(\python{*=}),
+power (\python{**=}), subtraction (\python{-=}), and division (\python{/=}). %
+As an example, consider dividing a channel by a specific factor:
+\begin{codefragment}{python}
+>>> import WrightTools as wt; from WrightTools import datasets
+>>> data = wt.data.from_JASCO(datasets.JASCO.PbSe_batch_1)
+data.created at /tmp/tdyvfxu8.wt5::/
+ range: 2500.0 to 700.0 (nm)
+ size: 1801
+>>> data.signal
+<WrightTools.Channel 'signal' at /tmp/tdyvfxu8.wt5::/signal>
+>>> data.signal.min(), data.signal.max()
+(0.10755, 1.58144)
+>>> data.signal /= 2
+>>> data.signal.max(), data.signal.min()
+(0.053775, 0.79072)
+\end{codefragment}
+Variables also support in-place operators. %
\subsubsection{Clip}
diff --git a/processing/fringes_transform.png b/processing/fringes_transform.png
new file mode 100644
index 0000000..4d400d2
--- /dev/null
+++ b/processing/fringes_transform.png
Binary files differ
diff --git a/processing/fringes_transform.py b/processing/fringes_transform.py
new file mode 100644
index 0000000..1f80a86
--- /dev/null
+++ b/processing/fringes_transform.py
@@ -0,0 +1,27 @@
+import os
+import matplotlib.pyplot as plt
+import WrightTools as wt; from WrightTools import datasets
+
+here = os.path.abspath(os.path.dirname(__file__))
+
+data = wt.data.from_PyCMDS(datasets.PyCMDS.w2_w1_000)
+data.signal_mean.symmetric_root(0.5) # to amplitude level
+data.convert('wn')
+
+fig, gs = wt.artists.create_figure(width='double', cols=[1, 1, 'cbar'])
+# as taken
+ax = plt.subplot(gs[0, 0])
+ax.pcolor(data)
+wt.artists.set_ax_labels(xlabel=data.w2.label, ylabel=data.w1.label)
+ax.grid(); ax.set_title('as taken', fontsize=20)
+# transformed
+ax = plt.subplot(gs[0, 1])
+data.transform('wm', 'w1')
+data.convert('wn')
+ax.pcolor(data)
+wt.artists.set_ax_labels(xlabel=data.wm.label, yticks=False)
+ax.grid(); ax.set_title('transformed', fontsize=20)
+# colorbar
+wt.artists.plot_colorbar(plt.subplot(gs[0, -1]), label='amplitude')
+# save
+wt.artists.savefig(os.path.join(here, 'fringes_transform.png'))