张颜荣的个人博客分享 http://blog.sciencenet.cn/u/zhangyanyun 科研杂记

博文

PSRSALSA的安装和简单使用

已有 4520 次阅读 2018-8-8 19:35 |个人分类:菜鸟一号|系统分类:科研笔记| Pulsar, PSRsoft, PSRSALSA, JBT

 

1. 安装依赖:(U为我的用户名)

PSRSALSA是JBT开发的,依赖于 cfitsiofftw3gslpgplot等,安装过程都相似,由于以前装PSRChive等软件时已经装了cfitsio,fftw3,pgplot等依赖,此处只以gsl为例:

[U@U ~]$ mkdir ./Soft/PSRsalsa/depends

[U@U ~]$ cd ./Soft/PSRsalsa/depends

[U@U depends]$ wget http://mirrors.ustc.edu.cn/gnu/gsl/gsl-2.5.tar.gz

[U@U depends]$ tar zxvf gsl-2.5.tar.gz

[U@U depends]$ cd  gsl-2.5/

[U@U gsl-2.5]$ ./configure

[U@U gsl-2.5]$ make

[U@U gsl-2.5]$ sudo make install

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
...

make[2]: Leaving directory '/home/U/Soft/PSRsalsa/Depends/gsl-2.5'
make[1]: Leaving directory '/home/U/Soft/PSRsalsa/Depends/gsl-2.5'

安装完毕!


2. 安装 PSRSALSA:

PSRSALSA的安装只需从github下载源码并编译即可:

[U@U gsl-2.5]$ cd ~/Soft/

[U@U Soft]$ git clone https://github.com/weltevrede/psrsalsa.git  PSRsalsa/

[U@U Soft]$ cd PSRsalsa/

[U@U PSRsalsa]$ make

gcc -Isrc/lib/ -I/home/U/AstroSoft/pgplot -I/local/scratch/wltvrede/puma1soft/trunk/src/Soft/cfitsio/include/ -I src/lib/ -Wall -g -DGSL_VERSION_NUMBER=115 -L/home/U/AstroSoft/pgplot -L/local/scratch/wltvrede/puma1soft/trunk/src/Soft/cfitsio/lib/ -L src/lib/ -L src/slalib src/prog/padd.c -lpsrsalsa -lsla_wrap -lm -lcfitsio -lcpgplot -lpgplot -lpng -lX11 -lgsl -lgslcblas -lfftw3f -lgfortran -o bin/padd
/bin/sh message.csh

If compiled without errors, the executables should be in the directory bin/


安装成功!


[U@U PSRsalsa]$ ls bin/

avrg_bin_files  pconv     penergy  pmod   ppolFig  pspecDetect  README.txt
fakeDist        pdist     pfold    pplot  ppolFit  pspecFig
padd            pdistFit  pheader  ppol   pspec    pstat

[U@U PSRsalsa]$ padd

No command 'padd' found, did you mean:
...

[U@U PSRsalsa]$ ./bin/padd
Program to add data files together. Usage:
...

[U@U PSRsalsa]$ su

root@U: /home/U/Soft/PSRsalsa# ln -s /home/ian/Soft/PSRsalsa/bin/[a-p]*   /usr/local/bin/

[U@U PSRsalsa]$ padd

Program to add data files together. Usage:

...


3. BUG:

如果安装 PSRSALSA中make报错,原因可能有三种:

A:C和fortran等库不全或版本不符合;

B:缺少相关依赖;

C:权限不够。


4. PSRSALSA使用手册在官网已经给出被配有两个练习数据:

PDF手册

数据1(16通道单脉冲序列数据);

数据2(单通道单脉冲堆栈数据)。





https://blog.sciencenet.cn/blog-640181-1128251.html

上一篇:Pulsar_Docker在Ubuntu 16.04 LTS的安装(失败)
下一篇:Fermi Science Tools 的安装
收藏 IP: 183.236.0.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-28 07:15

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部