Skip to content

Commit ecb42b4

Browse files
committed
Fixed warning calls.
1 parent 1c47b2a commit ecb42b4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

+DataHandling/NeuroPALImage.m

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
fprintf('Successfully loaded neuron data from NWB file\n');
212212
end
213213
catch ME
214-
warning('Failed to load neuron data from NWB file: %s', ME.message);
214+
warning(ME.identifier, 'Failed to load neuron data from NWB file: %s', ME.message);
215215
end
216216
end
217217

@@ -271,8 +271,9 @@
271271
patch = Methods.Utils.subcube(data_zscored, ...
272272
round(sp.mean(i,:)), patch_hsize);
273273
sp.color_readout(i,:) = ...
274-
nanmedian(reshape(patch, ...
275-
[numel(patch)/size(patch, 4), size(patch, 4)]));
274+
median(reshape(patch, ...
275+
[numel(patch)/size(patch, 4), size(patch, 4)]), ...
276+
'omitnan');
276277
end
277278
end
278279

@@ -543,7 +544,7 @@
543544
save(np_file, 'version', 'data', 'info', 'prefs', 'worm', '-v7.3');
544545

545546
% Try to load neuron data and detection parameters from NWB file
546-
[neurons, mp_params] = DataHandling.NeuroPALImage.loadNeuronDataFromNWB(image_data, worm.body, info.scale);
547+
[~, ~] = DataHandling.NeuroPALImage.loadNeuronDataFromNWB(image_data, worm.body, info.scale);
547548

548549
% Note: Neuron data is now stored directly in NWB file - no companion ID file created
549550
end
@@ -787,7 +788,7 @@
787788
end
788789

789790
catch ME
790-
warning('Could not load neuron annotation data from NWB file: %s', ME.message);
791+
warning(ME.identifier, 'Could not load neuron annotation data from NWB file: %s', ME.message);
791792
fprintf('Stack trace: %s\n', getReport(ME));
792793
neurons = [];
793794
end
@@ -830,7 +831,7 @@
830831
end
831832

832833
catch ME
833-
warning('Could not load detection parameters from NWB file: %s', ME.message);
834+
warning(ME.identifier, 'Could not load detection parameters from NWB file: %s', ME.message);
834835
mp_params = [];
835836
end
836837
end

visualize_light.mlapp

-13.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)