code: def moresane_by_scale(self, start_scale=1, stop_scale=20, subregion=None, sigma_level=4, loop_gain=0.1,
                            tolerance=0.75, accuracy=1e-6, major_loop_miter=100, minor_loop_miter=30, all_on_gpu=False,
                            decom_mode="ser", core_count=1, conv_device='cpu', conv_mode='linear', extraction_mode='cpu',
                            enforce_positivity=False, edge_suppression=False,
                            edge_offset=0, flux_threshold=0, neg_comp=False, edge_excl=0, int_excl=0):
          dirty_data = self.dirty_data
          scale_count = start_scale
          while not (self.complete):
              logger.info("MORESANE at scale {}".format(scale_count))
              self.moresane(subregion=subregion, scale_count=scale_count, sigma_level=sigma_level, loop_gain=loop_gain,
                            tolerance=tolerance, accuracy=accuracy, major_loop_miter=major_loop_miter,
                            minor_loop_miter=minor_loop_miter, all_on_gpu=all_on_gpu, decom_mode=decom_mode,
                            core_count=core_count, conv_device=conv_device, conv_mode=conv_mode,
                            extraction_mode=extraction_mode, enforce_positivity=enforce_positivity,
                            edge_suppression=edge_suppression, edge_offset=edge_offset,
                            flux_threshold=flux_threshold, neg_comp=neg_comp,
                            edge_excl=edge_excl, int_excl=int_excl)
              self.dirty_data = self.residual
              scale_count += 1
              if (scale_count>(np.log2(self.dirty_data.shape[0]))-1):
                  logger.info("Maximum scale reached - finished.")
                  break
              if (scale_count>stop_scale):
                  logger.info("Maximum scale reached - finished.")
                  break
          self.dirty_data = dirty_data
          self.complete = False