GCSAL_ex1.m [18:53]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if (~exist('g','var') || ~isa(g,'GCSAL.GCSAL'))
    % The gcsal.h5 and gcsal.h5.info.mat files are available for download from the
    % website and should be placed in the h5_data directory.

    %%%%%%%%%%%%%% CHANGE THESE %%%%%%%%%%%%%%%%%%
    % Set this to wherever you put the gcsal.h5 file and gcsal.h5.info.mat
    % files downloaded from dropbox
    h5_dir = './h5_data/';

    % Directory to code. The folder +GCSAL which contains this file should be
    % in this directory
    codebase_dir = './';
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    % Full path to .mat file with h5 info
    h5_file = fullfile(h5_dir, 'gcsal.h5');
    h5_mat_file = [h5_file '.info.mat'];

    % Set up Matlab path
    addpath(genpath(codebase_dir))

    %% Load GCSAL object from .mat file

    % This requires about 6 gb of RAM just to hold all of the header
    % information in memory

    % Normally you should load the GCSAL object from the .mat file but if it
    % doesn't exist on your path you can use the .h5 file. After using the .h5
    % file a .mat file will be created automatically for subsequent use
    if ~exist(h5_mat_file, 'file')
        g = GCSAL.GCSAL(h5_file);
    else
        g = GCSAL.GCSAL(h5_mat_file);
        g.h5_fname = h5_file;
    end
end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



GCSAL_ex2.m [15:50]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if (~exist('g','var') || ~isa(g,'GCSAL.GCSAL'))
    % The gcsal.h5 and gcsal.h5.info.mat files are available for download from the
    % website and should be placed in the h5_data directory.
    
    %%%%%%%%%%%%%% CHANGE THESE %%%%%%%%%%%%%%%%%%
    % Set this to wherever you put the gcsal.h5 file and gcsal.h5.info.mat
    % files downloaded from dropbox
    h5_dir = './h5_data/';
    
    % Directory to code. The folder +GCSAL which contains this file should be
    % in this directory
    codebase_dir = './';
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    % Full path to .mat file with h5 info
    h5_file = fullfile(h5_dir, 'gcsal.h5');
    h5_mat_file = [h5_file '.info.mat'];
    
    % Set up Matlab path
    addpath(genpath(codebase_dir))
    
    %% Load GCSAL object from .mat file
    
    % This requires about 6 gb of RAM just to hold all of the header
    % information in memory
    
    % Normally you should load the GCSAL object from the .mat file but if it
    % doesn't exist on your path you can use the .h5 file. After using the .h5
    % file a .mat file will be created automatically for subsequent use
    if ~exist(h5_mat_file, 'file')
        g = GCSAL.GCSAL(h5_file);
    else
        g = GCSAL.GCSAL(h5_mat_file);
        g.h5_fname = h5_file;
    end
end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



