*Common issues and fixes - bahanonu/ciatah GitHub Wiki
Please use the online documentation website going forward: https://bahanonu.github.io/ciatah/
Page outlines some common issues and fixes to them that may be encountered while using calciumImagingAnalysis. These are mostly due to quirks specific to MATLAB, Fiji, or the computing environment calciumImagingAnalysis is used on.
- PCA-ICA, CNMF-E, or other cell extraction algorithm's don't produce sensible output.
- Out of memory using Miji
- Selecting scripts folder in Fiji.app on Mac OS X
- Fiji won't start using Miji or MIJ.start
- downloadCnmfGithubRepositories.m not downloading correctly
- modelPreprocessMovie analysis options list not showing
- Miji not loading correctly
- viewMovie or other functions where movies need to be loaded end without executing
- Contrast is low on cell transient ΔF/F movies using computeManualSortSignals
- Traces in computeManualSortSignals GUI are flat.
- Blank frames or entire frames have baseline shifted after motion correction in modelPreprocessMovie
- File or folder dialog box with no instructions
- When running
modelPreprocessMoviea dialog box appears showing the available analysis steps. Certain combinations of these steps make sense while others should be avoided. - For example, normally users want
turboreg->crop->dfof->downsampleTime. - An invalid input would be
turboreg->crop->dfof->dfstd->downsampleTime. Since calculating the dF/F then dF/std is problematic. - For two photon data, it is sometimes desired to have
medianFilter->turboreg->crop->dfstd (or dfof)->downsampleTime. - In general,
fft_highpassandfft_lowpassshould be avoided since they are meant to be run on stand-alone movies for specific purposes rather than included in the general pipeline.

- Remember at the options screen (see below) to select a spatial filtering there under the option
filterBeforeRegisterinstead of selecting thespatialFilteroption before theturboregoption in the analysis steps screen.

- If you get a
java.lang.OutOfMemoryError: GC overhead limit exceededstyle error (see below code) when trying to open a movie withMiji, make sure that you initialize MATLAB in thecalciumImagingAnalysispath or place thejava.optsfile in your MATLAB start-up folder.
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.lang.AbstractStringBuilder.<init>(Unknown Source)
at java.lang.StringBuilder.<init>(Unknown Source)-
On Windows, you can change the start-up folder as below or in general see https://www.mathworks.com/help/matlab/matlab_env/matlab-startup-folder.html.

-
java.optsincreases the amount of memory allocated so that Java doesn't run out when using Miji to load movies. To change the amount of memory allocated (calciumImagingAnalysis sets to 7 Gb by default), change the below to a higher or lower number, e.g. 9 Gb would be-Xmx9000m.
-Xmx7000mNavigate to the applications folder and select Fiji.app and Show Package Contents.

Then navigate to /Fiji.app/scripts and select Miji.m then Get Info. Select and copy the path as below.

When Matlab ask for the Fiji path, press command + shift + G in the dialog box to enter the full path manually, press enter, then select open.

- If calling
MijiorMIJ.startdoes not lead to a Fiji GUI appearing (e.g. the below output is seen in the command window), this is likely because the last Fiji/ImageJ instance was closed improperly (e.g. by closing ImageJ withFile->Quitor pressing the close button instead ofMIJ.exitin the Matlab command window), leading to a headless Fiji that cannot be properly closed by Miji/Matlab.
--------------------------------------------------------------
Status> ImageJ is already started.
--------------------------------------------------------------If this occurs, run the following commands one at a time:
resetMiji
% An instance of Miji should appear.
currP=pwd;Miji;cd(currP);
MIJ.exit- If when trying to download using
downloadCnmfGithubRepositories.mthe below error is encountered, try to rundownloadCnmfGithubRepositoriesseveral more times aswebsave(MATLAB built-in function) sometimes momentarily does not obtain the correct write permissions and fails.
@@@@@@@
Error using websave (line 104)
Unable to open output file: 'signal_extraction\cnmfe.zip' for writing. Common reasons include that the file exists and does not have write permission or the folder does not have write permissions.- MATLAB changed
uitablesinternal implementation, hencefindjobj(File Exchange function) broke causingreorderableListbox(File Exchange function) to also break. An updatedfindjobjhas been added to thecalciumImagingAnalysisrepository and this error (see below) should no longer occur.
Error in reorderableListbox (line 127)
jScrollPane = jScrollPane(1);- The below error occurs when the wrong version of
Fijiis downloaded. Please 2015 December 22 version download from https://imagej.net/Fiji/Downloads as that implementation ofMiji.mappears to work correctly with MATLAB.
@@@@@@@
Error using javaObject
No class MIJ can be located on the Java class path- It is likely that the regular expression given to
calciumImagingAnalysisdoes not match any of the files in the folder being analyzed. - For example, in
viewMovie, the belowImage movie regexpsetting should be changed toconcatcorrespond to the demo raw imaging data's name.

- The contrast (e.g. min/max) are estimated automatically from movie data, but will not always be the optimal display for manual human sorting of data. To improve the contrast, press
qwhile in the interface and adjust the min/max values until you are in a satisfactory range. See below.
Default contrast:

Contrast after user editing:

- Likely this is due to one of the traces having values that are very high, throwing off the estimate used set the y-axis in the GUI (which is constant across all candidate cells). This can be changed by pressing
w, see below.



- This normally occurs when
transfturboregis selected as theregistrationFxn, in some Windows editions and OSX versions this leads to random baseline shifts. If this occurs changeregistrationFxntoimtransform. See below (green selected option).

- This is mainly on
OS X, where in some versions the dialog boxes are not styled with title bars (see below). This is outside of MATLAB's control. If this occurs, check the command window as the instructions should also be provided there (e.g. withDialog box: [TITLE]style text).
