Skip to content

mosaic: don't share the default spacing list between mosaics - #58

Merged
SmithB merged 2 commits into
mainfrom
fix_mosaic_spacing
Sep 28, 2026
Merged

SmithB merged 2 commits into
mainfrom
fix_mosaic_spacing

Conversation

@SmithB

@SmithB SmithB commented Sep 28, 2026

Copy link
Copy Markdown
Owner

mosaic.init used a mutable default (spacing=[None,None]), and update_spacing() modified that list in place through the spacing property. The first mosaic built in a process therefore set the spacing for every later mosaic created without an explicit spacing, so a coarse-resolution mosaic built after a fine one was gridded at the fine spacing (mostly empty/NaN). Default to None and copy the spacing argument into a new list.

Also fix update_spacing() computing dy from x instead of y.

Ben Smith and others added 2 commits September 28, 2026 09:32
mosaic.__init__ used a mutable default (spacing=[None,None]), and
update_spacing() modified that list in place through the spacing
property.  The first mosaic built in a process therefore set the
spacing for every later mosaic created without an explicit spacing,
so a coarse-resolution mosaic built after a fine one was gridded at
the fine spacing (mostly empty/NaN).  Default to None and copy the
spacing argument into a new list.

Also fix update_spacing() computing dy from x instead of y.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SmithB
SmithB merged commit d36570b into main Sep 28, 2026
2 checks passed
@SmithB
SmithB deleted the fix_mosaic_spacing branch September 28, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant