From 90933729585d49aecb96f3c179b5d55c5af0810b Mon Sep 17 00:00:00 2001 From: Gijs Schot Date: Mon, 11 Jan 2021 14:34:23 +0100 Subject: [PATCH] Small changes to GUI: added extra parameter to motioncorretion. Changed size to radius in extract candidates. and removed a check write in writeAlignedProjections --- gui/frameDataTransfer.py | 7 ++++++- gui/frameParticlePicking.py | 4 ++-- gui/guiStructures.py | 3 ++- reconstruction/writeAlignedProjections.py | 2 -- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gui/frameDataTransfer.py b/gui/frameDataTransfer.py index 67673c4a..cd1e4b96 100755 --- a/gui/frameDataTransfer.py +++ b/gui/frameDataTransfer.py @@ -179,6 +179,11 @@ def __init__(self, parent=None): self.activeProcesses = {} self.workerID = 0 self.threadPool = self.parent().threadPool + self.progressBarCounters = {} + self.progressBars = {} + self.queueEvents = self.parent().qEvents + self.localqID = {} + self.activeProcesses = {} self.widgets['pytomPath'] = QLineEdit() self.widgets['pytomPath'].setText(self.parent().pytompath) @@ -509,7 +514,7 @@ def createMotioncorGroup(self,mode='v01_single_'): id='MotionCorrection') paramsCmd = [self.motioncor_folder, mode + 'fileTypeCapitalized', mode + 'folder_nanographs', self.motioncor_folder, mode + 'gainFileFlag', mode + 'patchSizeFlag', mode + 'ftBinFlag', - mode + 'gpuIdFlag', templateMotionCorrection] + mode + 'gpuIdFlag', mode + 'filetype_nanographs', templateMotionCorrection] self.insert_gen_text_exe(parent, mode, paramsCmd=paramsCmd, exefilename=execfilename, paramsSbatch=paramsSbatch, cs=3, queue=True) diff --git a/gui/frameParticlePicking.py b/gui/frameParticlePicking.py index a3e9e7fc..c784aa20 100755 --- a/gui/frameParticlePicking.py +++ b/gui/frameParticlePicking.py @@ -606,7 +606,7 @@ def populate_batch_extract_cand(self,id='tab23'): print('\n\nPlease select at least one job file template and mask file.\n\n') return - headers = ["Job name", "Extract", "File Name Particle List", "Ouput Dir Subtomograms", "Size (px)", + headers = ["Job name", "Extract", "File Name Particle List", "Ouput Dir Subtomograms", "Radius (px)", "# Candidates", 'Min. Score', ''] types = ['txt', 'checkbox', 'lineedit', 'lineedit', 'lineedit', 'lineedit', 'lineedit', 'txt'] sizes = [0, 0, 80, 150, 0, 0, 0, 0] @@ -615,7 +615,7 @@ def populate_batch_extract_cand(self,id='tab23'): 'Select if you want to extract particles using this job file.', 'File name of particle list in which a number of candidates are written.', 'Prefix indicating in which folder particles will be saved when subtomograms are extracted', - 'Particle Size in pixels', + 'Radius of Particle of interest in pixels', 'Number of candidates extracted from tomogram.', 'Minimum cross-correlation coefficient for a particle to be selected.'] diff --git a/gui/guiStructures.py b/gui/guiStructures.py index c4dfb6c7..158c2c69 100755 --- a/gui/guiStructures.py +++ b/gui/guiStructures.py @@ -962,7 +962,8 @@ def exe_action(self, params): # time.sleep(1) # self.popup_messagebox('Info', 'Local Job Finished', f'Finished Job {ID}') # os.system('sh {}'.format(params[0])) - except: + except Exception as e: + print(e) print ('Please check your input parameters. They might be incomplete.') ''' def getLocalID(self): diff --git a/reconstruction/writeAlignedProjections.py b/reconstruction/writeAlignedProjections.py index ce39fce2..0d304168 100755 --- a/reconstruction/writeAlignedProjections.py +++ b/reconstruction/writeAlignedProjections.py @@ -154,9 +154,7 @@ def writeAlignedProjections(TiltSeries_, weighting=None, # 4 -- Rotate - print(transX, transY) image = general_transform2d(v=image, rot=rot, shift=[transX,transY], scale=mag, order=[2, 1, 0], crop=True) - image.write(f'resized_{ii}.em') # 5 -- Optional Low Pass Filter if lowpassFilter: