Inquiry on select_spatial_slice

#4
by tae-kwon - opened

Hi @peterdudfield
I hope this message finds you well

As I was reviewing the paper, I came across something I wanted to clarify regarding the 12 x 12 pixel slicing for NWP. When selecting one region of interest (ROI) as the central position, moving 6 pixels up and 6 pixels down would actually result in a 13 x 13 pixel area, not 12 x 12 pixels. Could you please explain how the 12 x 12 pixel dimension was determined in this context?

image.png

https://github.com/openclimatefix/ocf_datapipes/blob/9ec252eeee44937c12ab52699579bdcace76e72f/ocf_datapipes/select/select_spatial_slice.py#L284

Open Climate Fix org

Hey

We then use this idx to select the data like this

xr_data = xr_data.isel({xr_x_dim: slice(left_idx, right_idx)})

I think this means that ;eft_idx is include, but right_idx is not. This is similar to range(0,12), not include 12.

https://github.com/openclimatefix/ocf_datapipes/blob/9ec252eeee44937c12ab52699579bdcace76e72f/ocf_datapipes/select/select_spatial_slice.py#L239

Hope this helps

@peterdudfield
That was just amazing. Thank you very much for your precious time!

Sign up or log in to comment