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

Revision 4dbf0ec391b877f21402aed9e8351fe8f7468d14 authored by D019 Rig on 19 December 2019, 23:25:22 UTC, committed by D019 Rig on 19 December 2019, 23:25:22 UTC
Update Calibration
1 parent 4cac1d4
  • Files
  • Changes
  • cb6e09d
  • /
  • Tools
  • /
  • VOR_Analysis
  • /
  • VOR_Tests.m
Raw File Download

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.

  • revision
  • directory
  • content
revision badge
swh:1:rev:4dbf0ec391b877f21402aed9e8351fe8f7468d14
directory badge Iframe embedding
swh:1:dir:f5b842836a02193b4b53d8570e1b32a462cadd75
content badge Iframe embedding
swh:1:cnt:5f0998f5437e33b82e29159b1021fdf9734ac076

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.

  • revision
  • directory
  • content
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 ...
VOR_Tests.m
function VOR_Tests(params)
    % This function takes in the information given to the UI and runs the
    % relavent test(s) on the data
    params.TopFolder = params.folder;
    % Single Analysis
    if params.count == 1
       params.folder = params.smr_files(1).folder; % hackish. related to folder selection error
       [~, params.file] = fileparts(params.folder);
       singleAnalysis(params)
       
    % Batch Analysis
    elseif params.count > 1
        for i = 1:params.count

            % re-set individual parameters for each smr file
            params.folder = params.smr_files(i).folder;
            [~, params.file] = fileparts(params.folder);
            % segNames?
            % segAmt?

            singleAnalysis(params);
            try
                params.smr_files(i).error = 0;
            catch
                params.smr_files(i).error = 1;
            end

            % Close everything, move to next file
            figHandles = findobj('Type', 'figure');
            close(figHandles(~contains({figHandles.Name}, 'VOR_GUI')))
        end

        % Did any files have errors?
        if any([params.smr_files.error])
            disp('Files with Errors: ')
            {params.smr_files(logical([params.smr_files.error])).name}
        else
            disp('No errors!')
        end

    else
        disp('No smr files found!')
    end
    fprintf('File Completed! :) \n\n\n')
end

function singleAnalysis(params)
    %% Prep
    cd(params.folder)
    params = subPlotDim(params);
    params.temp_placement = 1;
    fprintf(['\n###########################\nFile: ', params.file, ' \n'])
    
    %% Default Analysis
    switch params.analysis
        case 'Dark Rearing + Generalization'
            fprintf('Running: Dark Rearing Generalization Analysis\n')
            VOR_DarkRearingGeneralization(params)
        otherwise
            fprintf('Running: Basic Overview\n')
            params = VOR_Default(params);
    end

    %% Unique Analysis & Summaries
    fprintf('Generating Summary Figures...'); tic
    warning('off');
    expmtExcelFile = fullfile(params.folder,[params.file '.xlsx']);
    
    switch params.analysis
        case 'Amin_GC_Steps'
            %fprintf('Running: GC Step Summary')
            %VOR_Summary_Amin_gcStep(params)
            VOR_Summary_Sriram_CycleDiff(params, [15, 16 17], [1, 2, 3], 'T30 - T0', 'head')
            
        case 'Sriram_OKR'
            fprintf('Running: Fit Subtraction Analysis\n')
            VOR_Summary('eyeHphase', expmtExcelFile, 0); 
            VOR_Summary_Sriram_CycleDiff(params, [59, 60, 61], 2, 'T60 - T0', 'drum')
            VOR_Summary_Sriram_CycleDiff(params, [15, 16, 17], 2, 'T15 - T0', 'drum')
            VOR_Summary_Sriram_CycleDiff(params, [59, 60, 61], [15, 16, 17,], 'T60 - T15', 'drum')
            
        case 'Dark Rearing'
            fprintf('Running: Dark Rearing''s t30 & t0 Analysis\n')
            VOR_Summary_Sriram_CycleDiff(params, [15, 16 17], [1, 2, 3], 'T30 - T0', 'head')
            VOR_Summary_Sriram_CycleDiff(params, 14, 4, 'T27 5 - T2 5', 'head')
            
        case 'Amin_Gen'
            VOR_Summary_Amin_Gen('eyeHgain', expmtExcelFile, 0);
            
        case 'Sriram_Gen'
            VOR_Summary_Sriram_Gen('eyeHgain', expmtExcelFile, 1);
            VOR_Summary_Sriram_Gen('eyeHgain', expmtExcelFile, 0);
            VOR_Summary_Sriram_Gen('eyeHphase', expmtExcelFile, 0);
            
        case 'Default (Sine Only)'
            VOR_Summary('eyeHgain', expmtExcelFile, 1);
            VOR_Summary('eyeHgain', expmtExcelFile, 0);
            VOR_Summary('eyeHphase', expmtExcelFile, 0); 
    end
    
    toc

end

function params = subPlotDim(params)

    %% Prep
    params.segAmt = length(xlsread(fullfile(params.folder, [params.file '.xlsx']), 1, 'B2:B500'));
    sp_width = 10;
    params.sp_Dim = [params.segAmt, sp_width];
    sp_slotList = 1:(params.segAmt * sp_width);

    %% Make list of 'slots' that each figure occupies in the subplot.
    figure_loc = cell(params.segAmt*2, 1);
    slot_index = 1;
    defaultWidth = 2;
    fullSegWidth = 8;

    %% Default analysis figues are in groups of 2: full segment & summary
    for i = 1:(params.segAmt*2)
        % Full Segment locations
        if mod(i, 2)
            figure_loc{i} = sp_slotList(slot_index:slot_index+(fullSegWidth-1));
            slot_index = slot_index + fullSegWidth;
        % Summary Segments
        else
            figure_loc{i} = sp_slotList(slot_index:slot_index+(defaultWidth-1));
            slot_index = slot_index + defaultWidth;
        end
    end
    params.figure_loc = figure_loc;
end
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2025, 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