TUDelftGeodesy / stmtools

Xarray extension for Space-Time Matrix
https://tudelftgeodesy.github.io/stmtools/
Apache License 2.0
7 stars 0 forks source link

34 morton sorting #56

Closed vanlankveldthijs closed 11 months ago

vanlankveldthijs commented 12 months ago

Added functions to STM for creating order attribute per point (implemented as Morton code). Commented these functions. Added several unit tests for these functions.

sonarcloud[bot] commented 12 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

rogerkuou commented 12 months ago

Hi @vanlankveldthijs, thanks a lot for the implement! After investigation, I think the list comprehention of the get order should be fine, since apply_gufunc apply chunk-wisely. Then the list conprehension should be good per chunk.

I did several change:

  1. added pymorton as a dependency
  2. moved the WIP example notebook to experiment
  3. when calling apply_gufunc, I only used .data for coordinate vectores. If not they come as xr.DataArray with redundant coords.
  4. Formatted with ruff

To me it's all good to merge. Would you like to give a final check? Also created an issue #57 for documentation.

rogerkuou commented 11 months ago

Hi @vanlankveldthijs , I will merge this maybe?