Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/RaymondLab/Code
25 June 2024, 13:39:08 UTC
  • Code
  • Branches (12)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/Calibration
    • refs/heads/Calibration2
    • refs/heads/Master
    • refs/heads/VerticalTracking
    • refs/heads/code_generalization
    • refs/heads/consolidation_project_241B
    • refs/heads/local_configuration_241B
    • refs/heads/revert-2-consolidation_project_241B
    • refs/heads/rig241b_driftfix_sign
    • refs/heads/smr_to_smrx
    • refs/heads/tracking_dev
    • refs/tags/v1.0.0
    No releases to show
  • 30dc58e
  • /
  • Projects
  • /
  • Amin - GCaMP
  • /
  • D019.m
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:36b0167bf16572ad37045ad848728d35bb486e76
origin badgedirectory badge
swh:1:dir:12e5bf9ea95463ad5e24e4d3ed61e22ac0daee01
origin badgerevision badge
swh:1:rev:f562b26a59ee1fe18ddbdd35eb072e822e4e0f63
origin badgesnapshot badge
swh:1:snp:5000b5dcf61aa2cac987bbe6af9204d011668dda

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: f562b26a59ee1fe18ddbdd35eb072e822e4e0f63 authored by Katie Li on 14 November 2022, 22:02:35 UTC
Matlab files on D241B setup
Tip revision: f562b26
D019.m

%% Prep & params
clear;clc;close all

thresh = .0078;
window = [20 40];

% 114
file = 'Z:\1_Maxwell_Gagnon\ProjectData_Amin\Boris Recordings\Exp-GCamp-115-07182018-OKR only\Exp-GCamp-114-07182018-OKR only3.smr';
startT = 160;
endT = 560;

% 115
%file = 'Z:\1_Maxwell_Gagnon\ProjectData_Amin\Boris Recordings\Exp-GCamp-115-07182018-OKR only\Exp-GCamp-115-07182018-OKR only3.smr';
%startT = 149.6379 + 6; 
%endT = 615.3886 - 6;

% Extract data
chanlist = readSpikeFile(file, []);
chanindsAll = [chanlist.number];

% Acceptor
%chanlabels = {'hhpos','htpos','hepos1','hepos2','hepos','vepos','hhvel','htvel','htvel','TTL3','TTL4', 'Memorya', 'Keyboard'};

% Donor
chanlabels = {'hhpos','htpos','hepos1','hepos2','hepos','vepos','hhvel','htvel','htvel','TTL3','TTL4', 'Memoryd', 'Keyboard'};

chaninds = find(      arrayfun(@(x) any(strcmp(x.title,chanlabels)),chanlist)     );
rawdata = importSpike(file,chanindsAll(chaninds));

%% for either

% make ephys channel matrix
ephys_chan = rawdata(end-1).data(startT*1000:endT*1000);
ephys_chan_mat = vec2mat(ephys_chan,1000);
ephys_chan_mat(end,:) = [];

% make drum velocity matrix
drum_chan = rawdata(1).data(startT*1000:endT*1000);
drum_chan_mat = vec2mat(drum_chan,1000);
drum_chan_mat(end,:) = [];


% manual spike time extraction
putitive_spikes = ephys_chan > thresh;
% create spike window
for i = 1:length(putitive_spikes)
    if putitive_spikes(i) == 1
        % block out the rest of spike. Only keep initial detection point
        putitive_spikes(i+1:i+window(2)-1) = 0;
    end
end

% make matrix of spike times
putitive_spikes_mat = vec2mat(putitive_spikes, 1000);
putitive_spikes_mat(end,:) = [];

% 1000 bins (raw)
putitive_spikes_mat_raw = sum(putitive_spikes_mat);
% 500 bins
putitive_spikes_mat_500bin = putitive_spikes_mat_raw(1:2:end) + putitive_spikes_mat_raw(2:2:end);
% 250 bins
putitive_spikes_mat_250bin = putitive_spikes_mat_500bin(1:2:end) + putitive_spikes_mat_500bin(2:2:end);
% 125 bins
putitive_spikes_mat_125bin = putitive_spikes_mat_250bin(1:2:end) + putitive_spikes_mat_250bin(2:2:end);


%% plotting

figure(1)
subplot(3,1,1)
plot(nanmean(drum_chan_mat), 'k');
subplot(3,1,2)
bar(putitive_spikes_mat_125bin)
subplot(3,1,3)
plot(nanmean(ephys_chan_mat), 'k');
xlabel('Time (ms)')
























back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API