2007/01/16

Thx Fetch Softworks =D

Fetch is an easy-to-use, full-featured FTP and SFTP client for the Apple Macintosh. New features in Fetch 5.2 include WebView, FTPS support, droplet shortcuts and overhauled FTP networking...

以上是廣告 XD
但我就是要幫它打廣告~
因為它真的很慷慨,原價25美金的軟體,教育價不用錢!
At the store you can "purchase" a license to Fetch for $0, and you will be emailed
a serial number. You should "purchase" the license in the name of your school or
charity, and distribute copies to anyone in your organization.
它通過了我的申請,讓我申請了一組序號,所以~
清大天文所、物理所的蘋果人請與我聯絡取得專屬的序號,但請勿公佈出去。
因為它如果發現我們有外流會將這組序號給disable掉的。
NOTE: Do not put the serial number on a web page or in a file that can be downloaded
by people outside your school or charity; doing so will make it necessary for us to
disable the serial number.
最後再次感謝它的慷慨=D

2007/01/05

The HEASARC Database Batch Interface!!

作為新年第一發的文章,似乎有點硬,哈哈!
不過管他的,這是我自己的不拉嗝=D

The batch interface allows a user to interrogate the HEASARC databases as if they were local to the users machine. The user downloads a pair of small Perl scripts which act as a local client to query the database. The client is configured to be easily called from programs or from within command scripts -- though it may be used interactively. (摘錄自官網)

嗯~最近就是需要這種東西,果然前人種樹後人乘涼,嘿嘿~
有現成軟體當然抓下來用囉!

請先確定你的perl版本然後下載:
1. webquery.pl (Perl 5.x) or webquery.pl (Perl 4.x)
2. browse_extract.pl
3. browse_extract_wget.pl (optional)

第三項的檔案是選擇性的,你何時會需要她呢?
當你使用第二項的程式,然後因為firewall等原因,
造成第一項的程式無法順利下載檔案時,你就需要她!
她改利用wget來抓檔案!

又她們下載回來後,請先查出你的perl安裝的路徑,
利用vi修改她們的第一行預設:
#!/usr1/local/bin/perl5
變成你自己機器上的路徑,像我的:
#!/usr/bin/perl
這樣就可以開始玩囉~

她的使用方式如下,在terminal中先到你的工作目錄,
Usage:
browse_extract.pl table="table" position="name|coordinates|Null" time="time|time_range" coordinates='Equatorial|Galactic"
equinox="year" radius="arcmin" fields="Standard|All|list"
name_resolver="CheckCaches/GRB/SIMBAD/NED|CheckCaches/NED/SIMBAD|NED|SIMBAD"
infile="input_list" outfile=output_file" format="Batch|FITS|VOTable|Excel|HTML|Text"
sortvar="column_name" resultmax="count" param="name,value /or/ name=value"

例如,我想來搜尋RXTE在 MJD:50227 時有那些觀測,並希望她能存成FITS格式給我,
我下的語法是 =>
browse_extract.pl table="xtemaster" position="null" time="50227" outfile="mjd50227.fits" format="fits"
然後我就可以利用fv等程式來閱讀囉~

如何~方便吧!
寫個shell script讓她更好用~嘿嘿!

註:參數說明請直接利用任何文字編輯程式觀看「browse_extract.pl」。

2006/12/01

岡山羊肉@慈雲路

昨天開車回新竹的路上~突然想起了這間店~
當然又想起了那時候的點滴...

於是~下了95A後便繼續直走~
經過了一段速限only四十得很難開的匝道~
下公道五~右轉~直走一小段再右轉~再直走...
經過了以前的窩~天呀~那附近變化真大~
跟以前剛搬過去時的荒涼簡直不能相提並論!

過了紅綠燈~yes~岡山羊肉到了~
老闆娘見到我時有楞了兩三秒~可能對我還有點印象~
按照慣例,還是點了一盤羊肉炒麵跟一碗當歸羊肉湯~
按照慣例,.......

吃的時候一直勸自己乖乖的吃~別想太多~人生嘛!
不過忘記請老闆不要放太辣~害我邊吃邊流汗!
但,真的是不錯吃!

臨走前用 K610i 拍了一張照片,紀念,某年某月到某年某月的回憶!

只是murmur....

2006/11/22

!@#$ Python 2.X.X....

以下內容來自 ActivePython 的網站~

How do I revert to MacPython from ActivePython?

There are three popular Python distributions for Mac OS X.

There is the pre-installed distribution that ships as /usr/bin/python and has its frameworks in /System/Library/Frameworks.

There is also MacPython, the Python distribution from the macpython.org guys
(andpointed to by python.org). This is a 3rd-party Python distro. This installs as
/usr/local/bin/python with its frameworks in /Library/Frameworks.

Then there is ActivePython. This also installs as /usr/local/bin/python with its frameworks in /Library/Frameworks -- the same location as MacPython. When ActivePython is being installed the installer will look for MacPython and prompt to move it out of the way, rather than overwrite it. Because of the way Mac OS X works you can only have one of MacPython or ActivePython as the "current" python at a time.

The ActivePython install notes show how to uninstall ActivePython:
Apple does not provide a standard uninstallation tool or mechanism. You may, however, use the pydistro.py script that comes with ActivePython to uninstall ActivePython:

sudo python /Library/Receipts/ActivePython-2.4.pkg/Contents/Resources/pydistro.py \
activepython_uninstall 2.4

註:貼這些是因為~我想在我的powerbook上面安裝 Veusz !
但它需要的是 MacPython 所以我得先把 ActivePython 幹掉...
或許以後只要安裝 MacPython 就好~因為 QtiPlot 一樣可以執行~
而他的安裝檔又是 Univesal 的!

[按我下載 MacPython]

註註:請到 atg 網站上面下載他們打包好的 Veusz Installer (for ppc only)!
此軟體還需要 Numarray 這 python package...
Optional requirements:
PyFITS>=0.9.8.2 http://www.stsci.edu/resources/software_hardware/pyfits

又我為啥要裝它~因為聽說它可以畫出這樣的圖~


不過又得先來學 python 的語法囉~咕狗大神是你的好朋友!

2006/11/20

QtiPlot

QtiPlot - 你可以稱她為 Mac 上面的 Origin
~ 重點是她免費 ~

這裡順便推薦一個網站: ATG - free software for research & teaching
安裝 QtiPlot 所需要用到的軟體在 ATG 都能找到,
方便起見,我直接將所需軟體及其連結列於下方,
~請依照您的 CPU 下載~

[It needs Mac OSX 10.4 or higher]

1) Mac /Qt 3.3 "Minimal"-installer
=> PPC : QtMac335-Mini-Tiger.pkg.zip
=> X86 : QtMac336-Mini-Intel.zip

2) Python 2.4
=> PPC : ActivePython-2.4.3.11-macosx-powerpc.dmg
=> X86 : ActivePython-2.4.3.11-macosx-x86.dmg
或
Universal Python => python-2.4.4-macosx2006-10-18.dmg

3) QtiPlot
=> PPC : qtiplot087PPC-Tiger.zip
=> X86 : qtiplot083Intel.zip

請按順序安裝後即可使用~方便吧!
以下是執行的畫面~



感覺跟 Origin 真的一模一樣!
先來試用看看吧!

2006/11/17

ESO的禮物!!

那天昭賢跟足球在搜尋gsl的時候突然發現一套名為「Scisoft」的軟體,
擺明就是跟科學相關的軟體,在仔細去看~
它打包進去的軟體幾乎都是針對天文觀測資料的!真是太神奇!

我後來作了一些探究才發現~原來這是ESO底下的一項計畫呢!
----
Scisoft is a project within ESO to provide a collection of astronomical software utilities in a uniform way at all four ESO sites and to make them available to the outside world. The current version, Scisoft 6.1, September 2006, is only available for Fedora Core 3 Linux...

請參考此計畫的網站:http://www.eso.org/science/scisoft/

其實網站上還有提到~
----
In addition a version of Scisoft for Mac OSX has been prepared by Nor Pirzkal and Francesco Pierfederici but it is not an ESO product.

所以請到這裡來參觀:http://www.stecf.org/macosxscisoft/

附上一張在 VersionTracker 上面找到的 screenshot~



亂神奇的吧!~

我有下載下來~並嘗試安裝在 CRAB#6 (Mac Pro) 上面~
不過沒時間測試,裡面有些軟體也都沒用過~
在加上其實有一半的套件我早就裝好了~
這應該是給一台「新」蘋果安裝的吧!
所以心裡毛毛的我就先砍掉它!

有興趣的人請上去點選下載鍊結哱!
記得要裝在「 / 」下面,她的「殼層」推薦是 tcsh !
其餘請看解出來的安裝說明!

2006/11/15

Color the OSX Command Prompt!!

嗯!我承認osx很好用~
除了她的黑白終端機跟單調的vi介面之外~
而且她的terminal對中文檔名的支援也是!@#$~

其實還是有解決的辦法~而且還滿簡單!
修改你的 .profile 加入以下環境變數:
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export TERM=xterm-color

登出該終端機~在開一個新的終端機~列出檔案看看!

而vi也是可以變彩色的~而且可以把熟悉的游標座標呼喚出來~
辦法是先去 http://macvim.org/OSX/index.php 下載app型態的vim 7.0
將檔案解壓縮後~其實安不安裝都可以~看你喜不喜歡app版的vim!
因為我們只是要從她的套件內容中拷貝出設定檔範例來使用~
將 Vim.app/Contents/Resources/vim/runtime/vimrc_example.vim
另存為 ~YourAccount/.vimrc
從此你的vi就變彩色了!
(不過你的 .profile 中一定要有 `export TERM=xterm-color` 才行。)

又其實列出檔案時可以透過正確的參數來顯示中文的檔名~
試試執行 `ls -w` ~應該會讓你感動唷!

以上。

註:不知道是不是我那裡有操作錯誤~
在 Mactel 的機器上面我總是得將 .profile 另外拷貝成 .bashrc
才會在 X11 底下正確出現我設定的環境變數...
可是我的威力書卻不用多此一舉!呵呵~還真奇怪!

註註:為了方便各位 vimrc_example.vim 可以這裡抓!