How to use the mnelab.dialogs.CropDialog function in mnelab

To help you get started, we’ve selected a few mnelab examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cbrnr / mnelab / mnelab / mainwindow.py View on Github external
def crop(self):
        """Crop data."""
        fs = self.model.current["data"].info["sfreq"]
        length = self.model.current["data"].n_times / fs
        dialog = CropDialog(self, 0, length)
        if dialog.exec_():
            self.auto_duplicate()
            self.model.crop(dialog.start or 0, dialog.stop)