def __init__(self, home_dir, channel_count, trial_length, *, fs=30000, dat_name='100_CHs.dat', resp_channel='100_ADC1.continuous', trig_chan='100_ADC6.continuous', conversion_factor=0.195, sniff_basis=False, sniff_locked=False): """ Unit recording - inherets from the Threshold_Recording object, the main object for a lot of different experiment types. Holds information both on the recording variables, and on the units isolated from the recording Args: home_dir (str): Home directory of the recording channel_count (int): Number of channels present in the recording trial_length (float): Length of the trials presented fs (int, optional): Sampling rate of the experiment. Defaults to 30000. dat_name (str, optional): Name of the dat file associated with the experiment. Defaults to '100_CHs.dat'. conversion_factor (float, optional): The conversion between bits and uV. Defaults to 0.195. sniff_basis (bool, optional): Is the recording in sniff basis. Defaults to False. sniff_locked (bool, optional): Is the recording sniff locked (?) - dont know where this is from. Defaults to False. """ Recording.__init__(self, home_dir, channel_count, fs=fs, resp_channel=resp_channel, dat_name=dat_name, conversion_factor=conversion_factor) self.channel_map = np.load(os.path.join(home_dir, 'channel_map.npy')) self.channel_positions = np.load(os.path.join(home_dir, 'channel_positions.npy')) self.sniff_basis = sniff_basis self.trial_length = trial_length self.trig_chan = trig_chan self.trial_names = [] self.resp_peaks = self.find_respiration_peaks() self.trial_starts, self.trial_ends = self.find_trial_starts() self.resp_trace = self.find_respiration_trace() self.clusters = self.find_clusters()