Changeset 1269 for framspy


Ignore:
Timestamp:
07/08/23 14:35:36 (10 months ago)
Author:
oriona
Message:

FFT is now calculated after the signature reduction, to increase efficiency.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/dissimilarity/density-distribution.py

    r1268 r1269  
    170170        if self.frequency:
    171171            samples = np.array(feature_array,dtype=np.float64)
    172             return abs(np.fft.fft(samples))
     172            return samples
    173173        else:
    174174            return [np.array(feature_array,dtype=np.float64), np.array(weight_array,dtype=np.float64)]
     
    267267                    print("After reduction voxels fig1: ", sum(s1[1]), " fig2: ", sum(s2[1]))
    268268                    raise RuntimeError("Voxel reduction error!")
     269       
     270        if self.frequency:
     271           s1 = abs(np.fft.fft(s1))
     272           s2 = abs(np.fft.fft(s2))
    269273       
    270274        if self.metric == 'l1':
Note: See TracChangeset for help on using the changeset viewer.