Module Expr Str Import alias identifier Import alias identifier Import alias ImportFrom alias ImportFrom alias Print NameLoad Assign NameStore ListLoad Str Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Num With Call NameLoad keyword Str keyword Num keyword Num keyword Num NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword ListLoad keyword NameLoad Assign NameStore Num Assign NameStore Num For NameStore Call NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad keyword Num keyword Num keyword NameLoad Assign NameStore Str Assign NameStore CompareLt NameLoad Num Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpMult Num Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore BinOpDiv SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num SubscriptLoad NameLoad Index Str Assign NameStore BinOpDiv BinOpAdd SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num NameLoad SubscriptLoad NameLoad Index Str If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad attr keyword Str keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr
N/A N/A 
==============================================================
Compute real-time power spectrum density with FieldTrip client
==============================================================

Please refer to `ftclient_rt_average.py` for instructions on
how to get the FieldTrip connector working in MNE-Python.

This example demonstrates how to use it for continuous
computation of power spectra in real-time using the
get_data_as_epoch function.

 N/A numpy np N/A matplotlib.pyplot plt N/A mne mne.realtime FieldTripClient mne.time_frequency psd_welch N/A __doc__ N/A bads N/A MEG 2443 EEG 053 N/A N/A fig ax N/A N/A plt subplots 1 N/A N/A FieldTripClient host localhost port 1972 tmax 150 wait_max 10 rt_client N/A N/A raw_info N/A N/A rt_client get_measurement_info N/A picks N/A N/A mne pick_types raw_info meg grad eeg False eog True stim False include N/A exclude bads N/A n_fft 256 N/A n_samples 2048 N/A ii N/A range 20 N/A N/A epoch N/A N/A rt_client get_data_as_epoch n_samples n_samples picks picks N/A N/A psd freqs N/A psd_welch epoch fmin 2 fmax 200 n_fft n_fft N/A cmap RdBu_r N/A freq_mask N/A freqs 150 N/A freqs N/A freqs N/A freq_mask N/A log_psd N/A 10 N/A N/A np log10 N/A psd N/A 0 N/A tmin N/A N/A N/A N/A epoch events N/A 0 N/A 0 N/A raw_info N/A sfreq N/A tmax N/A N/A N/A N/A N/A epoch events N/A 0 N/A 0 n_samples N/A raw_info N/A sfreq N/A N/A ii 0 N/A N/A im N/A N/A ax imshow N/A N/A log_psd N/A N/A N/A freq_mask T aspect auto origin lower cmap cmap N/A N/A N/A ax set_yticks N/A N/A np arange 0 N/A len freqs 10 N/A N/A N/A ax set_yticklabels N/A N/A N/A freqs N/A 10 round 1 N/A N/A N/A ax set_xlabel Frequency (Hz) N/A N/A N/A ax set_xticks N/A N/A np arange 0 N/A len picks 30 N/A N/A N/A ax set_xticklabels N/A picks N/A 30 N/A N/A N/A ax set_xlabel MEG channel index N/A N/A N/A im set_clim N/A N/A N/A N/A im set_data N/A N/A log_psd N/A N/A N/A freq_mask T N/A N/A N/A plt title N/A continuous power spectrum (t = %0.2f sec to %0.2f sec) N/A tmin tmax fontsize 10 N/A N/A N/A plt pause 0.5 N/A N/A N/A plt close