Ejemplo n.º 1
0
 for expt in expt_list:
     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
Ejemplo n.º 2
0
                    if amp is not None and abs(amp) > amp_thresh:
                        train_response, cache_change = cache_response(
                            expt,
                            pre,
                            post,
                            train_response_cache,
                            type='train')
                        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,
 hue = colorsys.rgb_to_hsv(color[0], color[1], color[2])
 hue = hue[0]
 summary_plot[c, 0].addLegend()
 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()