From 01af9ef2c5a2e59772c8fc0392bab7293ff02db2 Mon Sep 17 00:00:00 2001 From: Evandro Martinez Ribeiro Date: Thu, 22 Jan 2015 10:57:27 -0300 Subject: [PATCH] Use original event file by default for timing and cleaned event file for spectroscopy --- mos1/events/mos1events.py | 10 +++++++--- mos1/lightcurves/mos1lightcurve.py | 10 +++++++--- mos1/spectra/mos1spec.py | 2 +- mos2/events/mos2events.py | 10 +++++++--- mos2/lightcurves/mos2lightcurve.py | 10 +++++++--- mos2/spectra/mos2spec.py | 2 +- pn/spectra/pnspec.py | 2 +- 7 files changed, 31 insertions(+), 15 deletions(-) diff --git a/mos1/events/mos1events.py b/mos1/events/mos1events.py index 5515a78..172e6f9 100755 --- a/mos1/events/mos1events.py +++ b/mos1/events/mos1events.py @@ -11,9 +11,13 @@ os.environ['SAS_ODF'] = os.path.abspath(glob.glob('../../rpcdata/*SUM.SAS')[0]) os.environ['SAS_CCF'] = os.path.abspath(glob.glob('../../rpcdata/ccf.cif')[0]) -shutil.copyfile('../mos1_clean.ds', 'mos1_clean_barycen.ds') -subprocess.call(['barycen', 'table=mos1_clean_barycen.ds:EVENTS']) -table = 'mos1_clean_barycen.ds' +# To use the clean event file +# shutil.copyfile('../mos1_clean.ds', 'mos1_clean_barycen.ds') +# subprocess.call(['barycen', 'table=mos1_clean_barycen.ds:EVENTS']) +# table = 'mos1_clean_barycen.ds' + +# Use original baricentric corrected event file +table = '../../rpcdata/mos1events_barycen.ds' pattern = 12 diff --git a/mos1/lightcurves/mos1lightcurve.py b/mos1/lightcurves/mos1lightcurve.py index de0e2fc..b0427c4 100755 --- a/mos1/lightcurves/mos1lightcurve.py +++ b/mos1/lightcurves/mos1lightcurve.py @@ -11,9 +11,13 @@ os.environ['SAS_ODF'] = os.path.abspath(glob.glob('../../rpcdata/*SUM.SAS')[0]) os.environ['SAS_CCF'] = os.path.abspath(glob.glob('../../rpcdata/ccf.cif')[0]) -shutil.copyfile('../mos1_clean.ds', 'mos1_clean_barycen.ds') -subprocess.call(['barycen', 'table=mos1_clean_barycen.ds:EVENTS']) -table = 'mos1_clean_barycen.ds' +# To use the clean event file +# shutil.copyfile('../mos1_clean.ds', 'mos1_clean_barycen.ds') +# subprocess.call(['barycen', 'table=mos1_clean_barycen.ds:EVENTS']) +# table = 'mos1_clean_barycen.ds' + +# Use original baricentric corrected event file +table = '../../rpcdata/mos1events_barycen.ds' srcregionfile = 'src.reg' bkgregionfile = 'bkg.reg' diff --git a/mos1/spectra/mos1spec.py b/mos1/spectra/mos1spec.py index 32db4c7..60cf3f9 100755 --- a/mos1/spectra/mos1spec.py +++ b/mos1/spectra/mos1spec.py @@ -18,7 +18,7 @@ prefix = "" sufix = "" -table = 'mos1_clean.ds' +table = '../mos1_clean.ds' srcspc = '{0}mos1_srcspc{1}.ds'.format(prefix, sufix) srcimg = '{0}mos1_srcimg{1}.ds'.format(prefix, sufix) bkgspc = '{0}mos1_bkgspc{1}.ds'.format(prefix, sufix) diff --git a/mos2/events/mos2events.py b/mos2/events/mos2events.py index 17f9a9a..fc1f1ae 100755 --- a/mos2/events/mos2events.py +++ b/mos2/events/mos2events.py @@ -11,9 +11,13 @@ os.environ['SAS_ODF'] = os.path.abspath(glob.glob('../../rpcdata/*SUM.SAS')[0]) os.environ['SAS_CCF'] = os.path.abspath(glob.glob('../../rpcdata/ccf.cif')[0]) -shutil.copyfile('../mos2_clean.ds', 'mos2_clean_barycen.ds') -subprocess.call(['barycen', 'table=mos2_clean_barycen.ds:EVENTS']) -table = 'mos2_clean_barycen.ds' +# To use the clean event file +# shutil.copyfile('../mos2_clean.ds', 'mos2_clean_barycen.ds') +# subprocess.call(['barycen', 'table=mos2_clean_barycen.ds:EVENTS']) +# table = 'mos2_clean_barycen.ds' + +# Use original baricentric corrected event file +table = '../../rpcdata/mos2events_barycen.ds' pattern = 12 diff --git a/mos2/lightcurves/mos2lightcurve.py b/mos2/lightcurves/mos2lightcurve.py index 004e728..a55f801 100755 --- a/mos2/lightcurves/mos2lightcurve.py +++ b/mos2/lightcurves/mos2lightcurve.py @@ -11,9 +11,13 @@ os.environ['SAS_ODF'] = os.path.abspath(glob.glob('../../rpcdata/*SUM.SAS')[0]) os.environ['SAS_CCF'] = os.path.abspath(glob.glob('../../rpcdata/ccf.cif')[0]) -shutil.copyfile('../mos2_clean.ds', 'mos2_clean_barycen.ds') -subprocess.call(['barycen', 'table=mos2_clean_barycen.ds:EVENTS']) -table = 'mos2_clean_barycen.ds' +# To use the clean event file +# shutil.copyfile('../mos2_clean.ds', 'mos2_clean_barycen.ds') +# subprocess.call(['barycen', 'table=mos2_clean_barycen.ds:EVENTS']) +# table = 'mos2_clean_barycen.ds' + +# Use original baricentric corrected event file +table = '../../rpcdata/mos2events_barycen.ds' srcregionfile = 'src.reg' bkgregionfile = 'bkg.reg' diff --git a/mos2/spectra/mos2spec.py b/mos2/spectra/mos2spec.py index c6fd49c..656d272 100755 --- a/mos2/spectra/mos2spec.py +++ b/mos2/spectra/mos2spec.py @@ -18,7 +18,7 @@ prefix = "" sufix = "" -table = 'mos2_clean.ds' +table = '../mos2_clean.ds' srcspc = '{0}mos2_srcspc{1}.ds'.format(prefix, sufix) srcimg = '{0}mos2_srcimg{1}.ds'.format(prefix, sufix) bkgspc = '{0}mos2_bkgspc{1}.ds'.format(prefix, sufix) diff --git a/pn/spectra/pnspec.py b/pn/spectra/pnspec.py index 64e308f..2f0f577 100755 --- a/pn/spectra/pnspec.py +++ b/pn/spectra/pnspec.py @@ -18,7 +18,7 @@ prefix = "" sufix = "" -table = 'pn_clean.ds' +table = '../pn_clean.ds' srcspc = '{0}pn_srcspc{1}.ds'.format(prefix, sufix) srcimg = '{0}pn_srcimg{1}.ds'.format(prefix, sufix) bkgspc = '{0}pn_bkgspc{1}.ds'.format(prefix, sufix)