Skip to content

Changing averaging from 2 to 1 caused a crash #471

@raacampbell

Description

@raacampbell

Averaging changed from 2 to 1 and this caused a matrix size assignment error and a crash. Probably not too hard to solve...


BAKE FAILED IN acquisition_view. CAUGHT THE FOLLOWING ERROR:
 Unable to perform assignment because the size of the left side is 58-by-58-by-8-by-4 and the size of the right side is 58-by-58-by-16-by-4.
Line 46 in C:\MATLAB\BakingTray\code\@BT\placeNewTilesInPreviewData.m
Line 86 in C:\MATLAB\BakingTray\code\@BT\runTileScan.m
Line 225 in C:\MATLAB\BakingTray\code\@BT\bake.m
Line 68 in C:\MATLAB\BakingTray\code\+BakingTray\+gui\@acquisition_view\bake_callback.m
Line 61 in C:\MATLAB\BakingTray\code\+BakingTray\+gui\@acquisition_view\buildFigure.m

Unable to perform assignment because the size of the left side is 58-by-58-by-8-by-4 and the size of the right side is 58-by-58-by-16-by-4.

Error in BT/placeNewTilesInPreviewData (line 46)
            obj.lastPreviewImageStack(y,x,:,:) = obj.downSampledTileBuffer;

Error in BT/runTileScan (line 86)
    obj.placeNewTilesInPreviewData

Error in BT/bake (line 225)
        runTileScanSuccess = obj.runTileScan;

Error in BakingTray.gui.acquisition_view/bake_callback (line 68)
        sectionInd = obj.model.bake; %if the bake loop didn't start, it returns 0

Error in BakingTray.gui.acquisition_view/buildFigure>@(varargin)obj.bake_callback(varargin{:}) (line 61)
                    'Callback', @obj.bake_callback, ...
 
Error while evaluating UIControl Callback.

recipe:

Acquisition: {acqStartTime: '2025/04/23 17:45:26'}
sample: {ID: SP061_063_065, objectiveName: nikon 16x}
mosaic:
  sectionStartNum: 1.0
  numSections: 441.0
  cuttingSpeed: 0.5
  cutSize: 23.0
  sliceThickness: 0.04
  numOverlapZPlanes: 0.0
  numOpticalPlanes: 8.0
  overlapProportion: 0.07
  sampleSize: {X: 16.35, Y: 22.86}
  scanmode: 'tiled: auto-ROI'
  tilesToRemove: -1.0
CuttingStartPoint: {X: 16.2758, Y: -5.0}
FrontLeft: {X: 2.55494, Y: 8.1973}
StitchingParameters:
  VoxelSize: {X: 4.425, Y: 4.4}
  lensDistort: {rows: 0.0, cols: 0.0}
  affineMat:
  - [0.999848, -0.017452, 0.0]
  - [0.007452, 0.999848, 0.0]
  - [0.0, 0.0, 1.0]
  scannerSettingsIndex: 2.0
NumTiles: {X: 15.0, Y: 21.0}
Tile: {nRows: 266.0, nColumns: 266.0}
TileStepSize: {X: 1.08509, Y: 1.08509}
VoxelSize: {X: 4.386, Y: 4.386, Z: 5.0}
ScannerSettings:
  pixelsPerLine: 266.0
  linesPerFrame: 266.0
  micronsBetweenOpticalPlanes: 5.0
  numOpticalSlices: 8.0
  zoomFactor: 1.0
  objectiveResolution: 46.3
  scannerType: RG
  pixEqLinCheckBox: true
  scanAngleShiftFast: 0.0
  scanAngleShiftSlow: -1.3
  slowMult: 1.0
  fastMult: 1.0
  bidirectionalScan: true
  pixelBinFactor: 50.0
  sampleRate: 1.2E8
  fillFractionSpatial: 0.9
  FOV_alongColsinMicrons: 1166.76
  FOV_alongRowsinMicrons: 1166.76
  micronsPerPixel_cols: 4.386
  micronsPerPixel_rows: 4.386
  framePeriodInSeconds: 0.047
  activeChannels: [2.0, 3.0]
  averageEveryNframes: 4.0
  beamPower: 28.000000000000004
  beamPowerLengthConstant: 120.0
  powerZAdjust: true
  powerZAdjustType: Exponential
  scanMode: resonant
  scannerID: ScanImage via SIBT
  version: ScanImage(R) Basic 2023.1.0 dcf2562453 on MATLAB 9.11.0.2358333 (R2021b) Update 7
SYSTEM:
  ID: neurovision
  xySpeed: 35.0
  cutterSide: 1.0
  defaultFrontLeft: [20.0, 8.0]
  homeZjackOnZeroMove: 1.0
  dominantTilingDirection: y
  defaultSavePath: F:\
  autoROIchannelOrder: [red, green, blue]
  bladeXposAtSlideEnd: 37.0
  slideFrontLeft: [4.0, 10.7]
  raisedZposition: 12.9
  raisedXposition: -1.0
  type: bakingtray
  version: branch=dev  commit=0e61673646906a0c6c2413097f2a994e817c9e40
SLACK: {user: '@neurovision', hook: 'https://hooks.slack.com/services/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'}
SLICER: {approachSpeed: 25.0, vibrateRate: 9.0, postCutDelay: 6.0, postCutVibrate: 6.0,
  defaultYcutPos: -5.0}

autoroi settings

main: {borderPixSize: 4.0, medFiltRawImage: 5.0, doTiledMerge: true, tiledMergeThresh: 1.05,
  defaultThreshSD: 7.0, reCalcThreshSD_threshold: 10.0, rescaleTo: 50.0}
mainBin: {removeNoise: true, medFiltBW: 5.0, primaryShape: disk, primaryFiltSize: 50.0,
  expansionShape: square, doExpansion: true, expansionSize: 600.0}
mainGetBB: {minSizeInSqMicrons: 15000.0}
clipper: {doExtension: true, edgeThreshMicrons: 350.0, growROIbyMicrons: 450.0}
mergeO: {mergeThresh: 1.3}
stackStr: {rollingThreshold: true, nImages: 5.0}
autoThresh: {skipMergeNROIThresh: 10.0, doBinaryExpansion: false, minThreshold: 2.0,
  maxThreshold: 12.0, allowMaxExtensionIfFewThreshLeft: true, decreaseThresholdBy: 0.9}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions