From 0c4dd2bb6c1259ecc9eabbe287bd5f795195b755 Mon Sep 17 00:00:00 2001
From: alex <alex@tls-tautenburg.de>
Date: Fri, 3 Dec 2021 13:09:41 +0000
Subject: [PATCH] change output naming

---
 scripts/sort_times_into_freqGroups.py | 4 ++--
 steps/find_skymodel_cal.cwl           | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/sort_times_into_freqGroups.py b/scripts/sort_times_into_freqGroups.py
index 5d81a8b1..e63e142e 100755
--- a/scripts/sort_times_into_freqGroups.py
+++ b/scripts/sort_times_into_freqGroups.py
@@ -127,7 +127,7 @@ def main(MSfile, numSB=10, NDPPPfill=True, stepname=None, mergeLastGroup=False,
             if timestamp in time_groups:
                 time_groups[timestamp]['files'].append(ms)
             else:
-                time_groups[timestamp] = {'files': [ ms ], 'basename' : os.path.splitext(ms)[0] }
+                time_groups[timestamp] = {'files': [ ms ], 'basename' : '_'.join(os.path.splitext(os.path.basename(ms))[0].split('_')[:2]) }
     logging.info("Found" + str(len(time_groups))  + "time-groups")
 
     # sort time-groups by frequency
@@ -233,7 +233,7 @@ def main(MSfile, numSB=10, NDPPPfill=True, stepname=None, mergeLastGroup=False,
                     files.append('dummy.ms')
             if not skip_this:
                 freqID = int((freqborders[groupIdx]+freqborders[groupIdx+1])/2e6)
-                groupname = time_groups[time]['basename']+'_%Xt_%dMHz'%(time,freqID)
+                groupname = time_groups[time]['basename']+'_%dMHz_uv'%(freqID)
                 if type(stepname) is str:
                     groupname += stepname
                 groupname = os.path.basename(groupname)
diff --git a/steps/find_skymodel_cal.cwl b/steps/find_skymodel_cal.cwl
index 039eb712..2a7130f9 100644
--- a/steps/find_skymodel_cal.cwl
+++ b/steps/find_skymodel_cal.cwl
@@ -93,3 +93,4 @@ hints:
   DockerRequirement:
     dockerPull: lofareosc/prefactor3-cwl
 stdout: find_skymodel_cal.log
+stderr: find_skymodel_cal_err.log
-- 
GitLab