Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup #155

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions losoto/h5parm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
7 changes: 4 additions & 3 deletions losoto/lib_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions losoto/lib_unwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
AlexKurek marked this conversation as resolved.
Show resolved Hide resolved
Expand Down