Skip to content

Feat/rust stac catalogue#76

Open
mathleur wants to merge 81 commits into
mainfrom
feat/rust_stac_catalogue
Open

Feat/rust stac catalogue#76
mathleur wants to merge 81 commits into
mainfrom
feat/rust_stac_catalogue

Conversation

@mathleur

Copy link
Copy Markdown
Member

Description

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

@jameshawkes jameshawkes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed, revert select changes and implement drop() and squeeze()

Creates a qube with the same dimensions, but with only the selected coordinates

q = qubed.select({"class": "od", "expver": "0001/0002/0003"})

class = od
expver = 0001/0002
param = a/b/c
levelist = 1000

Removes dimensions that only have one value

q2 = q.squeeze()
param = a/b/c

squeeze():
for key in self.dims:
if len(self[key]) == 1:
self.drop(key)

Removes dimensions from the qube

q3 = q.drop("class", "expver")
param = a/b/c
levelist = 1000

filter = {"class": "od", "expver": "0001/0002/0003"}
q = qubed.select(filter)

to show what's been selected

treeview = copy(q)
for key in treeview.dims:
if key not in filter.keys():
treeview.drop(key)

for key in filter.keys():
print("{} = {}".format(key, q[key]))

q = q.drop(filter.keys())

Base automatically changed from feat/fix_fdb_reader to feature/rust March 17, 2026 12:40
Base automatically changed from feature/rust to main June 17, 2026 09:50
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.

3 participants