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
  • a597ba2
  • /
  • Projects
  • /
  • Sriram - Multielectrode Analysis
  • /
  • meVis.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:77a1f80db1348acf040101cfdf0a3419a5586db9
origin badgedirectory badge
swh:1:dir:306b45bfb43e78c03c74a6f8ae431adf426bad7b
origin badgerevision badge
swh:1:rev:11b4f49b5e65dcd6a23efac3ed5b4ec47c3fe429
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: 11b4f49b5e65dcd6a23efac3ed5b4ec47c3fe429 authored by Selvanar on 21 November 2019, 07:11:10 UTC
Change calibration app to Single Eye analysis
Tip revision: 11b4f49
meVis.m
% 1_190129_150035.rhs IS THE IN VIVO FILE

%% Setup
clear;clc;close all
dbstop if error

% Load file 19 11 31 3
folder = 'G:\My Drive\Expmt Data\MultiElectrode Data\In_vivo_Cerebellar_Vermis_Exp3and4\New folder';

% Remove everything that is not an .rhs file
recFiles = dir([folder '\**\*.rhs']);

% Window around Stim Artifcats to remove
tbefore = 0;
tafter = 30000; % 30,000 = 1 second

% Window order 2.0
order = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, ...
         2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32];
     
%% Go through each file found in directory
for i = 1:length(recFiles) 
    
    % open .rhs file
    try
        clear amplifier_data
        read_Intan_RHS2000_file(recFiles(1).folder, recFiles(1).name)
    catch
        warning(['File Error: ', seg_file_names(i).name])
        continue
    end
    
    % set up figure
    q = figure('units','normalized','outerposition',[-0.0042 0.0267 1.0083 0.9800]);
    %q.Visible = 'off';
    %ha = tight_subplot(16,2,[0 0],[0 0],[0 0]);
    ha = tight_subplot(16,2,[0 0],[0 0],[0 0]);
    data_filt = ones(size(amplifier_data));
    
    % Find Stim locations
    stimAll = find(stim_data(any(stim_data,2),:) ~= 0);
    stimStarts = stimAll(1:6:end);
     num = 1;
    % Plot each Channel
    for j = 1:32      
        % If Stim Artifacts, replace with mean(data)
        if ~isempty(stimStarts)
            meanVal = mean(amplifier_data(j,:));
            for k = 1:length(stimStarts)
                amplifier_data(j,stimStarts(k)-tbefore:stimStarts(k)+tafter) = meanVal;
            end          
        end

        %% Filtering
        samplerate = 30000;
        
        % Bandpass 250 - 3000
        N = 5;
        fc = [140 2000];
        [bb,aa] = butter(N, fc/(samplerate/2), 'bandpass');
        data_filt(j,:) = filtfilt(bb,aa,amplifier_data(j,:));
        
        % Comb Filter
%         fo = 60;  
%         tt = 35; 
%         bw = (fo/(samplerate/2))/tt;
%         [b,a] = iircomb(samplerate/fo,bw,'notch');
%         data_filt(j,:) = filtfilt(b,a,data_filt(j,:));
        
        % OPTIONAL - to remove 60Hz noise (plus harmonics) VERY SLOW!
        % Bandstop 60, 120, 180, 240, 300, etc...
%         for k = 240:60:2400
%             N = 2;
%             fc = [k-2 k+2]; 
%             [bb,aa] = butter(N, fc/(samplerate/2), 'stop');
%             data_filt(j,:) = filtfilt(bb,aa,data_filt(j,:));
%         end

        %% Plot
        hold on
        %plot(ha(j), t,amplifier_data(j,:), 'k',t, data_filt(j, :));
        plot(ha(num), t, data_filt(j, :));
        
        % Cosmetics
        %set(ha(j),'xtick',[min(t):1:max(t)])
        set(ha(num),'xtick',[])
        set(ha(num),'ytick',[])
        set(ha(num),'xticklabel',[])
        set(ha(num),'yticklabel',[])
        minVal = min(min(amplifier_data));
        maxVal = max(max(amplifier_data));
        %set(ha(j), 'TickDir', 'in')
        box(ha(num),'off')
        ha(num).FontSize = 6;    
        num = num + 1;
        xlim([35 36])
    end 
    
    % more Cosmetics
    q.Visible = 'on';
    linkaxes(ha)
    %xlim([35 36])
    ylim([-2700 2000])
    disp(recFiles(i).name)
    
    % OPTIONAL Power Spectrum
    %freqSpec(amplifier_data, 30000)
    %freqSpec(data_filt, 30000)
    
    %pause
    close all
    
    
end

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