Source
227
227
if parallel==False and pcube==False:
228
228
imager = PySynthesisImager(params=paramList)
229
229
imagerInst=PySynthesisImager
230
230
elif parallel==True:
231
231
imager = PyParallelContSynthesisImager(params=paramList)
232
232
imagerInst=PyParallelContSynthesisImager
233
233
elif pcube==True:
234
234
imager = PyParallelCubeSynthesisImager(params=paramList)
235
235
imagerInst=PyParallelCubeSynthesisImager
236
236
# virtualconcat type - changed from virtualmove to virtualcopy 2016-07-20
237
-
concattype='virtualcopy'
237
+
#using ia.imageconcat now the name changed to copyvirtual 2019-08-12
238
+
concattype='copyvirtual'
238
239
else:
239
240
print 'Invalid parallel combination in doClean.'
240
241
return False
241
242
242
243
retrec={}
243
244
244
245
try:
245
246
#if (1):
246
247
## Init major cycle elements
247
248
t0=time.time();
344
345
t0=time.time();
345
346
imager.restoreImages()
346
347
t1=time.time();
347
348
casalog.post("***Time for restoring images: "+"%.2f"%(t1-t0)+" sec", "INFO3", "task_tclean");
348
349
if pbcor==True:
349
350
t0=time.time();
350
351
imager.pbcorImages()
351
352
t1=time.time();
352
353
casalog.post("***Time for pb-correcting images: "+"%.2f"%(t1-t0)+" sec", "INFO3", "task_tclean");
353
354
354
-
355
-
355
+
##close tools
356
+
# needs to deletools before concat or lock waits for ever
357
+
imager.deleteTools()
358
+
356
359
if (pcube):
357
360
print "running concatImages ..."
358
361
casalog.post("Running virtualconcat (type=%s) of sub-cubes" % concattype,"INFO2", "task_tclean")
359
-
# fixed to move subcubes
360
362
imager.concatImages(type=concattype)
361
-
362
-
## Close tools.
363
-
imager.deleteTools()
364
-
363
+
365
364
# CAS-10721
366
365
if niter>0 and savemodel != "none":
367
366
casalog.post("Please check the casa log file for a message confirming that the model was saved after the last major cycle. If it doesn't exist, please re-run tclean with niter=0,calcres=False,calcpsf=False in order to trigger a 'predict model' step that obeys the savemodel parameter.","WARN","task_tclean")
368
367
369
368
370
369
except Exception as e:
371
370
#print 'Exception : ' + str(e)
372
371
casalog.post('Exception from task_tclean : ' + str(e), "SEVERE", "task_tclean")
373
372
if imager != None:
374
373
imager.deleteTools()