From b04eb583779a6f272c65679c985f54736fc47483 Mon Sep 17 00:00:00 2001 From: Jessica Pilling Date: Tue, 15 Aug 2023 13:02:38 +0100 Subject: [PATCH] Changing the command string to the evtool one --- xga/generate/esass/phot.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/xga/generate/esass/phot.py b/xga/generate/esass/phot.py index 84097438..538e2d56 100644 --- a/xga/generate/esass/phot.py +++ b/xga/generate/esass/phot.py @@ -93,13 +93,12 @@ def evtool_image(sources: Union[BaseSource, NullSource, BaseSample], lo_en: Quan rmtree(dest_dir) os.makedirs(dest_dir) - cmds.append("cd {d};evselect table={e} imageset={i} xcolumn=X ycolumn=Y ximagebinsize=87 " - "yimagebinsize=87 squarepixels=yes ximagesize=512 yimagesize=512 imagebinning=binSize " - "ximagemin=3649 ximagemax=48106 withxranges=yes yimagemin=3649 yimagemax=48106 " - "withyranges=yes {ex}; mv * ../; cd ..; rm -r {d}".format(d=dest_dir, e=evt_list.path, - i=im, ex=expr)) + cmds.append("cd {d}; evtool eventfiles={e} outfile={i} image=yes " + "emin={lo} emax={hi}; mv * ../; cd ..; rm -r {d}".format(d=dest_dir, e=evt_list.path, + i=im, lo=lo_en, hi=hi_en )) # This is the products final resting place, if it exists at the end of this command + # ASSUMPTION4 new output directory structure final_paths.append(os.path.join(OUTPUT, "erosita", obs_id, im)) extra_info.append({"lo_en": lo_en, "hi_en": hi_en, "obs_id": obs_id, "instrument": inst, "telescope": "erosita"}) sources_cmds.append(np.array(cmds))