Monday, March 09, 2009

supermongo script.

http://www.dur.ac.uk/physics.astrolab/sm.html
-----------------------------------------------------------------------------------------
crontab example:

33 16 9 3 * /data/lgou/LMCX-1/rxte/DataAnalysis/exampl_sm/script 0 gou.ps examp /data/lgou/LMCX-1/rxte/DataAnalysis/exampl_sm >& /dev/null
-------------------------------------------------------------------------------------------
csh script file which call for supermongo:

#! /bin/csh
#
# specify time on screen, select models, the script filename, and the working directory.
set wait = $1
set psfile = $2
set script_name=$3
set work_dir=$4


########################################################################
# Start SM
#

cd $work_dir
echo $work_dir
sm -S << FIN
define wait $wait

# do not alter the code above this line

# The following line outputs checks if the user has enetered a 'wait' time >1
# if the 'wait' time from the command line is 0, then the output is sent to a file
#
# to output to gif rather than postscript, uncomment the second line and
# comment out the first line
if (\$wait) {device x11} else {device postencap $psfile} # output to .ps
# if (\$wait) {device x11} else {device gif $psfile} # output to .gif
echo $psfile

# Type your sm commands here. An example is provided

inp $script_name

# do not alter below this line

!sleep \$wait
FIN

exit
---------------------------------------------------------------------------------------------------
sm script file:


#device postencap myfile.ps
set x = 1, 1000, 1
set y = (x**2.5 * lg(x)) + 1.

window 2 1 1 1 # define a window which is 2 in x, 1 in y
# and plot current data into bottom left window
ticksize 0 0 0 0

ctype black
expand 1.0
ptype 10 3 # use an open polygon with 10 sides
lweight 1.
limits x y
box 1 1 1 0 # label all of the axis except the RHS y-axis

expand 0.5 # make the points half the size
points x y # draw the points in x and y
expand 1.0 # set the rest of the plot back to normal size

relocate 50 8.5e7
label This is a more complex plot
ltype 4
relocate 50 8.2e7
draw 800 8.2e7

expand 1.3 # label the x and y axis
xlabel x-axis
ylabel y-axis
expand 1.0

# now make same plot, but in log scale in y
window 2 1 2 1 # now change windows and make a different plot
ticksize 0 0 -1 0 # plot the y-axis in log scale

set z = lg(y) # take the log of y
limits x z # reset the limits for the new data
box 1 0 1 1
ptype 4 3
ctype blue
points x z

ctype black
expand 0.8
xlabel x-axis

Sunday, March 01, 2009

眼睛治疗。

http://ngotcm.com/bbs/?action_viewthread_tid_90562.html
这是 一位60多岁的师兄和我分享的,他原有老花及近视,做这个穴道按压半年后去验视力已达1.2,现在他已不带眼镜。有空就按压明眼穴。工作离不开电脑的人更需要这个妙方!祝您健康!舒缓眼睛疲劳的妙方明眼穴上了年纪。容易老花眼,试试看明眼穴的按摩,保证您会耳聪目明。工作离不开电脑的人,需要这个妙方!假如我们常常感到眼睛疲劳,但又不是睡眠的时间,这时我们可以利用穴道按摩法,来舒缓眼睛疲劳的症状。在我们的拇指上有三个相邻接的穴道,分别是明眼、凤眼、大空骨(如上图)。明眼、凤眼能够改善眼睛疲劳和急性结膜炎,大空骨则可改善一切有关眼睛的症状。平时眼睛容易疲劳的人,每天要刺激这三个穴道两次。刺激的方法是,用另一手的拇指和食指夾住,以拇指的指甲分別对着三个穴道施予刺激,只要以稍微感觉到疼痛程度的力气来指压即可。这是项简单的按摩方法,当工作的休息时间,或是等车的空档,任何时间均可自行操作。眼睛疲劳往往不容易入睡的人,如果施予上述的刺激来消除眼睛的疲劳,便可轻易入睡,以上的方法还可以抑制老人性的白内障。 
希望大家天天健康!