mirror of
https://github.com/JHUAPL/kaipy.git
synced 2026-01-07 21:43:57 -05:00
Merged in somethingfishy (pull request #13)
Fixing fish progress bars Approved-by: Jeff
This commit is contained in:
@@ -275,7 +275,7 @@ class GameraPipe(object):
|
||||
|
||||
for data,vID in coords:
|
||||
datasets = []
|
||||
with alive_bar(NrX,title=f"{titStr}/{vID}".ljust(kdefs.barLab),length=kdefs.barLen,bar=kdefs.barDef) as bar, \
|
||||
with alive_bar(NrX,title=f"{titStr}/{vID}".ljust(kdefs.barLab),length=kdefs.barLen,bar=kdefs.barDef2) as bar, \
|
||||
ProcessPoolExecutor(max_workers=self.nWorkers) as executor:
|
||||
futures = [executor.submit(kh5.PullVarLoc, fIn, vID, loc=loc) for fIn, loc in files]
|
||||
for future in as_completed(futures):
|
||||
@@ -328,7 +328,7 @@ class GameraPipe(object):
|
||||
else:
|
||||
titStr = None
|
||||
NrX = max(self.Nr,1)
|
||||
with alive_bar(NrX,title=titStr,length=kdefs.barLen) as bar:
|
||||
with alive_bar(NrX,title=titStr,length=kdefs.barLen,bar=kdefs.barDef2) as bar:
|
||||
for (i,j,k) in itertools.product(range(self.Ri),range(self.Rj),range(self.Rk)):
|
||||
iS = i *self.dNi
|
||||
jS = j *self.dNj
|
||||
@@ -454,7 +454,7 @@ class GameraPipe(object):
|
||||
else:
|
||||
titStr = ''
|
||||
NrX = max(self.Nr,1)
|
||||
with alive_bar(NrX,title=titStr.ljust(kdefs.barLab),length=kdefs.barLen,disable=not doVerb) as bar:
|
||||
with alive_bar(NrX,title=titStr.ljust(kdefs.barLab),length=kdefs.barLen,bar=kdefs.barDef,disable=not doVerb) as bar:
|
||||
for (i,j,k) in itertools.product(range(self.Ri),range(self.Rj),range(self.Rk)):
|
||||
|
||||
iS = i*self.dNi
|
||||
|
||||
@@ -111,7 +111,8 @@ vc_cgs = 2.99792458e10 # [cm/s] speed of light
|
||||
barLen = 30
|
||||
barLab = 30
|
||||
#barDef = 'fish'
|
||||
barDef = alive_progress.animations.bars.bar_factory(tip="><('>", chars='∙',background='')
|
||||
barDef = alive_progress.animations.bars.bar_factory(tip="><('>", chars="∙",background="")
|
||||
barDef2 = alive_progress.animations.bars.bar_factory('∙○⦿●',tip=" ><>")
|
||||
|
||||
#------
|
||||
# I/O
|
||||
|
||||
@@ -284,7 +284,7 @@ def main():
|
||||
|
||||
#Loop over sub-range
|
||||
titstr = "Comparing '%s' to '%s'"%(fdir1,fdir2)
|
||||
with alive_bar(Nt,title=titstr.ljust(kdefs.barLab),length=kdefs.barLen,disable=doVerb) as bar:
|
||||
with alive_bar(Nt,title=titstr.ljust(kdefs.barLab),length=kdefs.barLen,bar=kdefs.barDef,disable=doVerb) as bar:
|
||||
#with concurrent.futures.ThreadPoolExecutor(max_workers=Nth) as executor:
|
||||
with concurrent.futures.ProcessPoolExecutor(max_workers=Nth) as executor:
|
||||
m = multiprocessing.Manager()
|
||||
|
||||
Reference in New Issue
Block a user