@@ -4088,10 +4088,11 @@ def align_stack_super(
40884088# sum all frames acording to parameter values without aligning
40894089def sum_gain_correct_frames (movie , average , parameters ):
40904090
4091- if parameters ["gain_remove_hot_pixels" ] and Path (movie ).suffix == '.mrc' :
4092- preprocess .remove_xrays_from_file (Path (movie ).stem ,parameters ['slurm_verbose' ])
4093- else :
4094- logger .warning (f"Skipping hot pixel removal on images of format { Path (movie ).suffix } " )
4091+ if parameters ["gain_remove_hot_pixels" ]:
4092+ if Path (movie ).suffix == '.mrc' :
4093+ preprocess .remove_xrays_from_file (Path (movie ).stem ,parameters ['slurm_verbose' ])
4094+ else :
4095+ logger .warning (f"Skipping hot pixel removal on images of format { Path (movie ).suffix } " )
40954096
40964097 # get image dimensions
40974098 x , y , z = get_image_dimensions (movie )
@@ -4127,12 +4128,12 @@ def sum_gain_correct_frames(movie, average, parameters):
41274128 binning = int (x / gain_x )
41284129 if binning > 1 :
41294130 com = f"{ get_imod_path ()} /bin/newstack { average } { average } -bin { binning } "
4130- run_shell_command (com , verbose = parameters [ 'slurm_verbose' ] )
4131+ run_shell_command (com )
41314132
41324133 # apply gain reference if we are using one
41334134 if gain_reference_file != None :
41344135 com = f'{ get_imod_path ()} /bin/clip multiply "{ average } " "{ gain_reference_file } " "{ average } "; rm -f { average } ~'
4135- output , error = run_shell_command (com , verbose = parameters [ 'slurm_verbose' ] )
4136+ output , error = run_shell_command (com )
41364137
41374138 if "error" in output .lower ():
41384139 logger .error (output )
@@ -4143,7 +4144,7 @@ def sum_gain_correct_frames(movie, average, parameters):
41434144 x , y , z = get_image_dimensions (gain_reference_file )
41444145 logger .info (f"{ gain_reference_file } dimensions are { x } x { y } " )
41454146 raise Exception ("Failed to apply gain reference" )
4146-
4147+
41474148def align_movie_super (parameters , name , suffix , isfirst = False ):
41484149
41494150 tmp_directory = name
0 commit comments