Yang's blog

Tips for U of U thesis format approval

I have used both MS word and Latex for thesis formatting. Although it is easier to use the Latex template, there are still several things that could make you print another one hundred pages again. To save trees on our planet, here are some tips that could make your thesis writing a little easier.

1. My first suggestion is to put all your tables and figures at the end of each chapter. This will save you a lot of time dealing with the strict space and format requirements for tables and figures.

2. If the fonts in your figures are not big enough (at least 2mm), simply increase the size of those figures in your thesis instead of searching your long-time-no-see Python or Matlab code and changing the plot script there.

3. If you use the Latex template from the Math department of the U, there are at least two things that you should pay attention to.

a. If you use “\usepackage{uuthesis-2011}” as in the template, you will find that the spaces between paragraphs could be a little bigger than the spaces between lines inside a paragraphs. Simply commenting that line will solve the problem.
b. If you have a section headline immediately following a chapter headline, make sure to use “\fixchapterheading” in between. For example, the beginning of your Latex file should be something like this:

\chapter{Radio Localization} \label{Chapter:Chapter2}
\fixchapterheading
\section{Introduction}

4. If you use copyrighted material from published papers, even if your own papers, you must get permission documents from journals or conferences. Also remember to get the multiple author release forms from your coauthors. If you only need material from IEEE journal/conference, things will be a little easier. Just go to the IEEE Xplore webpage of the paper, click on “request permissions”, then choose “reuse in a thesis/dissertation”. Print out the page shown to you, and submit it to the thesis office.

5. Finally, before printing your pdf, make sure to check printer settings. Don’t check the “auto rotate and center” option, and also make sure to choose “none” for page scaling so that the page scale is 100%.

Processing large datasets from laptop at home

I have been working on processing lots of large datasets, such as long-term remote sensing data, and large-scale sensor network data. It is often necessary to log in a remote server and process these data for a long time. However, if you start a program from your laptop and then want to do other things, your program will be killed if you log out the server, or lose internet connection, or close your laptop lid to sleep mode. So you want to leave your program running in background on the remote server even if you log out the system.
A simple way to do that in linux is to use the "nohup" command. The following is the detailed procedure that I use to run my matlab or python codes on a remote server from my laptop at home.

1. log in a server via ssh: ssh user_name@lab1-1.eng.utah.edu, for University of Utah CADE Lab users.

2. write a simple shell script, like run_mycode.csh,
for Python code, it can be as follows:
ipython << EOF
run mycode.py
exit
EOF

for Matlab code:
matlab << EOF
mycode
exit
EOF

3. excecute the shell script depending on which script (csh/sh/tcsh) used in the server: nohup csh run.csh & for C shell.

4. check if your program is running, then close the terminal.

Note that, if you find something wrong with your Python or Matlab code, you can always kill that process, make changes to your code, and then repeat the above procedure.

Another way to process large datasets from home without worrying about network connection and logout problems is to use shell session management tool "Screen", which is available for most Linux distributions like Red Hat and Ubuntu. For Ubuntu servers, you can also use "Byobu", which is a more advanced version of Screen.

Making animations by python

It is often necessary to make an animation from a series of figures to show your results to others. I find a useful python toolbox that can make this very easy. The following is a few steps to make an animation file by python.

1. First install the open source toolbox scitools from http://code.google.com/p/scitools/
2. In your python code, import the easyviz package: from scitools.easyviz import *
3. Then, save figures as files with names fig#.eps: savefig('fig001.eps')
4. Finally, make the animation: movie('fig*.eps', encoder='convert', output_file='animation.gif')

If you want to make an animation in other formats like mpeg, just change the encoder to 'ffmpeg' or other key words. The detailed information about this "movie" function can be found from the document of the scitools package.

Syndicate content