def find_tf_peak(self): ## print 'grabbing ordered_idx_tf from find_tf_peak' o_idx = self.ordered_idx_tf() if o_idx.shape in ( (), (0,) ): print 'no features, all masked' return if self.ana_xform in ('absmax', 'max'): tf_pk_idx = o_idx[-self.tf_order] else: tf_pk_idx = o_idx[self.tf_order-1] ## print 'grabbing beam_sig from find_tf_peak' ti, fi = unravel_index(tf_pk_idx, self.beam_sig.shape[1:]) # update state of tf_idx and send new image signal self.tf_idx = ti, fi
def find_alldim_peak(self): ## print 'grabbing ordered_idx_alldim from find_alldim_peak' o_idx = self.ordered_idx_alldim() if o_idx.shape in ( (), (0,) ): print 'no features, all masked' return if self.ana_xform in ('absmax', 'max'): # find the (last-order) unmasked ordered index all_pk_idx = o_idx[-self.all_order] else: # find the lowest order unmasked index all_pk_idx = o_idx[self.all_order-1] ## print 'grabbing beam_sig from find_alldim_peak' vx, ti, fi = unravel_index(all_pk_idx, self.beam_sig.shape) # update state and send off the new image signal self.vox_idx = vx self.tf_idx = ti, fi self.signal_new_vox() self.signal_new_image()