Skip to content

Releases: raphaelvallat/yasa

0.6.5

04 Jul 19:02
0e4689d
Compare
Choose a tag to compare

Highlights of this release are:

  • PR 130: Add new yasa.EpochByEpochAgreement and yasa.SleepStatsAgreement modules for evaluating the agreement between two scorers (e.g. human vs YASA), either at the epoch-by-epoch level or at the level of summary sleep statistics. This is an experimental feature. Remaining tasks to complete the Evaluation pipeline are described in #166. Huge kudos to @remrama for this incredible new module!
  • PR 171: Fix deprecated scipy.integrate.simps.

What's Changed

New Contributors

Full Changelog: v0.6.4...v0.6.5

v0.6.4

13 Jan 14:06
6b37c63
Compare
Choose a tag to compare

Minor release with one bugfix and several other improvements:

  • Fix MNE plot_topomap deprecation (#119)
  • Pass relative_prominence parameters in :py:func:yasa.rem_detect (#151)
  • Rename yasa.simulate_hypno function to yasa.simulate_hypnogram
  • Add Hypnogram class in public API. Hypnogram will become the default method for manipulating hypnograms in YASA starting from v0.7.
  • Requires mne>=1.3, numpy>=1.18.1, numba>=0.57.1

v0.6.3

14 Dec 01:46
Compare
Choose a tag to compare

This is a minor release with one bugfix and one new function. Big shoutout to @remrama for his huge help on this new version!

Bugfix

Solved a bug in the spindles detection which resulted in no spindle being detected on some systems. See #107 and #115.

New functions

Added the yasa.simulate_hypno function to generate a simulated hypnogram, primarily for testing purposes and tutorials. The hypnogram is simulated as a Markov sequence based on sleep stage transition probabilities. Transition probabilities can be user-defined or will default to those published in Metzner et al., 2021, Commun Biol (see Figure 5b). See #109 and #110

Improvements

  • Added the ax keyword-argument to yasa.plot_hypnogram and removed figsize. Now select figure aesthetics (e.g., size, dpi) by opening a matplotlib.axes.Axes instance and passing to ax. See PR #108
  • yasa.plot_hypnogram now draws the hypnogram withmatplotlib.pyplot.stairs instead of matplotlib.pyplot.step. See issue #106 and PR #108

v0.6.2

27 Aug 01:23
fc51d93
Compare
Choose a tag to compare

This releases implement several new functions. Please refer to the full changelog at: https://raphaelvallat.com/yasa/build/html/changelog.html#v0-6-2-august-2022

What's Changed

New Contributors

v0.6.1

15 Mar 17:21
Compare
Choose a tag to compare

This release fixes a CRITICAL BUG with the spindles detection. Specifically, the yasa.spindles_detect() could return different results depending on the sampling rate of the data. For example, downsampling the data from 256 Hz to 128 Hz may have significantly reduced the number of detected spindles. As explained in issue 54, this bug was caused by a floating-point error in numpy.convolve() when calculating the soft spindle threshold. Tests seem to indicate that only certain sampling frequencies were impacted, such as 200 Hz, 256 Hz or 400 Hz. Other sampling frequencies such as 100 Hz and 500 Hz were seemingly not affected by this bug.

We recommend all users to upgrade to this new version ASAP and check any results obtained with the yasa.spindles_detect() function!

v0.6.0

20 Feb 22:30
Compare
Choose a tag to compare

YASA 0.6.0

This is a MAJOR release with several API-breaking changes, new functions, bugfixes and a new section in the documentation.

Slow oscillations—sigma coupling

IMPORTANT — The default behavior of coupling=True in yasa.sw_detect() has been changed: YASA now uses a ± 1 second window around the negative peak of the slow-waves (2 sec total) to calculate the coupling, instead of a ± 2 sec window. Overall, this tends to increase the ndPAC values because of the higher temporal specificity. To keep a 4-sec window, use coupling_params['time'] = 2.

We’ve enabled the statistical thresholding in the ndPAC calculation. Practically, this means that events with a weak/unreliable coupling are assigned an ndPAC value of zero. Statistical thresholding can be disabled with coupling_params['p'] = None.

Because of these changes, the coupling values are therefore not comparable with previous versions of YASA. Please make sure to re-run your analyses with the new default parameters.

Events detection

Plotting

Documentation

  • Added a Quickstart section to illustrate the main functions of YASA. Make sure to check it out!

Others

v0.5.1

18 Aug 03:53
Compare
Choose a tag to compare

This is a bugfix release. The latest pre-trained classifiers for yasa.SleepStaging were accidentally missing from the previous release. They have now been included in this release. We recommend all users to upgrade to this version with pip install –upgrade yasa

v0.5.0

11 Aug 22:56
Compare
Choose a tag to compare

This is a major release with an important bugfix for the slow-waves detection as well as API-breaking changes in the automatic sleep staging module. Please read the full changelog here.

We recommend all users to upgrade to this version with pip install –upgrade yasa.

v0.4.1

23 Mar 22:07
Compare
Choose a tag to compare

New functions

Added yasa.topoplot(), a wrapper around mne.viz.plot_topomap(). See 15_topoplot.ipynb.

Enhancements

  • The default frequency range for slow-waves in yasa.sw_detect() is now 0.3-1.5 Hz instead of 0.3-2 Hz. Indeed, most slow-waves have a frequency below 1Hz. This may result in slightly different coupling values when coupling=True so make sure to homogenize your slow-waves detection pipeline across all nights in your dataset.
  • yasa.trimbothstd() now handles missing values in input array.
  • yasa.bandpower_from_psd() and yasa.bandpower_from_psd_ndarray() now print a warning if the PSD contains negative values. See issue 29.
  • Upon loading, YASA will now use the outdated package to check and warn the user if a newer stable version is available.
  • YASA now uses the AntroPy package to calculate non-linear features in the automatic sleep staging module. Previously, YASA was using EntroPy, which could not be installed using pip.

v0.4.0

04 Nov 18:07
Compare
Choose a tag to compare

This is a major release with several new functions, the biggest of which is the addition of an automatic sleep staging module (yasa.SleepStaging). This means that YASA can now automatically score the sleep stages of your raw EEG data. The classifier was trained and validated on more than 3000 nights from the National Sleep Research Resource (NSRR) website.

Briefly, the algorithm works by calculating a set of features for each 30-sec epochs from a central EEG channel (required), as well as an EOG channel (optional) and an EMG channel (optional). For best performance, users can also specify the age and the sex of the participants. Pre-trained classifiers are already included in YASA. The automatic sleep staging algorithm requires the LightGBM and entropy package.

For more details, please see: https://raphaelvallat.com/yasa/build/html/changelog.html