Linux글 5건
2015.09.20 convert ps to pdf
2015.05.12 installing cfitsio
2014.02.03 installation of kcorrect & idlutils 2
2014.01.23 usage of 'nohup'
2014.01.22 separately compress in tar.
convert ps to pdf

/esoform-97A$ convert -density 300 fit.ps fit.pdf

installing cfitsio

1. un-tar the file (http://heasarc.gsfc.nasa.gov/fitsio/)

2. /cfitsio$ export CFLAGS="-arch i386 -g -O2"

3. /cfitsio$ ./configure

4. /cfitsio$ make

installation of kcorrect & idlutils



Assuming that the user home directory is /Users/name (like my macbook air) and all the stuff will be installed under /Users/name/lib


add the following lines to .bashrc :

export IDL_PATH=+/usr/local/rsi:$IDL_PATH
export IDLUTILS_DIR=/Users/name/lib/idlutils
export PATH=$IDLUTILS_DIR/bin:$PATH
export IDL_PATH=+$IDLUTILS_DIR/pro:$IDL_PATH
export IDL_PATH=+$IDLUTILS_DIR/goddard/pro:$IDL_PATH

And then, download IDLUTILS and compile it :


$ . ~/.bashrc
$ mkdir -p ~/lib
$ cd ~/lib
$ svn ls http://www.sdss3.org/svn/repo/idlutils/tags
... a list of tags; the latest version v5_5_12 here...
$ svn export http://www.sdss3.org/svn/repo/idlutils/tags/v5_5_12 idlutils
$ cd $IDLUTILS_DIR
$ evilmake all


Add the following lines to .bashrc :

export KCORRECT_DIR=/Users/name/lib/kcorrect
export PATH=$KCORRECT_DIR/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$KCORRECT_DIR/lib
export IDL_PATH=$IDL_PATH:+$KCORRECT_DIR/pro

Download the tarball and compile the source codes:

$ . ~/.bashrc
$ cd ~/lib
$ wget http://cosmo.nyu.edu/blanton/kcorrect/kcorrect.v4_2.tar.gz
$ tar -xvzf kcorrect.v4_2.tar.gz
$ cd kcorrect
$ evilmake -k all

Test as below : 

$ idl
IDL Version 8.0.1 (linux x86_64 m64). (c) 2010, ITT Visual Information Solutions
Installation number: XXXXXX.
Licensed for use by: Saint Mary's Univ, Astronomy and Physics
 
IDL> kcorrect, [1., 4.78, 10.96, 14.45, 19.05],  $
IDL>           [1100., 28., 7.7, 4.4, 2.5], $
IDL>           0.03, kcorrect, band_shift=0.1, chi2=chi2
 
... bunch of output ...
 
IDL> print, kcorrect
    -0.381880    -0.342148    -0.191399    -0.158157    -0.132817





(The original post written by Taro)

usage of 'nohup'

1) <go.sh> have followings. 

nohup ./run1.sh > nohup_run1.out &


: after running <run1.sh> then you'll get <nohup_run1.out> as a by-product. 



2) <run1.sh> have followings.  

#!/bin/bash

idl<<!

.run run1

go,/for_errors

!


: <run1.pro> should have command "go,/for_errors"


** if bash can't find IDL command, then try below

$IDL_DIR/bin/idl<<!



3) both shell files should have 755 permission

> chmod 755 *.sh 



4) run <go.sh>

> ./go.sh



separately compress in tar.

at the directory that you want to compress including sub-directories. 

(change 30mb to 1024mb)


compress : tar -cvf - ./ | split -b 30mb - filename.tar.gz

extract : cat filename.tar.gz* | tar -xvf -

prev | 1 | next
Hello, stranger
note List Tags Media Guest Admin
powered by TISTORY designed by KHISM modified by kaysoh RSS T Y T
openclose