sofima icon indicating copy to clipboard operation
sofima copied to clipboard

alignment example notebook fails with TypeError

Open niltonlk opened this issue 10 months ago • 0 comments

The alignment example code fails at the cell starting with

class ReconcileCrossBlockMaps(maps.ReconcileCrossBlockMaps):

giving the following error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[32], line 14
     11     else:
     12       raise ValueError(f'Unknown volume {path}')
---> 14 reconcile = ReconcileCrossBlockMaps(
     15     'xblk', 'xblk_inv', 'last_inv', 'main_inv', {'50': 0, '100': 1, '150': 2, '199': 3}, stride, 0
     16 )
     17 reconcile.set_effective_subvol_and_overlap(map_box.size, (0, 0, 0))
     18 main_box = bounding_box.BoundingBox(start=(0, 0, 0), size=main.shape[1:][::-1])

TypeError: ReconcileCrossBlockMaps.__init__() takes from 2 to 3 positional arguments but 8 were given

I suspect that line 15 should be written

    maps.ReconcileCrossBlockMaps.Config('xblk', 'xblk_inv', 'last_inv', 'main_inv', {'50': 0, '100': 1, '150': 2, '199': 3}, stride, 0)

Is this fix correct? At least the cross section looks correct.

niltonlk avatar Apr 04 '25 12:04 niltonlk