2008-06-23

My family names in United States

by Forrest Sheng Bao http://fsbao.net

Few days ago, I wanna check the ancestry of a friend. So I came across a website called http://ancestry.com

Yes, her ancestries may come from German as I guessed.

1. German, Dutch, Danish, and Jewish (Ashkenazic): regional name for someone from the territory of Hesse (German Hessen).
2. South German: from a short form of the personal name Matthäus (see Matthew).
3. German and Dutch: from the Germanic personal name Hesso

Wow, Eine Deutsch frau (A German women) ! "Deutsche Frauen, deutsche Treue, Deutscher Wein und deutscher Sang".

I also checked family names of several friends, English, Scottish, Irish, Polish, Jewish, etc. I also found that two friends who I thought maybe Chinese are actually Vietnamese. Wow, America, an immigration land.

The more funny thing was I could even find my family names on that website. And it's really correct, with perfect explanation to their Chinese meanings. Ok, let's have a look at it.

My dad's family name, also my family name is Bao:

Chinese: there are three different surnames that are Romanized in pinyin as Bao. Other Romanizations include Bau, Pao, and Pau.
Chinese 鲍: this character also means ‘abalone’, but the name comes from an old place name. The area of Bao was granted to a chief counselor of the state of Qi during the Spring and Autumn period (722–481 bc). His son took the place name as his surname and was called Bao Shuya. Bao Shuya was famous for his lofty moral character and was skilled at delegating authority, eventually becoming the first ‘Chief King’ of the Spring and Autumn period.

Wow, my family tree can be traced back to 481 BC. That's awesome.

My mom's family name is Zhang:

Chinese 张: the origin of this name goes back 4500 years to a grandson of the legendary emperor Huang Di (2697–2595 bc), surnamed Hui. Hui invented bows and arrows, and was put in charge of their production. In honor of his deeds, he was given as surname the character pronounced Zhang, which is composed of the symbols for ‘bow’ and ‘long’, meaning to ‘stretch open a bow’. Zhang has now become one of the most common names in China.

Exactly! The Chinese character consists of the symbols for 'bow' and 'long'. And this 'Zhang' is referred as 'bow-long-Zhang'.

Oh my gosh. Our Chinese names really have lots of meaning and long history.

I also found a book, "The Bao Family in History", about my family name in Amazon. I shall read it tell my son or even my grandson how the Bao family immigrate to US.

The Bao Name in History

Ok, let me translate those descriptions into Chinese for those who are interested in:

鲍, 这个字的意思是‘鲍鱼’,但是这个名字来自一个古老地方的名字。这个叫做‘鲍’的地方被赠与春秋时期(公元前722-481)齐国的一个首席执 政官。 他的儿子用这个地名作为他的姓,他被叫做‘鲍叔牙’。鲍叔牙因为他的崇高品行而著名,而且很擅长委派权力,实质上成为春秋时期的第一王。

张, 这个名字可以溯源到4500年前的传说帝王黄帝的一个孙子,姓 Hui (我搞不清是那个中国字)。 Hui 发明了弓和矛,并且负责生产他们。为了表彰他的贡献,他被赐姓‘张’,是由'弓'和‘长’这两个字组成的,意为‘用劲拉开一个弓’。 ‘张’ 是中国最常用的名字之一。

Life of an Academic in the US by Dr. Yu-Chi "Larry" Ho

Dr. Lo is a professor in Harvard University. http://people.seas.harvard.edu/~ho/
He has a bachelor degree in Electrical Engineering from Harvard University and a PhD degree in Applied Math from MIT. http://en.wikipedia.org/wiki/Yu-Chi_Ho

His blog is very good. He writes in English and his students will help translating them into Chinese. But the typesetting of his English article is not reader-friendly. So I quoted one article here to share with my friends. He used some China words in this article. Maybe you should just skip it or ask me :)

The following article is cited from http://www.sciencenet.cn/blog/user_content.aspx?id=1808

=====This is a split line. Following are Dr. Ho's original article.=======

Except for three years of full time work in industry I have spent my live in academia in the US. Even though I had only worked for one university in my entire career, I did spent semester long sabbaticals in residence in UC Berkeley, U.Texas Autstin, Imperial College in London and short visits to countless scholarly institutions around the world. Thus, it might be worthwhile for me to describe for my Chinese sciencenet readers my 40+ years experience and contrast them wherever appropriate with practices in China. Of course, the types of universities in the US are enormous. I am talking primarily of research universities. Excellent purely teaching college, such Williams College in Wiliamstown, Massachusetts, Swarthmore College in Philadelphia, Pa, etc. are not included. Lastly, what I describe below are my personal experiences and should not be construed as typical or general truth.

To advance your career in a first class university, you have basically two routes. First you can be a great teacher (not just good teacher). This means you have to be able to create, organize and teach large and popular undergraduate courses such as beginning economics, physics, or computer science. This is easily said than done. Because the number of people in a department technically qualified to teach such course are many. You have to demonstrate extraordinary teaching and innovative ability. Furthermore, the number of such course with large undergraduate demand in a university are few. In my 40+ years at Harvard, I have seen many very good or near great teachers did not get tenure and had to leave. (footnote: In the US, we have the so-called seven year rule: you either get tenure or you must leave the university within a seven year trial period. Universities do not observe this rule will be blacklisted by the American Association of University Professors AAUP.). The other route to advancement is of course through research. While teaching is basically a local phenomenon, research is world wide. The cost-benefit of excellent research is greatly in favor of research over teaching. But here in first rank universities, you are competing with the entire world. For example in tenure decisions at Harvard, comparison with other authorities in your field world wide are deliberately sought when your case comes up for evaluation. After my own promotion from within Harvard in 1965, our department did not promote another junior faculty member to tenure for 30 years in the systems field. Although you will not get the president and deans to publicly admit this, I have recognized early and have continued to counsel young faculty members that “Harvard pays you to maintain and enhance her international reputations. Everything else is secondary”. Thus, rule #1 – Establish your world wide scholarly reputation early.

To pursue research you must have funds and students. In fact without funding you cannot support and thus have students. Depending on the availability of scholarships or fellowships, most graduate students are supported by the research funds of their thesis advisers in the US. It cost US $50,000 per year more or less to support one graduate student. If you have 5 -6 ph.d. students in the pipeline at any one time, then your minimal budget is more than quarter a million dollars per year which the professor must apply for and compete with other scientists in your field nation wide. In the first two years of supporting a graduate student, you basically get no return. A ph.d student only begins to produce in the third and fourth year. Thus, a professor invests quite a bit when s/he begins to support a student. I have known colleagues who swear that s/he will never admit another Chinese students because they come for one or two years and then leave for a better school or opportunity. While America is a free country, legally there is no obligation to stay and complete your ph.d, ethically one has certain obligations after a professor has invested so much in you. This is something not all Chinese students realize and such behavior burns the bridge (过河折桥) for student that plans to follow.

At least 25% of you working time for active academic scientists are consumed by writing proposals, reports, and papers in addition to real research effort. Thus, rule #2 – Learn to write and speak well and know what subjects are hot, i.e.时势造英雄 (Of course, even better is to create a research subject yourself and convince the world it is hot. 英雄造时势).

Both rules #1 and #2 mean that you must be “visible” to the rest of the world. You do this by publishing papers in prestige journals and give good talks at conferences. Many scientists consider doing the research is of paramount importance, but writing a paper and giving a talk on your results as more or less trivial tasks in comparison. But unless you have truly world shaking results such as the theory of relativity or the human genetic code, your work will be competing for attention with thousands of others who are just as smart as your are. In fact, it is my personal opinion that having a good idea, writing a good paper to report it, and giving a good presentation of it are three SEPARATE, and equally IMPORTANT endeavors. Efforts involved in each are distinct and different. Giving a presentation does not mean producing a set of PowerPoint slides from cut-and-pasting your written papers and nor reading paragraphs from your papers. Too often we see otherwise brilliant scientists give poor or un-intelligible talks. In fact, by definition a good talk must be understandable to the average audience and yet at the same time be impressive to the experts. Statistics say that an average published technical paper is read by less than five persons including the editor and referees. But a good talk are heard by dozens of people and hundred or even thousands for plenary talks. One month after your talk most of the audience will not remember what you talked about without reinforcement. But they will remember the fact that you gave a good talk for many years. The reward of such audience-centered presentation effort often surprises you in unexpected ways. On this point, the program officers of various government funding agencies go to conferences primarily for the purpose of finding out what topics are hot and who are worth supporting. They are often in the audiences when you give a talk. The importance of giving a good and understandable presentation are obvious. Yet I am continuously surprised to find brilliant scientists insist on giving self-centered, incomprehensible, and arrogant talks. When I was younger, I use to consider myself ignorant if I cannot follow a talk. Nowadays, if I cannot understand what the speaker is saying, I blame the speaker. It is his duty to make his presentation clear and not wasting my time. My motto is “one can make anything understandable to anybody in any amount of time at the appropriate level”.

Traditionally, devoting your life to scholarly endeavor means committing to relative poverty since academic salary cannot compare with that of industry and commerce. However, in science and technology this is not necessarily true anymore. Consulting for industry can add to your income substantially. But the real benefit of consulting is the fact you are dealing with real problems which often inspire new research directions. Any success you achieve will have a cheering team ( 拉拉队) automatically built in. No extra efforts are needed to convince others of the importance of your work. And you will be not spending effort on something no one is interested in (钻入牛角尖). Almost all US universities recognize this benefit and permit their faculty one day per week to pursue such consulting endeavors. In my own case, I have continuously consulted throughout my academic career and can claim all my good research ideas came from taking on consulting work which I know very little about at the start. The right kind of consulting is truly a win-win-win situation for the client, the university, and yourself.

Another fringe benefit of academic life is that you get to travel extensively by attending international conferences on official business. Unlike business meetings where time is tight and you basically go in and out of a place with little time for leisure activity. You generally find time during or after conferences for tourist activities. (see the example of the blog by Dr. 王鸿飞 recently in these pages). The marginal cost to you is minimal compare to the entire cost of travel. There is a travel book entitled “1000 place to visit before you die”. In 40+ years of academic travel, my wife and I have been to 230 of the 1000 places listed as well as places not listed. There is an old Chinese saying: 走千里路胜读万卷. You actually learn a lot from being a tourist. Furthermore, in academia you have friends all over the world that you have only met for the first time. Because of your shared interest in the subject of research, it is truly 一见如古. They are excellent local guides. (footnote: I once asked one of my Chinese graduate student to help a visitor from South America. Upon return, she was so excited to tell me that this complete stranger understood the exact subtleties of her thesis research despite the fact they have never met, are from different countries separated by geography and generation. Such meeting of minds is the indescribable joys of research).

Speaking about the joys of research, when you discovered something good for the first time after months of hard work you enjoy that few seconds of ecstasy that you are the only person in the world who knows this truth. Such a feeling is difficult to describe. You will not be able to sit still, you pace back and forth, you will not be able to sleep that night, and sometimes your stomach will tie into knots in pleasurable pain. Although I cannot say for sure since I don’t have the experience of commerce. This pleasure of discovery cannot be less than if you just win a big contract or made a killing in the stock market. If I experience such feeling once a year, I am very satisfied. If one looks back over his life on all the papers he has written and published, perhaps 10% stood the test of time. This is very much like travel. You are glad you have been to various places. But only a few localities are truly memorable.

Above all, the life of an academic is basically flexible and on your terms. You are your own boss. With the exception of funding, you have far less of the many mundane and uninteresting duties of an ordinary business person. Nearly 50% of your time you can devote to things you truly enjoy, i.e., research and seeking truth. And I always tell my students that in life if you like 50% of the things you do in your job, it is a GREAT job! Because you like what you do, you do work very hard. Weekends and holidays are no different. 20 hour day and 100 hour week are frequent. Even at my age and officially retired , more than half of my waking hours are dealing with scholarly and technical matters.

Things I learned through many stays in China and articles I read here in this sciencenet blog tell me that the academic life in China is beginning to globalize and resemble academic life in rest of the world. I look forward to exchange more notes with colleagues here and elsewhere in the future.

2008-06-19

Time stamp issues in EDF data converted from Stellate SIG format

by Forrest Sheng Bao http://fsbao.net

I think there is obvious a bug in Stellate Hamonie system, the software to sample data from EEG electrodes and manage them, convert them into EDF format. Actually, the EDF data converted from SIG has many problems, time stamps in wrong order, time stamps of wrong seconds, all-zero amplitudes, incorrect starting time, etc. I spent a lot of time to understand what's going on. At first, I was even frustrated that I couldn't use those data. Let's have a look at the data of their own SIG format and the data of EDF file converted from it.



This is the snapshot of viewing one channel data from their software, the Hamonie. The resolution of Y-axe is 10uV/mm while the time interval between two vertical green bars is 1 second.



This is the plot from EDF file converted by Hamonie, of the same data as above picture. The Y ticks are voltages in uV while the X ticks are numbers of sampling points (200 points = 1 second).

At first, the sign of above two images are opposite. This is because by default, the polarity in Stellate Hamonie system is negative up. Thus, their Y-axes is up-side-down. You can't change this setting in version 6.1, the one I got from the Chinese hospital. In version 6.2 of Stellate Browser, you can set it. Just click menu "Channels" -> "Edit", and set "Polarity" by clicking "Pos. Up" as follows:

The time stamps in EDF data have more problems. I used the Amplitude-Time cursor tool (In Stellate Browser menu: Tools -> Amplitude-Time curcor) to check exactly the value of each points on SIG data, and compare with those in EDF format data.

1. The time stamp of the first sampling point.

Firstly, according to EDF+ protocol, the time stamp of the first sampling point should be 0, which means the starting time of the series. If you sampling rate is 200Hz, then the time stamp of the second point is 0.005 - 0.005 second after the start. That makes the data I got can't pass the EDF compatibility test in several software. Let's have a look at the first sampling point of the EDF file:

23.303000,7.782218,-15.717028,5.035553,-9.765921,3.814813,-2.136295,4.272590,7.171848,9.765921,13.580733,19.837026,-30.060724,10.681476,-1.831110,-4.882960,11.749623,7.477033,-8.392588,13.580733,1.678518,-2.746665,11.597031
The 23.303 means this point is sampled 23.303 second after the record starts. Entries delimited by commas corresponds to signals defined in EDF header. For example, the 7.782218 corresponds to the Fp1 electrode.

I felt very confused about the relationship between the time stamps and time instants in SIG file. So I did a small experiment. I tried to read amplitude of first several samples of SIG data from Stellate Browser, and compared them with data read from EDF file.

Time stamp on SIG dataTime stamp on EDF dataAmplitude on SIG data (uV)Amplitude on EDF data (uV)
Sample #117:22:51:30523.30387.782128
Sample #217:22:51:31023.3081918.768878
Sample #317:22:51:31523.31388.239995
Sample #417:22:51:32023.3181212.20741
Sample #517:22:51:32523.32364.425183

Ok, so I think i don't need to care the time stamp. Each line follows the order.

2. Time stamps for any arbitrary interval

The doctors in China will tell me the time of ictal activities in form of absolute clock, like 22:23:34 Jun.03, 2008. I need to be able to locate the sampling point corresponding to a give time instant.

I did another verification to make sure the relationship is linear. As you can see from above two snapshots, there is a big peak, whose amplitude excesses 100uV, at round 5.5 second, thus the 1100th sample. Here are the data for that area:


Time stamp on SIG dataTime stamp on EDF dataAmplitude on SIG data (uV)Amplitude on EDF data (uV)
Sample #110917:22:56:85028.842109108.951051
Sample #111017:22:56:85528.847109109.408828
Sample #111117:22:56:86028.8529292.103282
Sample #111217:22:57:86528.8577878.432549
Sample #111317:22:57:87028.8527676.143661
Sample #111417:22:57:87528.8628483.925879
Sample #111517:22:57:88028.867112112.308086
Sample #111617:22:57:88528.8729897.506612
Sample #111717:22:57:89028.8778079.500697
Sample #111817:22:57:89528.8828585.146619
Sample #111917:22:57:90028.887104104.373275
I think my guessing is correct. The time between the 1st and the 1100th sampling is (1110-1) x 0.005 = 5.545 seconds. The time stamp of sample 1110 in SIG data should be 17:22:51.305 + 5.545s = 17.22.56.850. The time stamp of sample 1110 in EDF data should be 23.303 + 5.545 = 28.848. It's not 28.847! I checked the data and found the problem. The time stamp of the 200th sample is 24.298 while the one of the 201th sample is 24.302. I am not quite sure about the reason. Anyway, it's not a big deal.

3. Time stamps of last 1 second

The time stamp of the last 1 second is totally nonsense. The time stamp can jump from 36.297 to 0. In the data above, from 2601st sample to 2687th sample, the time stamps are from 0 to 0.430. The last time stamp of SIG data is 17:23:04.735, which should correspond to the 2687th sample ((17:23:04.735 - 17:22:51.305) x 200 +1 = 2687). But, the EDF file has the 2688th sample. What's wrong? Let's have a look at the samples 2685 to 2688:

Time stamp on SIG dataTime stamp on EDF dataAmplitude on SIG data (uV)Amplitude on EDF data (uV)
Sample #268517:23:04:7200.420-21-21.363
Sample #268617:23:04:7250.425-12-12.0548
Sample #268717:23:04:7300.430-15-14.8015
Sample #2688There is no such sample in SIG data0.435There is no such sample in SIG data-14.3437
So I still don't know where does the 2688th sample come from. Just neglect it.

4. All 0's record

From 0.44 second to 0.995 second in EDF data, amplitudes of all channels are zero's. I think maybe the Stellate Hamonie system wanna pad one complete second. Anyway, those data, just forget them.

5. The time the record starts

As i said before, I need the starting time of a record to determine the number of samples to a given arbitrary absolute time. This is also funny. On the SIG data, it says the record starts from 17:22:51.305. But in the EDF head, it says: 17:22:28. I checked the header information of SIG data, it is also 17:22:28. So what happened from 17:22:29 to 17:22:23?

Anyway, this is not a problem since I have figured out the relationship between time stamps in SIG data and EDF data. I just need to consider the time stamp of first sample in SIG data as the starting time.

Done!

Ok, so it is really hard to understand a format that you don't know before, along with that strange software. I still have some problem, the actual data of long-term EEG monitoring is very big, like 2G or 3G. But my old program load the entire data into the computer memory. Now, it is impossible. I need to play some programming tricks.

2008-06-14

Backing up MySQL database in mysqldump

by Forrest Sheng Bao http://fsbao.net



MySQL official documentation provides two ways to backup. One is mysqldump. Another is mysqlhotcopy. But I don't like mysqlhotcopy since I don't like seeing so many table files. So I like mysqldump, giving me just one sql file.



 mysqldump --user=root -p drupal > newdrupal-20080614.sql


You will be prompted the password. And then I will using bzip2 newdrupal-20080614.sql to compress it.