def create_timeseries_plot(recording):
    out = CreateTimeseriesPlot.execute(recording_dir=recording['directory'],
                                       channels=recording.get('channels', []),
                                       jpg_out={
                                           'ext': '.jpg'
                                       }).outputs['jpg_out']
    kb.saveFile(out)
    return 'sha1://' + kb.computeFileSha1(out) + '/timeseries.jpg'
def create_waveforms_plot(recording, firings):
    out = CreateWaveformsPlot.execute(recording_dir=recording['directory'],
                                      channels=recording.get('channels', []),
                                      units=recording.get('units_true', []),
                                      firings=firings,
                                      jpg_out={
                                          'ext': '.jpg'
                                      }).outputs['jpg_out']
    kb.saveFile(out)
    return 'sha1://' + kb.computeFileSha1(out) + '/waveforms.jpg'
def summarize_recording(recording):
    ret = deepcopy(recording)
    ret['computed_info'] = compute_recording_info(recording)
    firings_true_path = recording['directory'] + '/firings_true.mda'
    ret['plots'] = dict(timeseries=create_timeseries_plot(recording))
    channels = recording.get('channels', None)
    units = recording.get('units_true', None)
    if kb.findFile(firings_true_path):
        ret['firings_true'] = firings_true_path
        ret['plots']['waveforms_true'] = create_waveforms_plot(
            recording, ret['firings_true'])
        true_units_info_fname = compute_units_info(
            recording_dir=recording['directory'],
            firings=firings_true_path,
            return_format='filename',
            channel_ids=channels,
            unit_ids=units)
        kb.saveFile(true_units_info_fname)
        ret['true_units_info'] = 'sha1://' + kb.computeFileSha1(
            true_units_info_fname) + '/true_units_info.json'
    return ret
Пример #4
0
def create_waveforms_plot(dataset,firings):
  out=CreateWaveformsPlot.execute(recording_dir=dataset['directory'],firings=firings,jpg_out={'ext':'.jpg'}).outputs['jpg_out']
  kb.saveFile(out)
  return 'sha1://'+kb.computeFileSha1(out)+'/waveforms.jpg'
Пример #5
0
def create_timeseries_plot(dataset):
  out=CreateTimeseriesPlot.execute(recording_dir=dataset['directory'],jpg_out={'ext':'.jpg'}).outputs['jpg_out']
  kb.saveFile(out)
  return 'sha1://'+kb.computeFileSha1(out)+'/timeseries.jpg'