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

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.

  • content
content badge
swh:1:cnt:4be260884b783ea9af491ab1ba512721bf362a79

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
(requires biblatex-software package)
Generating citation ...
function decompressed = openmaestro(filename)
% OPENMAESTRO reads in the raw analog electrophysiology file sepcified by
% filename and outputs the decompressed signal
% 
% Hannah Payne
% Raymond lab 3/28/13
%
% Algorithm based on https://sites.google.com/a/srscicomp.com/maestro/data-analysis/data-file-format/data-compression-algorithm
% I exclude some artifacts (byte pattern 1 0 0 0) and start 

fid = fopen(filename);

% Read the raw data
compressed = fread(fid,'uint8=>uint16');

% Init
i = 0;
nBytes = 17*1024; % Number of bytes to skip at the beginning 

% Remove a weird artifact thing that I don't understand - 1-0-0-0 pattern
removepnts = strfind(compressed',uint16([1 0 0 0]));
compressed([removepnts removepnts+1 removepnts+2 removepnts+3])=[];

while nBytes < (length(compressed)-1)
    
    nBytes = nBytes+1;
    i = i+1;
    
    currbyte = compressed(nBytes);

    % Double byte 
    if currbyte>127        
        nBytes = nBytes+1;
        secondbyte = compressed(nBytes);
        firstbyte = bitand(currbyte, 127);
        firstbyte = bitshift(firstbyte,8);
        netbyte(i) = int16(firstbyte + secondbyte)- 4096;
        
    % Single byte
    else 
        netbyte(i) = int16(currbyte) - 64;
    end          
end


%% Error checking
errors = find(netbyte>1000); % Occasionally jumps a lot
for i = 1:length(errors)
    netbyte(errors(i))=0;
end
% Take cumulative sum
decompressed = cumsum(double(netbyte));

% Scale factor - not sure where this came from. Websit
% decompressed = decom pressed * 4.8828125/2^12;
decompressed = decompressed * 20/2^12; % 20 mv P-P input, 12 bits

% Plot
%figure; plot(decompressed)

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