frequency-correlation value

- add function to estimate the frequency-correlation value
- fix some small bugs
Ok...than I miss understood. This line we can remove.

Von: Praveen Sripad <notifications@github.com<mailto:notifications@github.com>>
Antworten an: jdammers/jumeg <reply@reply.github.com<mailto:reply@reply.github.com>>
Datum: Mittwoch, 26. November 2014 09:44
An: jdammers/jumeg <jumeg@noreply.github.com<mailto:jumeg@noreply.github.com>>
Cc: Lukas Breuer <l.breuer@fz-juelich.de<mailto:l.breuer@fz-juelich.de>>
Betreff: Re: [jumeg] frequency-correlation value (#52)


In jumeg_preprocessing.py:

> +
> +    # transform signal to frequency range
> +    fft_raw = np.fft.fft(evoked_raw.data)
> +    fft_cleaned = np.fft.fft(evoked_clean.data)
> +
> +    # get numerator
> +    numerator = np.sum(np.abs(np.real(fft_raw) * np.real(fft_cleaned)) + \
> +                       np.abs(np.imag(fft_raw) * np.imag(fft_cleaned)))
> +
> +    # get denominator
> +    denominator = np.sqrt(np.sum(np.abs(fft_raw) ** 2) * \
> +                          np.sum(np.abs(fft_cleaned) ** 2))
> +
> +    fc = numerator/denominator * 100.
> +
> +    # return results


@lukasbreuer<https://github.com/lukasbreuer> I meant '#return results'

-
Reply to this email directly or view it on GitHub<https://github.com/jdammers/jumeg/pull/52/files#r20922070>.


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------