astrophysics글 21건
2014.10.23 Converting .dvi to .eps
2014.08.26 expanding TeXtoIDL
2014.03.31 no name
2014.02.03 installation of kcorrect & idlutils 2
2014.01.23 usage of 'nohup'
2014.01.22 separately compress in tar.
2013.11.11 Suppress axes in IDL plots
2013.07.07 extracting multiple .tar in a single call
2013.07.07 XQuartz & gv
2013.07.07 adding home/end/pageup/pagedown on mac bl.keyboard
Converting .dvi to .eps

>> convert .dvi to .eps

: bash$ dvips -E file.dvi -o file.eps


>> edit size of the eps file 

:  find "%%BoundingBox: LX LY UX UY" from 'file.eps', where LX and LY are coordinates of lower-left corner and UX and UY are upper-right corner, respectively.


>> use the eps file in LaTeX

expanding TeXtoIDL

         'leq': = '!9' + String("154B) + '!X'          'geq': = '!9' + String("142B) + '!X' 'neq': = '!9' + String("75B) + '!X' 'deg': = '!9' + String("45B) + '!X' '+-': = '!9' + String("53B) + '!X' 'equiv': = '!9' + String("72B) + '!X' 'prime': = '!9' + String("140B) + '!X' 'angstrom': = '!3' + String("305B) + '!X' 'sun': = '!D!9n!N!X' 'varphi': = '!9' + String("120B) + '!X' 'infinity': = '!9' + String("44B) + '!X' 'copyright': = '!3' + String("251B) + '!X' 'up': = '!U' 'down': = '!D' 'exp': = '!E' 'sub': = '!I' 'n': = '!N' 'div': = '!9' + String("57B) + '!X' 'times': = '!9' + String("130B) + '!X'


no name




- CIAO

- XSPEC

- tcl

- & IDL

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 -

Suppress axes in IDL plots

Suppress axes in IDL plots


Some control of the axes in an IDL plot can be done through the [xyz]style keyword.


ValueDescription
1Force exact axis range (from data)
2Extend axis range
4Suppress entire axis. This will eliminate plotting the axes at all. Useful if you want to use the axis procedure later to fill in the axes.
8Draw axis only on one side.
16

Inhibit setting the Y axis minimum value to 0 (only works on y axis)


These keywords are bitwise so they can be added together to get a combination of effects.

NOTE: if you want to just suppress the text and tick marks in one of the axes:

plot, x, y, yticks = 1, ytickname = [' ', ' ']

This will set the plot to have only one major tick interval at the top and bottom of the axis and name them with a string with an empty space.


(copyright on "follow the sheep")

extracting multiple .tar in a single call

** extracting multiple .tar in a single call **

kaysoh$ for i in *.gz; do tar -xvf $i; done

if you are using .gz file then replace -xvf with -xzvf.

XQuartz & gv

a. macports : http://www.macports.org/install.php

b. XQuartz : http://xquartz.macosforge.org/landing/

c. sudo port install ghostscript

d. sudo port install gv

e. add +/Applications on .bashrc

adding home/end/pageup/pagedown on mac bl.keyboard

terminal — settings — keyboard tab

home : \033[1~
end : \033[4~
page-up : \033[5~
page-down : \033[6~

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