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」。