Arrays have incompatible sizes for this operation

Hi @Helge ,

I have set the opts.savePDF=0 like you recommended and this time it did not stop at fitting, but run until the quantification and gave me a similar error about arrays having incompatible sizes.

The error I got this time:
Quantifying dataset  23 out of  23 total datasets...

... done.
 Elapsed time 0.183011 seconds
Timestamp August 14, 2024 16:31:03 Osprey 2.6.5  OspreyOverview

Gathering spectra from subspectrum 2 out of 2 total subspectra...
... done.
Gathering fit models from fit 2 out of 2 total fits...Arrays have incompatible sizes for this operation.

Error in fit_waterOspreyParamsToModel (line 80)
residual    = data - completeFit;

Error in OspreyOverview (line 223)
                                [ModelOutput] = fit_waterOspreyParamsToModel(inputData, inputSettings, fitParams);

Error in RunOspreyJob (line 57)
    MRSCont = OspreyOverview(MRSCont);

Related documentation

I had a look at the Quantify Results folder and most .tsv files look normal except A_TissCorrWaterScaled.tsv and A_CSFWaterScaled_Voxel_1_Basis_1.tsv where two rows have Inf as their values. Also the TissueFractions.tsv file has values fGM=0, fWM=0, fCSF=1, for these two participants (I attached the zipped files). The first of those two is sub-207_MRI2 about which I commented above because their 'aligned and averaged` image didn’t look right. The other is sub-223_MRI1, which I just added to the dataset.

Quantify_output.zip (12.1 KB)

Setting opts.savePDF=0 gave me a lot less errors. Yesterday I tried re-running the job file and excluding any participant & session that gave me an error during fitting then re-running again, and I ended up removing about 6 sessions before I gave up with that method.

Do you know if that might be a segmentation issue because of the script/options in the job file, or is it likely to be a problem with the data?