ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

power spectrum in topo #636

Open kalok87 opened 8 years ago

kalok87 commented 8 years ago

Hallo, by reading the source code, I have 2 questions about the hypercolumn_distance in analysis.py

1) I have a preference map p and its range is in (0,Pi) , and if I want to use function power_spectrum(pref, peak_val=1.0) to analyse, should I just use p as input or should I use p = p/np.pi as input?

2) I also found that Topographica use a different method to calculate the power spectrum of the map. Instead of using fftshift(abs(fft2(z))**2) where z is visual map which contains both selectivity and preference, Topo is using 1 - np.abs(fftshift(fft2(p - 0.5,s=None, axes=(-2, -1)))). What is the meaning of subtracting 0.5 and why we don't use square?

Thank you