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 1dc429fc0da4cc5ff4f62617760447613f85980b authored by vbhandawat on 01 February 2021, 13:54:09 UTC, committed by GitHub on 01 February 2021, 13:54:09 UTC
Add files via upload
1 parent 17f20a6
  • Files
  • Changes
  • 345c390
  • /
  • Plotting
  • /
  • additional
  • /
  • gaitmap.m
Raw File Download
Permalinks

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:1dc429fc0da4cc5ff4f62617760447613f85980b
directory badge Iframe embedding
swh:1:dir:caea057ce63af72443dd2a125b9791b5d4bb473f
content badge Iframe embedding
swh:1:cnt:c7b74c6c4af79c2ce4535918f29a4640743d6411
Citations

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 ...
gaitmap.m
%Generates gait maps
%
%@Chanwoo Chun, Aug. 21, 2019, <cc2465@cornell.edu>
%This code does the following:
% 1) Saves gait maps of all data
addpath(genpath(['..' filesep '..' filesep '..' filesep '..' filesep 'FlyLocomotion']))
shotDir= dir(['..' filesep '..' filesep '..' filesep '**' filesep 'shot.mat']);

for i = 1:length(shotDir)
    disp(num2str(i/length(shotDir)*100))
    shotName = strcat(shotDir(i).folder,filesep,shotDir(i).name);
    load(shotName);
    
    %[gender, strain, weight, legLength, flynum] = getFlyInfo(shotDir(i).folder);
    
    t = shot.timeStamp';
    
    dxdt=shot.com.bottom.dxdt*24/1984;
    dydt=shot.com.bottom.dydt*24/1984;
    comVel = (dxdt.^2+dydt.^2).^(1/2);
    
    height = shot.com.side.location(:,2)*24/1984;
    
    legs = [shot.leg.R1.';shot.leg.R2.';shot.leg.R3.';shot.leg.L1.';shot.leg.L2.';shot.leg.L3.'];   
    
    %legs = 1-legs;
    %valid=shot.validity.valid;
    %legs(:,~valid) = nan;
    
    legs(legs==0) = nan;
    
    
    legs(1,:) = legs(1,:)*10; %R1
    legs(2,:) = legs(2,:)*6; %R2
    legs(3,:) = legs(3,:)*8; %R3
    legs(4,:) = legs(4,:)*7; %L1
    legs(5,:) = legs(5,:)*9; %L2
    legs(6,:) = legs(6,:)*5; %L3
    
    lw = 10;
    figure
    ax1=subplot(3,1,1);
    hold on
    for j = 1:6
        plot(t,legs(j,:),'k','linewidth',lw)
    end
    hold off
    ylim([3 12])
    %pbaspect([3 1 1])
    
    ax2=subplot(3,1,2);
    plot(t,comVel)
    ylabel('speed (mm/s)')
    xlabel('time (sec)')
    
    ax3=subplot(3,1,3);
    plot(t,height)
    ylabel('height (mm)')
    xlabel('time (sec)')    
    linkaxes([ax1 ax2 ax3],'x')
    
    drawnow
    
    avgSpeed = mean(comVel);
    
    filePath = ['temp_data' filesep 'speed' num2str(avgSpeed) '_fileNum' num2str(i) '.png'];
    set(gcf,'visible','off')
    saveas(gcf,filePath)
    close
    
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— Contact— JavaScript license information— Web API