Friday, 23 January 2015

Memory about Dr. Stephanie Grothe in work

I was very sad to hear about the tragedy happend at Joffre Peak, B.C.. It was a hard period for me to lose such a good working partner: Stephanie Grothe. Many people had tell stories about how good she was in life. Here I would like tell you how great a person she was in work.


Steph and I had together in a few research projects with scanning tunneling microscope (STM), starting back in May 2011. 

At the beginning, when I was a newbie to STM. Steph, who was an expert, taught me all the operations in two weeks. She then said to me that “you are fast learner”. But I knew deeply in my heart that, without Steph’s great patience, accuracy, and expertise, I could not have acquired the knowledge so fast. She was a great teacher.

During the two years period working together, we had many successes. A crucial factor leading to the successes was her rigorous attitude towards to research and work. Our STM is like a spoiled baby. If one makes a tiny mistake, our STM would refuse to cooperate for weeks or, sometimes, even months. However, this baby was always happy under Steph’s “babysitting”, and with her, there was no operation mistake within two years. Additionally, Steph wrote a manual with all the details for operating the instruments, and it has becomes a  bible for everyone who is working on the STM. 

Another crucial factor leading us to the successes was Steph’s a positive and optimistic personality. In our research project, a single atom change can violate the measurement. Usually a good result comes after many failure trails. Therefore, one can easily become depressed and encounter feelings of wanting to give up in the middle of his/her projects. In our projects, Steph had never lose the patience even after many failures in months.  I was strongly influenced by her positive and optimistic attitude towards to our projects. We supported and encouraged each other in our projects, and solved the problems together. Finally, our efforts yielded four publications in peer-reviewed journals.

Beyond her brilliant her brilliant personality and remarkable expertise, she had a special talent of visualization. In our research projects, we often had to dive into a large set of data to discover new physics. Steph was extremely good at interpreting the data using graphs, in particular using colors. In our publications, most graphs were designed by her: they are beautiful and just right to show the physics. If you want to see her gift of visualization, you can see her publications as examples: http://lair.phas.ubc.ca/person/stephanie-grothe/

I felt extremely lucky to have worked closely with her at UBC. I learnt more from her than she from me. In particular, her rigorous attitude towards to work and life, and her positive and optimistic personality have profoundly influenced me for the better. She will be missed, and is being missed. 

Wednesday, 21 January 2015

Pandas In Ipython: Basic Plotting in Ipython notebook

As a beginner to Pandas, I post my learning curve to use this package.
First, I would like to summarize some basic and essential command lines for plotting a 2D graph.

When openning an Ipython notebook, one can use the following command:

ipython notebook --pylab

Which automatically import pylab.
Then import pandas:

import pandas as pd

read data (.dat) file using:

data = pd.read_csv('directory+filename', header = 12)

Here header the number of rows of describing text before data in your .dat file.

to view the data or data information, using some of the following commands:

data                    #show data
data.head()        #show first a few rows
data.tail()            #show last a few rows
data.keys()          #show the key words for each column
data.info()           #summarize columns
data.dtypes()       #show the data type of each column
data.describe()    #quickly gives mean, std, min, max values of the numberical columns

if you want to see all the data in a table, instead of only a few rows:

pd.options.display.max_rows = 1500 # if you have 1500 rows
data

you will see all data.

If you want to delete a redundant column:

data2.drop( 'column name/key', axis = 1, inplace=True)

Now, we want to plot the numerical data:

fig=figure()
# fig.clf()      #used for clear previous plot in the same figure
ax = fig.add_subplot(1,1,1)
plot_No1 = ax.plot(data.Temperature[0:186], data.Resistance[0:186], linewidth = 2., label=r"0T")
plot_No2 = ax.plot(data.Temperature[187:231],data.Resistance[187:231],  linewidth = 2.,label=r"1T")
ax.legend(loc = 2)    # show legned, with loc(ation) at  2 (up-left)
xlabel(r'Temperature (K)', fontsize = 20)
ylabel(r'Resistance ($\Omega$)', fontsize = 20)
ax.tick_params(axis='both', which='major', labelsize=15)
savefig('fig', transparent = True)


These commands can help you to quickly visualize your data.
I will explore many more advanced features in the future.