diff --git a/ca_source_extraction/endoscope/get_patch_data.m b/ca_source_extraction/endoscope/get_patch_data.m index 930cb44..372f9b4 100644 --- a/ca_source_extraction/endoscope/get_patch_data.m +++ b/ca_source_extraction/endoscope/get_patch_data.m @@ -13,7 +13,11 @@ end % check whether the code is running on a worker (for parallel processing) -isOnWorker = ~isempty(getCurrentTask()); +try + isOnWorker = ~isempty(getCurrentTask()); +catch + isOnWorker = false; +end %% check whether the mat_data has been loaded into the base space mat_file = mat_data.Properties.Source();