Thomas S. Binns

Results 108 comments of Thomas S. Binns

Just to add, was discussed briefly with @adam2392 in https://github.com/mne-tools/mne-connectivity/pull/163#discussion_r1428342308

Just to give an idea of something I used for a package I wrote. I had a [class that was initialised by default with double precision](https://github.com/braindatalab/PyBispectra/blob/42d1c5144b475547730c8a11b74e42100583e351/src/pybispectra/utils/_defaults.py#L6-L40). The initialised object would...

> Since we already store weights for spectrum objects, I'm inclined to store weights (not estimation params) for TFRs too. That saves having to recompute them when users pass MNE...

> Ah OK, so it's for any non-spectral/spectrotemporal data (whether in Epochs object form or array form) where they need to pass the estimation params. That makes sense. Yeah, exactly.

> Since we already store weights for spectrum objects, I'm inclined to store weights (not estimation params) for TFRs too. That saves having to recompute them when users pass MNE...

Sorry for not opening a PR on this yet, things ended up being a little more complicated. Making the changes so that `weights` are available to be stored in `TFR`...

Okay super, then I'll also add these fixes to #12910!

@larsoner I updated an existing test like you suggested to show this new behaviour, with just a small description in the comments: https://github.com/mne-tools/mne-connectivity/blob/6debece5f02f6d3f393c9191f4d98f36159c3c20/examples/sensor_connectivity.py#L60-L70 Also cleaned up an outdated use of...

Also refactored the big indented code chunks like you suggested @larsoner for checking times (-> `_check_times()`), checking freqs (-> `_check_freqs()`), and computing Fourier coeffs./PSD (-> `_compute_spectra()`).