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/chrischen2/eLife2020Stimulus.git
04 December 2020, 08:13:02 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    No releases to show
  • f739185
  • /
  • makeRandchecker.m
Raw File Download
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 ...

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.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:8a0e55530bf6c14273c85030071ed5772edd680f
origin badgedirectory badge Iframe embedding
swh:1:dir:f7391854816acd3529ca1e75084c0ee6af9d9597
origin badgerevision badge
swh:1:rev:dd7cc7b01d0fd41d62335ceef0f72a5e921cf374
origin badgesnapshot badge
swh:1:snp:f83f301f114580f26af191e385740bf7fee466b1
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.

  • 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: dd7cc7b01d0fd41d62335ceef0f72a5e921cf374 authored by chrischen2 on 23 November 2020, 01:01:14 UTC
Add files via upload
Tip revision: dd7cc7b
makeRandchecker.m
function [ cpat] = makeRandchecker( checkercolor,checkersize,ncheckers,radius, seed, numFrames)
% generate a random checker pattern from binary distribution with alpha
% channels
diat=2;
sz=floor(checkersize/diat)*ncheckers;
cpat=ones(sz,sz);
% cpat=cat(3,ones(sz,sz,1), zeros(sz,sz,1));
center=[floor(sz/2) floor(sz/2)];

s = RandStream('mt19937ar','Seed',seed);
RandStream.setGlobalStream(s);
pattern=randi(s,[0 1],ncheckers,ncheckers,numFrames)*checkercolor;

for x=1:sz
    for y=1:sz
        if sqrt((x-center(1))^2+(y-center(2))^2)>=radius/diat
            cpat(x,y)=0;
        end
    end
end
cpat=repmat(cpat,1,1,numFrames);

for k=1: numFrames
    for i=1:ncheckers
        for j=1:ncheckers
            cpat((i-1)*floor(checkersize/diat)+1:i*floor(checkersize/diat),(j-1)*floor(checkersize/diat)+1:j*floor(checkersize/diat),k)= ...,
                cpat((i-1)*floor(checkersize/diat)+1:i*floor(checkersize/diat),(j-1)*floor(checkersize/diat)+1:j*floor(checkersize/diat))*pattern(i,j,k);
        end
    end
end

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