Created
October 11, 2017 01:00
-
-
Save nicain/bce66cd073e422f07cf337b476c63be7 to your computer and use it in GitHub Desktop.
Debug script for "more than 2 epochs cut" (EpochSeparationException)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import allensdk | |
| from allensdk.core.brain_observatory_cache import BrainObservatoryCache | |
| import os | |
| from distutils.version import StrictVersion | |
| assert allensdk.__version__ == StrictVersion('0.14.2') | |
| from allensdk.brain_observatory.brain_observatory_exceptions import EpochSeparationException | |
| import matplotlib.pyplot as plt | |
| # Settings: | |
| oeid = 556363813 | |
| drive_path = '/data/mat/nicholasc/boc_iwarehouse' | |
| manifest_file = os.path.join(drive_path, 'manifest.json') | |
| # Initializations: | |
| boc = BrainObservatoryCache(manifest_file=manifest_file) | |
| data_set = boc.get_ophys_experiment_data(oeid) | |
| # Produces the Exception: | |
| print data_set.get_session_type() | |
| try: | |
| data_set.get_stimulus_epoch_table() | |
| except EpochSeparationException as e: | |
| delta = e.delta | |
| plt.plot(delta) | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment