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 ccfd5efa4ee6fd4da85acf9f478b8270aaa6eceb authored by Kellen Vu on 13 April 2023, 22:09:16 UTC, committed by Kellen Vu on 13 April 2023, 22:09:16 UTC
[Eye Calibration] Add scrollbar to window, and fix a bug in the lowpass filter
1 parent 3c5722b
  • Files
  • Changes
  • a26049b
  • /
  • Tools
  • /
  • Program_Maestro_and_CX
  • /
  • openmaestro.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:ccfd5efa4ee6fd4da85acf9f478b8270aaa6eceb
directory badge
swh:1:dir:3db2a6f22021f847e10e9dde59f2f07371f5ba82
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.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
openmaestro.m
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)
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–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