Tuesday, June 23, 2015

Ureka installation and using IRAF

วันนี้พบว่า ลงแบบ stand alone ยังมีเว็ทค่าผิดพลาด จึงตัดสินใจ ลงด้วย Ureka ดังนี้

Quick Installation

  1. Download the installer for the current version of Ureka to the desired install location (right-click and Save Link As...):
    http://ssb.stsci.edu/ureka/1.5.1/install_ureka_1.5.1
    -OR-
    copy/paste one of these commands into a terminal window to download the installer:
    wget http://ssb.stsci.edu/ureka/1.5.1/install_ureka_1.5.1
    
    curl -O http://ssb.stsci.edu/ureka/1.5.1/install_ureka_1.5.1
    
    (Both commands do the same thing. It is often the case that Linux has wget and Macintosh has curl)
  2. Run the installer:
    sh ./install_ureka_1.5.1
    
  3. The installer will ask you to enter an installation name and will ask for permission to edit your login scripts.
     
หลังจากนั้นรัน ur_setup ก่อน โดยเปิดใน terminal ใหม่ เมื่อเซ็ทหรือปรับค่าเสร็จแล้ว ทำการตรวจสอบระบบโดยพิมพ์คำว่า
ur_test
The ur_test script will run a series of tests, and provide a summary of how many tests passed and failed.
If there were failures, a more detailed log will be produced.
Here is an example of output from a ur_test run in which one error and one failure occurred.
Your operating system supports 32-bit executables.
Running tests... pass=77 fail=0 error=0
 ถ้าเป็นแบบนี้แสดงว่าลงระบบผ่านทั้งหมด ทั้งนี้จะติดตั้งเร็วหรือช้าขึ้นอยู่กับอินเตอร์เน็ตของเราว่าดีขนาดไหนนะค่ะ เวลาจะเรียกใช้ IRAF ให้สั่ง mkiraf เพื่อตั้งค่า เลือก xgterm หรือ xterm เพราะ IRAF ทำงานได้ดีใน terminal ประเภทพวกนี้ (คือสร้างสคริปต์ไฟล์ login.cl ขึ้นมาให้เรียกใช้งาน) จากนั้นพิมพ์ในเทอร์มินัล นั้น ๆ ว่า .......cl......ก็เป็นอันว่าใช้งานได้แล้วค่ะ

Monday, June 22, 2015

การติดตั้ง IRAF บนลีนุกซ์ อีกครั้ง....(IRAF installation for Linux machine again&again)

package IRAF ที่ใช้ติดตั้งบนลีนุกซ์ได้ สามารถหาหรือ download ได้จาก 3 รูปแบบดังนี้

1) Scisoft  (http://www.eso.org/sci/software/scisoft/) เป็นชุดเครื่องมือใช้สำหรับการสังเกตการณ์ของ European Southern Observatory (ESO) หนึ่งใน packages ที่ใช้งานก็คือ IRAF  ซึ่งจะต้องติดตั้ง Scisoft ให้เสร็จก่อน .....เวอร์ชั่นปัจจุบันของ scisoft คือ  Scisoft8.0 (Dec. 2014; work on fedora core 20)  ถ้าต้องการไฟล์ ต้องติดต่อเจ้าหน้าที่เพื่อดาวน์โหลดโดยเฉพาะ.... เพราะฉะนั้น version 7.7 จึงเหมาะสำหรับการใช้งานในปัจจุบัน สามารถโหลดได้จากเว็บ FTP   ftp://ftp.eso.org/scisoft/scisoft7.7/linux/fedora11/
ขั้นตอนการติดตั้งมี 2 แบบหลัก ๆ คือจะใช้ Yum หรือ rpm ก็ได้ .....เนื่องจาก Scisoft ถูกออกแบบมาใช้สำหรับ Fedora linux เท่านั้น หากใครใช้ Ubuntu ต้องเข้าไปอ่านวิธีการติดตั้งจากกระทู้ก่อนหน้านี้ แต่ถ้าใช้ centos หรือ suse ก็แนะนำว่าติดตั้งแบบ rpm จะดีที่สุด 
ขั้นตอนที่แปะนี้ สำหรับติดตั้งแบบ yum และ rpm เท่านั้น


Method #1 Installing from the online yum repository
---------------------------------------------------

Pros:

        *  your Scisoft installation can automatically be kept
           aligned with the latest available bugfixes for this Scisoft
           release
        
        *  you can install all of Scisoft or only the parts you
           want

Cons:

        *  requires Fedora Core 20

Procedure:

        1) If you have a previous installation of Scisoft then back 
           it up and remove it using a method appropriate to it was
           installed (e.g. if you used 'yum' to install it now use
           'yum' to remove it).

        2) As root create /etc/yum.repos.d/scisoft.repo containing:

           [scisoft]
           name=Scisoft
           baseurl=ftp://ftp.eso.org/scisoft/scisoft8/linux/fedora/20/x86_64
           gpgcheck=0
           enabled=1

        3) As root run:

           yum clean all
           yum install scisoft8-\*

           and when prompted, check the list of packages about to
           be installed looks sensible, and then allow yum to start
           installing the packages by pressing 'y'.

Method #2 Installing from RPMs 
------------------------------

Pros:

        *  you can install all of Scisoft or only the parts you
           want

Cons:

        *  requires Fedora Core 20, or that some dependencies are
           overridden using rpm's '--nodeps' option

Procedure:

        1) Download all RPMs at
           ftp://ftp.eso.org/scisoft/scisoft8/linux/fedora/20/x86_64/,
           or copy them from the Scisoft DVD
           and save them to a directory, which we will call
           <scisoft-save-dir>.

        2) If you have a previous installation of Scisoft then back 
           it up and remove it using a method appropriate to it was
           installed (e.g. if you used 'yum' to install it now use
           'yum' to remove it).

        3) As root, run:

           rpm -ihv <scisoft-save-dir>/*.rpm

----------------------------------------------------------------------------
2) Ureka  เป็นที่ ๆ รวบรวมซอฟแวร์ทางด้านดาราศาสตร์ท้ศนศาสตร์ เวอร์ชั่นปัจจุบัน น่าจะเป็น 1.5.1 ถ้าต้องการติดตั้งซอฟแวร์นี้ จะใช้เซิร์ฟเวอร์ปลายทางในการแตกไฟล์และติดตั้งบนเครื่องคอมพ์ที่อยู่ต้นทาง เพราะฉะนั้นอาจใช้เวลานานพอสมควร  ขั้นตอนการติดตั้งตามด้านล่างนี้

To install Ureka on a Mac or Linux:

  • Choose an installation directory and download this installer (right-click on the link and select Save Link As...) to that location.
  • Run the installer by typing 
    sh install_ureka_1.5.1
  • The installer will ask for permission to edit your login scripts. If you have more than one Ureka installation, the installer will also ask you to provide an installation name.
  • If this is your first time installing Ureka, you will need to start a new terminal window for the changes to your login scripts to take effect.
  • To select the Ureka environment, type
    ur_setup
-------------------------------------------------------------------------------
*ถ้าไม่ได้ใช้อะไร ผู้เขียนแนะนำให้ลงแบบ ubuntu หรือ stand alone ไปเลย ง่ายที่สุด 
3) IRAF เพียว ๆ    ให้เลือก IRAF ให้ตรงกับเวอร์ชั่นลีนุกซ์ที่ท่านใช้งาน 32-bit หรือ 64-bit ก็ได้  ขั้นตอนติดตั้งประมาณนี้ 
ต้องเป็น ROOT ก่อน จึงจะติดตั้งได้
>mkdir /iraf
>mkdir /iraf/iraf
>mv iraf.lnux.x86.tar.gz /iraf/iraf/.
>cd /iraf/iraf
>tar -zxf iraf.lnux.x86.tar.gz
>rm iraf.lnux.x86.tar.gz
>./install

[[Keep hitting Enter for all prompts]] ติดตั้ง X11 สำหรับ IRAF 

>mkdir /iraf/x11iraf
>cd /iraf/x11iraf
>wget http://iraf.noao.edu/iraf/ftp/iraf/x11iraf/x11iraf-v2.0BETA-bin.linux.tar.gz
>tar -zxf x11iraf-v2.0BETA-bin.linux.tar.gz
>rm x11iraf-v2.0BETA-bin.linux.tar.gz
>./install

[[Keep hitting Enter for all prompts]] ติดตั้งโปรแกรมดูรูปภาพ DS9

>wget http://ds9.si.edu/archive/linux/ds9.linux.7.2.tar.gz  (เวอร์ชั่นอาจใหม่กว่านี้)
>tar -zxf ds9.linux.7.2.tar.gz
>rm ds9.linux.7.2.tar.gz
>mv ds9 /usr/local/bin/.
>cd
>wget http://www.astronomy.ohio-state.edu/~khan/iraf/iraf
>chmod u=rwx iraf
>mkdir IRAF
>cd IRAF
>mkiraf

[[Select "xgterm" as your IRAF shell when prompted]]

exit

----------------------------------------------------------------------------------------------
@^___^@ good luck everyone


TEC DATA DOES NOT COVER FULL RANGE OF CL TABLE

Check your listr and if the data are observed more than one day you need to download the IONEX files at least 2 files and put in the same fo...