Skip to content

Cleanup#49

Merged
SmithB merged 31 commits into
mainfrom
cleanup
Jul 17, 2026
Merged

Cleanup#49
SmithB merged 31 commits into
mainfrom
cleanup

Conversation

@SmithB

@SmithB SmithB commented Jul 17, 2026

Copy link
Copy Markdown
Owner

The commits in the cleanup branch clean up several inconsistencies in the code and streamline some of the syntax. Breakages that result should be relatively minor.

Ben Smith and others added 30 commits April 22, 2026 16:10
…any field fails, fix inverse=True flag on legacy crs
… and 'y' to be used in spatially aware methods
…tes from input files, provide coordinate info on output
…rite to 'x' and 'y' fields unless told otherwise, make ATL06.data coordinates default to 'longitude','latitude'
…bounds

grid.data.crop crashed when XR was None but TR was supplied (e.g.
mosaic.crop(None, None, TR=...)), since the packing logic called len()
on XR unconditionally. Guard the packed-bounds detection on XR being
non-None, and give XR a default of None so TR-only kwarg calls work.

Extend pointCollection.data.crop/cropped to accept the same two calling
conventions as grid.data: bounds packed into a single argument (e.g.
crop([XR, YR])) or passed as separate per-dimension arguments (e.g.
crop(XR, YR)). This also generalizes cropping to all of self.coordinates
instead of only the first two, and allows omitting or passing None for
a dimension to leave it uncropped.
- query_latlon: fix attribs->attrs typo and pass xb,yb as a single
  [x,y] list to query_xy (its actual signature), instead of two
  positional args where yb was silently landing in the cleanup param
- bin_latlon: bins_as_array() returns a 2-tuple of 1-D arrays, not a
  2-D ndarray, so index it as xy_bin[0]/xy_bin[1] instead of
  xy_bin[:,0]/xy_bin[:,1]

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Lets from_list mosaic only specific bands (e.g. time slices) from each
input file or in-memory grid/mosaic object instead of always reading
all bands. Threads a bands= kwarg through setup_bounds_from_list,
setup_fields, add, and replace, reusing the bands kwarg already
supported by grid.data's readers (from_h5/from_nc/from_gdal/from_file)
for file inputs, and the existing item[:,:,bands] slicing mechanism for
in-memory objects. Works across all three mosaicking strategies
(by_band weighted, non-by-band weighted, and unweighted replace).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dataPicker was never exported from the package (its import in
__init__.py was already commented out) and has a known bug where
__init_ui__ is missing self. Move it to pointCollection/old/ to mark
it deprecated, and drop the dead commented-out import line.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@SmithB
SmithB merged commit ed9de0b into main Jul 17, 2026
0 of 2 checks passed
@SmithB
SmithB deleted the cleanup branch July 17, 2026 21:48
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