|
a |
|
b/functions/adminfunc/pop_stdwarn.m |
|
|
1 |
% POP_STDWARN - check memory options and issue warning for studies. |
|
|
2 |
% |
|
|
3 |
% Usage: >> pop_stdwarn; |
|
|
4 |
% |
|
|
5 |
% Author: Arnaud Delorme, CERCO, 2007 |
|
|
6 |
% |
|
|
7 |
% See also: EEG_OPTIONS |
|
|
8 |
|
|
|
9 |
% Copyright (C) Arnaud Delorme, CERCO, 2007, arno@salk.edu |
|
|
10 |
% |
|
|
11 |
% This file is part of EEGLAB, see http://www.eeglab.org |
|
|
12 |
% for the documentation and details. |
|
|
13 |
% |
|
|
14 |
% Redistribution and use in source and binary forms, with or without |
|
|
15 |
% modification, are permitted provided that the following conditions are met: |
|
|
16 |
% |
|
|
17 |
% 1. Redistributions of source code must retain the above copyright notice, |
|
|
18 |
% this list of conditions and the following disclaimer. |
|
|
19 |
% |
|
|
20 |
% 2. Redistributions in binary form must reproduce the above copyright notice, |
|
|
21 |
% this list of conditions and the following disclaimer in the documentation |
|
|
22 |
% and/or other materials provided with the distribution. |
|
|
23 |
% |
|
|
24 |
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
|
25 |
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
|
26 |
% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
|
27 |
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
|
|
28 |
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
|
|
29 |
% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
|
|
30 |
% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|
|
31 |
% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
|
|
32 |
% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
|
|
33 |
% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
|
|
34 |
% THE POSSIBILITY OF SUCH DAMAGE. |
|
|
35 |
|
|
|
36 |
res = 0; |
|
|
37 |
|
|
|
38 |
eeglab_options; |
|
|
39 |
if ~option_storedisk |
|
|
40 |
vartext = strvcat('Your memory options currently allow to store all datasets in memory (RAM)!', ' ', ... |
|
|
41 |
'If your study contains a large number of datasets, you should change the memory', ... |
|
|
42 |
'settings to allow EEGLAB to only read the dataset header (cancel next action and', ... |
|
|
43 |
'use menu item "File > Preferences" - first checkbox to allow at most one dataset at a', ... |
|
|
44 |
'time in memory). Otherwise your computer might run out of memory.', ' ', ... |
|
|
45 |
'NOTE that this is a REQUIRED step to load the tutorial study since it does not', ... |
|
|
46 |
'contain the EEG data.', ' '); |
|
|
47 |
|
|
|
48 |
res = questdlg2(vartext, 'Study warning', 'Cancel', 'OK', 'OK'); |
|
|
49 |
if strcmpi(res, 'Cancel'),return; end |
|
|
50 |
end |