NuRadioReco.utilities.fft module

NuRadioReco.utilities.fft.time2freq(trace, sampling_rate)[source]

performs forward FFT with correct normalization that conserves the power

Parameters:
trace: np.array

time trace to be transformed into frequency space

sampling_rate: float

sampling rate of the trace

NuRadioReco.utilities.fft.freq2time(spectrum, sampling_rate, n=None)[source]

performs backward FFT with correct normalization that conserves the power

Parameters:
spectrum: complex np array

the frequency spectrum

sampling_rate: float

sampling rate of the spectrum

n: int

the number of sample in the time domain (relevant if time trace has an odd number of samples)