From e1b4f8bb77b636dd606fa4b40dea7297c2a9ac0f Mon Sep 17 00:00:00 2001 From: AlexKurek Date: Wed, 15 May 2024 11:42:08 +0200 Subject: [PATCH 1/4] This is never accessed --- losoto/lib_unwrap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/losoto/lib_unwrap.py b/losoto/lib_unwrap.py index c27b632b..2abffedb 100644 --- a/losoto/lib_unwrap.py +++ b/losoto/lib_unwrap.py @@ -42,8 +42,8 @@ def phaseUnwrapper(ip): phase2D = phase[:, None] i = 0 - if iterations < 1: - interations = 1 + # if iterations < 1: + # interations = 1 while i < iterations: i += 1 phase2D = phaseUnwrapper(phase2D) From 27683574107ab6cf74075caa10d488ec810d37f3 Mon Sep 17 00:00:00 2001 From: AlexKurek Date: Wed, 15 May 2024 11:47:34 +0200 Subject: [PATCH 2/4] axis is never accessed --- losoto/h5parm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/losoto/h5parm.py b/losoto/h5parm.py index 3d080a87..584b21ec 100644 --- a/losoto/h5parm.py +++ b/losoto/h5parm.py @@ -540,8 +540,8 @@ def makeSoltab(self, soltype=None, soltabName=None, # if input is OK, create table soltab = self.obj._v_file.create_group("/"+self.name, soltabName, title=soltype) soltab._v_attrs['parmdb_type'] = parmdbType - for i, axisName in enumerate(axesNames): - axis = self.obj._v_file.create_array('/'+self.name+'/'+soltabName, axisName, obj=np.array(axesVals[i])) + # for i, axisName in enumerate(axesNames): + # axis = self.obj._v_file.create_array('/'+self.name+'/'+soltabName, axisName, obj=np.array(axesVals[i])) # create the val/weight Carrays #val = self.obj._v_file.create_carray('/'+self.name+'/'+soltabName, 'val', obj=vals.astype(np.float64), chunkshape=None, atom=tables.Float64Atom()) From 6567ccd2caa3c400787f72376cf49e514ba3adec Mon Sep 17 00:00:00 2001 From: AlexKurek Date: Wed, 15 May 2024 11:51:07 +0200 Subject: [PATCH 3/4] remove unused things --- losoto/lib_operations.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/losoto/lib_operations.py b/losoto/lib_operations.py index d5740d2d..0b3b6490 100644 --- a/losoto/lib_operations.py +++ b/losoto/lib_operations.py @@ -2,9 +2,10 @@ # Some utilities for operations -import sys, multiprocessing +# import sys, multiprocessing +import multiprocessing import numpy as np -from losoto.h5parm import h5parm +# from losoto.h5parm import h5parm from losoto._logging import logger as logging class multiprocManager(object): @@ -51,7 +52,7 @@ def __init__(self, procs=0, funct=None): self.runs = 0 logging.debug('Spawning %i threads...' % self.procs) - for proc in range(self.procs): + for _ in range(self.procs): t = self.multiThread(self.inQueue, self.outQueue, funct) self._threads.append(t) t.start() From 60fc1f11de38b05ae7f32faa814ffbe96c14f47a Mon Sep 17 00:00:00 2001 From: AlexKurek Date: Wed, 15 May 2024 16:45:50 +0200 Subject: [PATCH 4/4] revert changes --- losoto/h5parm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/losoto/h5parm.py b/losoto/h5parm.py index 584b21ec..3d080a87 100644 --- a/losoto/h5parm.py +++ b/losoto/h5parm.py @@ -540,8 +540,8 @@ def makeSoltab(self, soltype=None, soltabName=None, # if input is OK, create table soltab = self.obj._v_file.create_group("/"+self.name, soltabName, title=soltype) soltab._v_attrs['parmdb_type'] = parmdbType - # for i, axisName in enumerate(axesNames): - # axis = self.obj._v_file.create_array('/'+self.name+'/'+soltabName, axisName, obj=np.array(axesVals[i])) + for i, axisName in enumerate(axesNames): + axis = self.obj._v_file.create_array('/'+self.name+'/'+soltabName, axisName, obj=np.array(axesVals[i])) # create the val/weight Carrays #val = self.obj._v_file.create_carray('/'+self.name+'/'+soltabName, 'val', obj=vals.astype(np.float64), chunkshape=None, atom=tables.Float64Atom())