1
1
# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS).
2
- # Last modified by David J Turner (turne540@msu.edu) 28/07/2025, 10:59 . Copyright (c) The Contributors
2
+ # Last modified by David J Turner (turne540@msu.edu) 28/07/2025, 11:02 . Copyright (c) The Contributors
3
3
4
4
import os
5
5
from copy import deepcopy , copy
@@ -270,6 +270,8 @@ def _append_spec_info(evt_list):
270
270
group_scale = ''
271
271
272
272
# Fills out the srctool command to make the main and background spectra
273
+ # WE NOTE THAT, BECAUSE WE CREATE EVENT LIST SYMLINKS TO SOLVE ISSUE #1400, THE EVENT LIST PATHS
274
+ # ARE JUST THE BASE FILENAME OF THE EVENT LIST
273
275
if isinstance (source , ExtendedSource ):
274
276
try :
275
277
if use_combine_obs and (len (source .obs_ids ['erosita' ]) > 1 ):
@@ -278,20 +280,20 @@ def _append_spec_info(evt_list):
278
280
else :
279
281
# We only need the image path for extended source generation
280
282
im = source .get_images (obs_id , lo_en = Quantity (0.2 , 'keV' ), hi_en = Quantity (10.0 , 'keV' ),
281
- telescope = 'erosita' )
283
+ telescope = 'erosita' )
282
284
# We have a slightly different command for extended and point sources
283
- s_cmd_str = ext_srctool_cmd .format (d = dest_dir , ef = evt_list .path , sc = coord_str , reg = src_reg_str ,
284
- i = inst_no , ts = t_step , em = im .path , et = et )
285
+ s_cmd_str = ext_srctool_cmd .format (d = dest_dir , ef = os . path . basename ( evt_list .path ) , sc = coord_str ,
286
+ reg = src_reg_str , i = inst_no , ts = t_step , em = im .path , et = et )
285
287
except :
286
288
raise ValueError (f"it was this sources { source .name } " )
287
289
288
290
else :
289
- s_cmd_str = pnt_srctool_cmd .format (d = dest_dir , ef = evt_list .path , sc = coord_str , reg = src_reg_str ,
290
- i = inst_no , ts = t_step )
291
+ s_cmd_str = pnt_srctool_cmd .format (d = dest_dir , ef = os . path . basename ( evt_list .path ) , sc = coord_str ,
292
+ reg = src_reg_str , i = inst_no , ts = t_step )
291
293
292
294
# TODO FIGURE OUT WHAT TO DO ABOUT THE TIMESTEP
293
- sb_cmd_str = bckgr_srctool_cmd .format (ef = evt_list .path , sc = coord_str , breg = bsrc_reg_str ,
294
- i = inst_no , ts = t_step * 4 )
295
+ sb_cmd_str = bckgr_srctool_cmd .format (ef = os . path . basename ( evt_list .path ) , sc = coord_str , breg = bsrc_reg_str ,
296
+ i = inst_no , ts = t_step * 4 )
295
297
# Filling out the grouping command
296
298
grp_cmd_str = grp_cmd .format (infi = no_grp_spec , of = spec , gt = group_type , gs = group_scale )
297
299
0 commit comments