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
  • /
  • Tracking
  • /
  • validity.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:d95c030c609a587149c58f34f4d09a16b4a9bdc6
content badge Iframe embedding
swh:1:cnt:ad1a57db74859080124abb85920f344ac1e65768
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 ...
validity.m
%This folder looks at instantenous yaw and beta (slip) data to output
%logical indices that tells whether frames are valid (true) for analysis or
%not (false).
%
%@Chanwoo Chun, <cc2465@cornell.edu>

function [smallBeta, smallYaw, valid] = validity(shot)
%make smallBeta validity column
beta=shot.com.bottom.beta;
smallBeta = zeros(size(shot.frame)); %for now 0 means good 1 means bad
badFrameB = find(abs(beta)>10);
smallBeta(badFrameB) = 1;
smallBeta=denoise(smallBeta.',30).';
smallBeta=ones(size(smallBeta))-smallBeta; %flip so that 1 means good

%make smallYaw validity column
instYaw=shot.com.bottom.instYaw;
cn = 20;
convIYaw = conv(instYaw,ones(cn,1),'same');
convIYaw = abs(convIYaw);
smallYaw = ones(size(shot.frame));
badFrameY = find(convIYaw>8); %10<-5
smallYaw(badFrameY)=0;

%below denoises the binary array
a=smallYaw';
for i = 1:2    
    a=denoise(a,20);
    a=ones(size(a))-a;
end
smallYaw=a';

%"valid" is where fly is walking straight.
valid=shot.validity.notTouching.*smallBeta.*smallYaw;

 figure
 plot(smallBeta*9);
 hold on
 plot(smallYaw*10);
 plot(shot.validity.notTouching*11);
 plot(convIYaw);
 plot(valid);
 hold off

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 ...

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

back to top