Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 3D Volume regridding #946

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Implement 3D Volume regridding #946

wants to merge 2 commits into from

Conversation

philippjfr
Copy link
Member

Implements basic 3D volume regridding only supporting mean downsampling and nearest upsampling for now.

  • Double check array orientations
  • Add tests
  • Add docs

Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

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

Very cool, thanks!


Missing values (those having the value indicated by the
"nodata" attribute of the raster) are replaced with `NaN` if
floats, and 0 if int.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
floats, and 0 if int.
floats, and 0 if int. Thus if 0 is not a suitable missing-value indicator,
for your integer data, convert it to a float type before calling this method.

Comment on lines +1165 to +1167
nan_value : int or float, optional
Optional nan_value which will be masked out when applying
the resampling.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
nan_value : int or float, optional
Optional nan_value which will be masked out when applying
the resampling.
nan_value : int or float, optional
Optional nan_value that will be masked out when applying
the resampling.

How does this interact with the "nodata" attribute of the raster? Does it override it? Should clarify that here.

Accepts an executable function, function object, or string name.
interpolate : str, optional default=linear
Resampling mode when upsampling raster.
options include: nearest, linear.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
options include: nearest, linear.
Options include: nearest, linear.

@jbednar
Copy link
Member

jbednar commented Nov 11, 2020

@philippjfr , can you compare your approach here with #927 and see if there is anything you need to take from here? I haven't tried to see how the two binning approaches differ or are similar.

@philippjfr
Copy link
Member Author

Having trouble seeing how they relate to each other. Isn't #927 going from points -> grids and this is going from grids -> grids?

@jbednar
Copy link
Member

jbednar commented Nov 11, 2020

Right you are; this is 3D volume re-gridding, and the other is 3D volume gridding. So, the actual task is the other way around -- please check if anything from #927 is relevant to this one. Thanks!

@maximlt
Copy link
Member

maximlt commented Nov 29, 2021

@philippjfr any update with this? Can we move forward?

@maximlt maximlt added this to the v0.13.1 milestone Nov 29, 2021
@ianthomas23 ianthomas23 self-assigned this Jul 18, 2022
@ianthomas23 ianthomas23 modified the milestones: v0.14.2, v0.14.3 Aug 10, 2022
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.

4 participants