123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- """
- Settings for analysis and plotting.
- """
- import numpy as np
- from matplotlib import pyplot as plt
- from matplotlib import cm as colormaps
- from matplotlib.colors import to_rgb
- SERVERPATH = '/mnt/hux/mudata'
- DATAPATH = 'data/'
- FIGUREPATH = 'figures/'
- FIGSAVEFORMAT = '.svg'
- LABELFONTSIZE = 6
- COLORS = {
- 'spk': 'black',
- 'tonicspk': 'C0',
- 'burst': 'C3',
- 'pupil': 'black',
- 'run': 'green',
- 'sit': 'gray',
- 'imfs': colormaps.viridis,
- 'hht': 'black',
- 'spontaneous': 'gray',
- 'sparsenoise': 'pink',
- 'dark': 'black',
- 'natmov': 'darkblue',
- 'natmov_opto': 'darkblue',
- 'elevation': list(to_rgb('purple')) + [0.5],
- 'azimuth': 'purple',
- 'saccade': 'purple',
- 'phasebin2': 'mediumaquamarine',
- 'phasebin1': 'violet'
- }
- plt.rcParams['figure.dpi'] = 180
- plt.rcParams['axes.labelsize'] = LABELFONTSIZE
- plt.rcParams['xtick.labelsize'] = LABELFONTSIZE
- plt.rcParams['ytick.labelsize'] = LABELFONTSIZE
- plt.rcParams['legend.fontsize'] = LABELFONTSIZE
- NPUPILAREABINS = 10
- NGAMSPLINES = 20
- MINRATE = 0.01 # spikes / second
- BURSTCRITERIA = '(fp_dtsilent BETWEEN 0.099 and 0.101) AND (fp_dtburst BETWEEN 0.0039 AND 0.0041)'
- FIG1BEXAMPLEKEY = {'m': 'BL6_2014_0191', 's': 6, 'e': 4, 'u': 8}
- FIG1BEXAMPLETRANGE = 220, 520 # seconds
- FIG1BTBINWIDTH = 2.5 # seconds
- FIG1DEXAMPLEKEY = {'m': 'BL6_2014_0191', 's': 6, 'e': 4}
- FIG1DEXAMPLEIMF = 2
- FIG2BEXAMPLEKEY = {'m': 'PVCre_2019_0002', 's': 8, 'e': 8, 'u': 2}
- FIG2BEXAMPLEIMF = 2
- FIG2BEXAMPLETRANGE = 360, 420
- FIG5AEXAMPLEKEY = {'m':'PVCre_2018_0003', 's':3, 'e':3, 'u':53}
- # Locomotion bout detection
- RUNTHRESHOLD = 1
- MINRUNTIME = 2
- MAXSITTIME = 2
- MINRUNPROP = 0.5
- # MAXIBI = 0.5
- NIMFCYCLES = 4
- NSPIKES = 8
- NSHUFFLES = 1000
- SHUFFLE_BINWIDTH = 0.3 # seconds
- FREQUENCYBINS = np.logspace(-3, 0, 7)
- FREQUENCYXPOS = np.log10(FREQUENCYBINS[:-1]) + 0.25
- FREQUENCYTICKS = np.linspace(-3, 0, 4)
- FREQUENCYTICKLABELS = ["$10^{%d}$" % tick for tick in FREQUENCYTICKS]
- PHASEBINS = np.linspace(-np.pi, np.pi, 9, endpoint=True)
- PHASETICKS = PHASEBINS[::4]
- PHASETICKLABELS = ['-\u03C0', '0', '\u03C0']
- TRIGGEREDAVERAGES = {
- 'run': {
- 'dt': 0.05,
- 'bw': 0.1,
- 'pre': -5,
- 'post': 5,
- 'baseline': [-5, -3]
- },
- 'sit': {
- 'dt': 0.05,
- 'bw': 0.1,
- 'pre': -5,
- 'post': 5,
- 'baseline': [-5, -3]
- },
- 'saccade': {
- 'dt': 0.05,
- 'bw': 0.1,
- 'pre': -5,
- 'post': 5,
- 'baseline': [-5, -3]
- },
- 'trial_on': {
- 'dt': 0.05,
- 'bw': 0.1,
- 'pre': -1,
- 'post': 5,
- 'baseline': [-1, 0]
- }
- }
- BEHAVEXCLUSIONS = {
- 'run': [-2, 2],
- 'sit': [-1, 4],
- 'saccade': [-2, 2]
- }
|