M.S. Thesis Guidelines
Physics is a science based on experimental observations. Its existence depends on quality science. Therefore, practices need to be put in place to help guarantee high-quality, reproducible, scientific results.
M.S. Thesis
The master’s thesis represents original research. Details to support your claims must be included. You should be familiar with writing and if not refresh your memory with a book, such as “A Manual for Writers of Research Papers, Theses and Dissertations” by Kate L. Turabian. It contains general information. In the following, we will add some specific approaches towards writing a physics M.S. thesis in experimental condensed matter.
Software Packages
Familiarize yourself with the following tools
- Zotero for references, see Zotero Documentation
- R for graphs and tables, see R scientific reproducibility
- Quarto - open-source scientific and technical publishing system - for writing the Thesis.
Additional tools:
- ChemFig R package for drawing molecules in LaTeX
- Quantum Design R package for analyzing VSM data
- nanoAFMr package for analyzing AFM data
Comprehensive PowerPoint File
Keep a lengthy comprehensive PowerPoint file. It should include data more or less in chronological order at this point. It includes photos with details. It is not important to keep it organized, but rather it is important to keep it clean and updated. Regularly, add details, data, information, and observations. It should contain 100 - 300 slides. The slides can include photos of samples, personal reviews and snippets of literature, graphs from results, calculations from the analysis, schematics and plans. Use the notes section to add folder, file names, and other information pertinent to the graphs. Photos and data files may additionally need to be stored in the RAW folder.
File System
Files are shared via the University’s OneDrive folder. The structure includes the following folders:
- Abstracts: any abstracts submitted for presentations or poster events,
- Figs: self-drawn figures
- Figs-Generated: all figures generated by R code
- Presentations: all presentations (defense, posters, conferences, etc.)
- R: Graph generating files using data from the RAW folder and saving results in Figs-Generated or Results-Generated
- RAW: all unaltered data files from machines
- Results: Manually recorded results and tables
- Results-Generated: results and tables generated from R code
- Thesis: LaTeX documents with entire thesis (except for generated figures and tables)
Since the files in Figs-Generated and Results-Generated are computed from R code, all files therein can be deleted. The first part of the generated file contains the file name of the R code. For example, the files MvsH-H1.png, MvsH-H2.png were generated by MvsH.R in the R folder.
Sample and Data File Conventions
Sample Naming Convention
- two initials of the person who makes the samples (example: TG)
- date in format yyyy/mm/dd (example: 20190724)
- if more than one sample is created in any one day by one author, then additional information is appended, which distinguishes the samples, such as Si1, Si2, for two samples made on silicon substrates, or rpm1, rpm2, for two samples created with two different spin speeds.
Examples for sample names include: TG20190724 or TG20190723Si1; sample names should not be too long. The processing details are separately recorded in the log book.
Data File Naming Convention
RAW data filen ames must be unique and cannot be altered. The date should represent the starting date of the data collection. The project name is given to you at the beginning by the mentor.
There are no sub-folders in the RAW folder; i.e. the RAW folder has a flat structure. If the data file is in a compressed or proprietary format (such as XRD), it must also be converted into a text file in ASCII format and both files should be saved.
The format is as follows:
- Date_Project_Initials_Tool_Sample_RunInfo.csv
Example: 20170501_BiThermal_SF_VSM_SF20170426_MvsH-5K.DAT
This means that the data was collected on May 1, 2017. It belongs to the project “BiThermal” (note the capitalization), and was recorded by user S.F. on the instrument VSM for sample SF20170426. The RunInfo makes the data file unique in case several measurements are made on the same sample on the same day with the same machine. As additional data, it is noted that magnetization versus applied field (MvsH) is measured at 5K. Do NOT use underscore(_) other than to separate the elements. Make sure to follow the order exactly. The extension can be .csv, .txt, .asc, etc.
The instruments/tools most commonly used are:
- XRD: x-ray diffraction
- VSM: vibration sample magnetometer
- AFM: atomic force microscopy
- Camera: photo camera, digital image, phone camera, etc.
- NTE: nanomaster thermal evaporator
- Spectrometer: photo-spectrometer data, optical data
- SpinCoater: spin-coater
- Sputter: sputtering machine
- Sample: text file on how the sample was created
Note that a user can work on several projects, and/or several users can work on the same project.
References
Use Zotero to manage your bibliography and all related articles along with a plugin for Chrome browser. You can install Zotero here:
Better BibTeX
Also install the extension: Better BibTeX for Zotero:
You need to configure the extension as follows: Go to Preferences -> Better BibTeX -> Citation Keys, and enter the following into the “Citation key format”: R [auth]_[Title:skipwords:select,1,1:ascii:nopunct]_[year]
Each paper is then labeled with the author, first word of the title followed by the year. This should be unique in most cases, but in rare events, single letters are appended to distinguish separate papers; however that could be a duplicate, so make sure to eliminate duplicate references from your library periodically.
More information is found at Better BibTeX on GitHub. A complete list of citation keys is provided for reference.
In particular the QuickCopy format is “LaTeX” and the Citation key format is should be used, so that you can use Ctrl-Shift-C to copy a citation into your LaTeX file.
Publication Labeling
Papers should be stored in the format Author_FirstWordTitle_Year.pdf
Example: Gentry_Asymmetric_2009.pdf for the paper Gentry, Gredig, Schuller, “Asymmetric grain distribution in phthalocyanine thin films” published in Phys. Rev. B 80 (2009).
Note that this is the same as for citations, so in LaTeX you would cite:
\cite{Gentry_Asymmetric_2009}
All publications and documents are stored in the Papers folder using the file naming convention above. The advantage of this labeling system are that you can search for the paper by typing the first author name and search for PDF files on your computer, once you have the PDF filename you can also easily cite the work, plus there is no confusion about the year it was published.
R
Data analysis and results graphing should be done using R
language, so that it is reproducible. The R
code will take the RAW data, transform, analyze, and model it to produces figures and result tables, which are stored in folders Figs-generated
and Results-generated
.
Download R here: http://cran.stat.ucla.edu Download RStudio here: https://rstudio.com/products/rstudio/download/
Organize yourself in the following way.
- Make a file called
make-thesis-graphs.R
and include all subroutines that generate graphs there. - Make a file called
myConfig.R
and define all folders in there that will be used, so that the files can be run on different systems. - The prefix of the Result or the Figure will be the filename of the
R
code that generates the file. For example,coercivity-H20.png
graph is generated bycoercivity.R
file; also, thecoercivity-allSamples.csv
was also created bycoercivity.R
- TeX tables can be generated with Knitr Package, which is included with
library(knitr)
and installed withinstall.packages('knitr')
. A data.frame can be exported withxtable
, see xTable documention:
library(xtable)
print(xtable(r, digits = 0),
format.args = list(big.mark = " ", decimal.mark = ","),
file=file.path(path.RESULTS,
paste0(file.PREFIX,'-allSample.tex')))
use input{coercivity-allSamples.tex}
to include the Table in your TeX file.
LaTeX
The M.S. thesis template is available as a LaTeX document. Here is a list of useful commands in LaTeX:
Proper Spacing for SI units
\usepackage{siunitx}
\sisetup{detect-weight=true, detect-family=true} % bold font support
\DeclareSIUnit\oersted{Oe}
\SI{e-7}{\meter} is \SI{0.1}{\micro\meter}
# for units only use\si{\nano\meter}
Changing the name / capitalization of the Table of Contents
For longer documents KOMA class is useful, but it is not compatible with all the other commands. A typical document KOMA script would start with:
\documentclass[12pt,oneside,letterpaper,
scrbook} chapterprefix=on,numbers=noenddot]{
The table of contents can be changed, even if you are using the babel pacakge, since \renewcommand{\contentsname}{Table of Contents}
may not work in that environment.
\usepackage[english]{babel}
\addto\captionsenglish{\def\contentsname{TABLE OF CONTENTS}}
\KOMAoptions{toc=chapterentrydotfill} % dotted chapter entries
\setkomafont{chapterentry}{} % make chapter titles not bold
\addtokomafont{chapterentrypagenumber}{\mdseries} % make page numbers not bold
Common Widths for Graphs
\newcommand{\FIGwide}{0.9\textwidth}
\begin{figure}
\centering % note: file extension not needed
\includegraphics[width=\FIGwide]{imagefile}
\caption[short caption for TOC]
{Long and detailled caption that appears under figure.}\label{fig:mylabel}
\end{figure}
Angles
\ang{6.8}
Whenever possible, LaTeX tables should be generated using R
and saved in the Results-Generated folder, then use (note that the file that generates is the same, such as sample-table.R, or sample.R)
\input{../../Results-Generated/sample-table.tex}
If a table is not generated in R
, then save an Excel spreadsheet or CSV spreadsheet in the Results
folder and use Table Generator Online and include the filename in the LaTeX document, so that it can be easily updated, if needed.
Bibliography
For bibliography, you can use the natbib or apacite packages, here is an example:
\usepackage[square,sort,comma,numbers,sort&compress]{natbib}
\usepackage[apaciteclassic,nodoi]{apacite}
#
\cite{Gredig_Substrate-controlled_2012}
# for author names\citeauthor{Gredig_Substrate-controlled_2012}
# for displaying the year of the article\citeyear{Gredig_Substrate-controlled_2012}
\bibliographystyle{plainnat}
\bibliographystyle{apacite}
#
\bibliography{myBib}
It is sometimes needed to make the bibliography smaller, since it may contain many citations, which are not used. You can use this main.R
to accomplish this: LaTeX Trim BibTeX
Useful Commands in R
First few lines of your R
code should load the libraries and also some common data:
library(ggplot2)
source('myConfig.R')
Creating relative file paths:
# generates ../RAW or ..\RAW depending on the OS
= file.path('..','RAW') my.path
Basic plot using ggplot2:
library(ggplot2)
= read.csv(file.path(path.RAW,'data.csv'))
d ggplot(d, aes(x,y, col=type)) +
geom_point(size=2) +
xlab('T (K)') +
ylab(expression(paste('M'[sat],' (10'^-6,' emu)'))) +
theme_bw(base_size = 18)
ggsave(file.path(path.FIGS,'MvsH-data.png'), width=6, height=4, dpi=220)
There are some libraries that are useful to analyze the following data:
- VSM: see Quantum Design PPMS package
- XRD: see Rigaku XRD package
- AFM: see AFM package
- NTE: see NTE package
Here is how you could load these packages:
# this needs to be installed only once:
install.packages("devtools")
::install_github("thomasgredig/nanoscopeAFM")
devtools::install_github("thomasgredig/quantumPPMS")
devtools::install_github("thomasgredig/rigakuXRD")
devtools
# libraries must be loaded each time:
library(nanoscopeAFM)
library(quantumPPMS)
library(rigakuXRD)
References
- Cheating and its Dangers, Dean F. Martin, Technology and Innovation, Vol 21, pp. 19-27, 2019.
Citation
@misc{gredig2021,
author = {Gredig, Thomas and Gredig, Thomas},
title = {M.S. {Thesis} {Guidelines}},
date = {2021-01-01},
url = {https://www.csulb.edu/~tgredig/posts/MS_Thesis_Guidelines/msthesis_guidelines.html},
langid = {en}
}