imports.py 744 B

123456789101112131415161718192021
  1. # include modules to the path
  2. import sys, os
  3. parent_dir = os.path.abspath(os.path.join(os.getcwd(), os.pardir))
  4. sys.path.append(parent_dir)
  5. sys.path.append(os.path.join(parent_dir, 'session'))
  6. sys.path.append(os.path.join(parent_dir, 'postprocessing'))
  7. import os
  8. import numpy as np
  9. import h5py, json
  10. import matplotlib.pyplot as plt
  11. from scipy import signal
  12. from scipy.interpolate import interp1d
  13. #import scipy.ndimage as ndi
  14. from session.utils import *
  15. from session.adapters import H5NAMES, EPOCH_NAMES, COLORS
  16. from postprocessing.spatial import place_field_2D, map_stats, get_field_patches, get_positions_relative_to
  17. from postprocessing.spatial import bins2meters, cart2pol, pol2cart
  18. from postprocessing.spiketrain import instantaneous_rate