aboutsummaryrefslogtreecommitdiffstats
path: root/_zshrc.local
blob: 06d3411130e4e75b22094fde4c51c6965f767d29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
##
## ~/.zshrc.local
## ZSH local configuration file
##
## Aaron LI
## Created: 2014-05-31
## Updated: 2016-01-30
##

### python-virtualenv {{{
if [ -x /usr/bin/virtualenvwrapper.sh ]; then
    export WORKON_HOME="$HOME/.virtualenvs"
    export PROJECT_HOME="$HOME/web"
    source /usr/bin/virtualenvwrapper.sh
fi
### python-virtualenv }}}

### astro {{{
# backup LD_LIBRARY_PATH settings
LD_LIBRARY_PATH_BAK="${LD_LIBRARY_PATH}"

## HEASOFT settings
export HEADAS="$HOME/local/heasoft/heasoft-6.16/x86_64-unknown-linux-gnu"
function heainit() {
    if [ "x${CALDB}" = "x" ]; then
        export CALDB="$HOME/local/CALDB"
    fi
    export CALDBCONFIG="${CALDB}/software/tools/caldb.config"
    export CALDBALIAS="${CALDB}/software/tools/alias_config.fits"
    HEA_STATE="`echo $PATH | tr ':' '\n' | grep 'heasoft'`"
    if [ "x${HEA_STATE}" = "x" ]; then
        source $HEADAS/headas-init.sh
    fi
    unset HEA_STATE
    export LD_LIBRARY_PATH="${LD_LIBRARY_PATH_BAK}"
}

## CIAO settings
export CIAO_PATH="$HOME/local/ciao/ciao-4.6"
function ciaoinit() {
    HEA_STATE="`echo $PATH | tr ':' '\n' | grep 'heasoft'`"
    CIAO_STATE="`echo $PATH | tr ':' '\n' | grep 'ciao'`"
    if [ "x${HEA_STATE}" = "x" ]; then
        heainit
    fi
    if [ "x${CIAO_STATE}" = "x" ]; then
        source $CIAO_PATH/bin/ciao.bash
    else
        source $CIAO_PATH/bin/ciao.bash -o
    fi
    unset HEA_STATE
    unset CIAO_STATE
    export CIAO_LD_LIBRARY_PATH="${ASCDS_INSTALL}/ots/lib"
}

## chandra_acis_process scripts
export MASS_PROFILE_DIR="$HOME/bin/mass"
export CHANDRA_SCRIPT_DIR="$HOME/bin"

alias qmass='qdp summary_mass_profile.qdp'
alias qnfw='qdp nfw_fit_center.qdp'
alias qsbp='qdp sbp_fit_center.qdp'
alias qtpro='qdp wang2012_fit_center.qdp'
alias fitwang="${MASS_PROFILE_DIR}/fit_wang2012_model tcl_temp_profile.txt"
alias fitmass="${MASS_PROFILE_DIR}/fit_mass.sh"
alias fitnfw="${MASS_PROFILE_DIR}/fit_nfw_mass mass_int.dat"
alias fitsbp="${MASS_PROFILE_DIR}/fit_sbp.sh"
alias calclxfx="${MASS_PROFILE_DIR}/calc_lxfx_simple.sh"
alias getlxfx="${MASS_PROFILE_DIR}/get_lxfx_data.sh"
alias chcld="${CHANDRA_SCRIPT_DIR}/chandra_collect_data_v3.sh"
alias chr500="${CHANDRA_SCRIPT_DIR}/ciao_r500avgt_v3.sh"
### astro }}}


# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #