Commit 9f44c726 authored by Jay Dubb's avatar Jay Dubb
Browse files

Merge branch 'master' of https://github.com/BUNPC/Homer3

parents d1b58597 1506eaa6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -15,13 +15,13 @@ SNIRF
On

% Last Checked For Update
28-Sep-2020 16:49:33
07-Oct-2020 16:49:33

% Check For Updates
on

% Data Storage Scheme
files
memory

% Auto Save Acquisition Files
No
+8 −2
Original line number Diff line number Diff line
@@ -5,7 +5,9 @@ if ~exist(fname, 'file')
else
    fid = H5F.open(fname,'H5F_ACC_RDWR','H5P_DEFAULT');
end
if iscell(data)
    data = cell2str_new(data);
end

filetype = H5T.copy('H5T_FORTRAN_S1'); 
H5T.set_size(filetype, size(data,2)); 
@@ -17,7 +19,11 @@ H5T.set_size(memtype, size(data,2));
space = H5S.create_simple(1, size(data,1), []); 

% Create the dataset and write the string data to it. 
try
    dset = H5D.create(fid, location, filetype, space, 'H5P_DEFAULT'); 
catch
    dset = H5D.open(fid, location);
end

% Transpose the data to match the layout in the H5 file to match C 
% generated H5 file. 
+5 −1
Original line number Diff line number Diff line
@@ -16,7 +16,11 @@ else
        if ~isempty(findstr('rw', options))
            HDF5_DatasetWrite(fname, name, val);
        else
            try
                hdf5write(fname, name, val, 'WriteMode','append');
            catch
                HDF5_DatasetWriteStrings(fname, name, val)                
            end
        end
    catch
        return;
+4 −0
Original line number Diff line number Diff line
@@ -577,6 +577,10 @@ classdef DataClass < FileLoadSaveClass
            if isempty(obj)
                obj = DataClass();
            end
            if isempty(obj2)
                obj = DataClass();
                return;
            end
            if ~isa(obj2, 'DataClass')
                return;
            end
+17 −1
Original line number Diff line number Diff line
@@ -264,6 +264,10 @@ classdef SnirfClass < AcqDataClass & FileLoadSaveClass
                obj.stim0     = CopyHandles(obj2.stim0);
            catch
            end
            
            if ~isempty(obj2.filename)
                obj.filename = obj2.filename;
            end
        end
        
        
@@ -653,6 +657,18 @@ classdef SnirfClass < AcqDataClass & FileLoadSaveClass
        
        
        
        % -------------------------------------------------------
        function CopyStim(obj, obj2)
            for ii = 1:length(obj2.stim)
                if ii > length(obj.stim)
                    obj.stim(ii) = StimClass(obj2.stim(ii));
                else
                    obj.stim(ii).Copy(obj2.stim(ii));
                end
            end
        end        
        
        
        % -------------------------------------------------------
        function changes = StimChangesMade(obj)
            
@@ -984,7 +1000,7 @@ classdef SnirfClass < AcqDataClass & FileLoadSaveClass
                    stimnew(ii) = StimClass(CondNames{ii});
                end
            end
            obj.stim = stimnew;
            obj.stim = stimnew.copy;
        end
        
        
Loading