ラベル xselect の投稿を表示しています。 すべての投稿を表示
ラベル xselect の投稿を表示しています。 すべての投稿を表示

2012年5月25日金曜日

xselect from python

see also uchiyama's blog

#!/usr/bin/env python

"""
2012-05-25
test
http://aidememoirehu.blogspot.jp/search/label/Python
"""

MY_NAME = "run_xselect2"

import sys
import os
import subprocess

out_name = 'test' + MY_NAME
out_com = out_name+'.com'

# if out_com is already present

# overwrite
com = open (out_com, 'w')

ev_file = "test_evlist.txt"

print >> com, """
clear all proceed=yes
set mission suzaku
set datadir /Volumes/Macintosh_HD_2/Nobackup/aepipeline//801040010/
"""
print >> com, "read events @"+ev_file+'¥n'
print >> com, """
ext image
save image test1.xy
"""
print out_com, "is created¥n"

com.close

# open file into string
com = open(out_com, 'r')
# com_list = com.readlines()
# TypeError: must be string or buffer, not list
# to list

com_str = com.read()
xsp = subprocess.Popen( 'xselect', stdin = subprocess.PIPE )
xsp.stdin.write( '¥n¥n' )
xsp.stdin.write( com_str )
xsp.stdin.write( 'quit ¥n ¥n' )
xsp.wait()









2010年8月4日水曜日

HongoScripts for Suzaku data

http://www-utheal.phys.s.u-tokyo.ac.jp/~yuasa/wiki/index.php/HongoScripts

looks nice. 

2010年5月13日木曜日

xselect suzaku HK file

xsel:SUZAKU-XIS0-STANDARD > read hk hkfiles="darts_dir/auxil/ae100046010.ehk.gz" expand=yes
> HK file directory >[/home/cc/i02111/work/suzaku_data//801038010] ./
xsel:SUZAKU-XIS0-STANDARD > select hk "SAA==0 && ELV >5 && DYE_ELV > 20 && COR > 6"
PREFR keyword not found, using prefr = 0.5
POSTFR keyword not found, using postfr = 0.5
-> maybe ignored
-> xselect may read gziped HK file

2010年4月1日木曜日

xselect error ?

heasoft 6.5 is OK
heasoft 6.9 gave the following

xsel:SUZAKU > read events ae801038010xi0_1_3x3n066z_uf.evt.gz
remove =    0
datdir = /home/cc/i02111/work/suzaku_data/801038010/xis/event_uf/!
filenm = /home/cc/i02111/work/suzaku_data/801038010/xis/event_uf/ae801038010xi0
_1_3x3n066z_uf.evt.gz!
Could not find keyword for Datamode for SUZAKU NONE XIS0
Your data files have empty INSTRUME keywords in them.
Use FPARKEY to set the value.
Use SET INSTRUMENT to set the instrument, and then try the read again.

->
http://heasarc.gsfc.nasa.gov/docs/software/lheasoft/bugs.html
may give the answer.