Ejemplo n.º 1
0
                                                     post,
                                                     type='train')
             if threshold[c] is not None and artifact > threshold[c]:
                 continue
             induction_grand, pulse_offset_ind = induction_summary(
                 train_response,
                 freqs,
                 holding,
                 thresh=sweep_threshold,
                 ind_dict=induction_grand,
                 offset_dict=pulse_offset_ind,
                 uid=(expt.uid, pre, post))
             recovery_grand, pulse_offset_rec = recovery_summary(
                 train_response,
                 rec_t,
                 holding,
                 thresh=sweep_threshold,
                 rec_dict=recovery_grand,
                 offset_dict=pulse_offset_rec,
                 uid=(expt.uid, pre, post))
 for f, freq in enumerate(freqs):
     if freq not in induction_grand.keys():
         print("%d Hz not represented in data set for %s" % (freq, c_type))
         continue
     ind_offsets = pulse_offset_ind[freq]
     qc_plot.clear()
     ind_pass_qc = train_qc(induction_grand[freq],
                            ind_offsets,
                            amp=qc_params[1][c],
                            sign=qc_params[0],
                            plot=qc_plot)
     n_synapses = len(ind_pass_qc[0])
Ejemplo n.º 2
0
                        train_cache_change.append(cache_change)
                        if (50, 0.25) in [
                            (k[0], np.round(k[1], 2))
                                for k in train_response['responses'].keys()
                        ]:
                            grand_induction, offset_ind = induction_summary(
                                train_response,
                                freqs,
                                holding,
                                thresh=sweep_threshold,
                                ind_dict=grand_induction,
                                offset_dict=offset_ind)
                            grand_recovery, offset_rec = recovery_summary(
                                train_response,
                                t_rec,
                                holding,
                                thresh=sweep_threshold,
                                rec_dict=grand_recovery,
                                offset_dict=offset_rec)

        if len(grand_pulse_response) > 0:
            grand_pulse_trace = TSeriesList(grand_pulse_response).mean()
            p2 = trace_plot(grand_pulse_trace,
                            color=avg_color,
                            plot=p2,
                            x_range=[0, 27e-3],
                            name=('n = %d' % len(grand_pulse_response)))
            if len(grand_induction) > 0:
                for f, freq in enumerate(freqs):
                    if freq in grand_induction:
                        offset = offset_ind[freq]
    summary_plot[c, 1].addLegend()
    for expt in expt_list:
        if expt.connections is None:
            continue
        for pre, post in expt.connections:
            if [expt.uid, pre, post] in no_include:
                continue
            if expt.cells[pre].cre_type == cre_type[0] and expt.cells[post].cre_type == cre_type[1]:
                train_response, artifact = get_response(expt, pre, post, type='train')
                if threshold[c] is not None and artifact > threshold[c]:
                    continue
                induction_grand, pulse_offset_ind = induction_summary(train_response, freqs, holding, thresh=sweep_threshold,
                                                                ind_dict=induction_grand, offset_dict=pulse_offset_ind,
                                                                      uid=(expt.uid, pre, post))
                recovery_grand, pulse_offset_rec = recovery_summary(train_response, rec_t, holding, thresh=sweep_threshold,
                                                                rec_dict=recovery_grand, offset_dict=pulse_offset_rec,
                                                                    uid=(expt.uid, pre, post))
    for f, freq in enumerate(freqs):
        if freq not in induction_grand.keys():
            print ("%d Hz not represented in data set for %s" % (freq, c_type))
            continue
        ind_offsets = pulse_offset_ind[freq]
        qc_plot.clear()
        ind_pass_qc = train_qc(induction_grand[freq], ind_offsets, amp=qc_params[1][c], sign=qc_params[0], plot=qc_plot)
        n_synapses = len(ind_pass_qc[0])
        if n_synapses > 0:
            induction_grand_trace = TraceList(ind_pass_qc[0]).mean()
            ind_rec_grand_trace = TraceList(ind_pass_qc[1]).mean()
            ind_amp = train_amp(ind_pass_qc, ind_offsets, '+')
            ind_amp_grand = np.nanmean(ind_amp, 0)