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

Translation: clarification of "levels" or "bands" #129

Open
dhavide opened this issue Dec 3, 2024 · 1 comment
Open

Translation: clarification of "levels" or "bands" #129

dhavide opened this issue Dec 3, 2024 · 1 comment
Assignees

Comments

@dhavide
Copy link
Contributor

dhavide commented Dec 3, 2024

In Crowdin, @marielaraj posed the question:

@dhavide What do you refer with levels?

When I use the English words "band" or "level", I'm using these terms as they are used in the OPERA DSWx HLS product specification. More commonly, in the English signal/image processing literature, the English words "band" or "level" or "channel" refer to a single two-dimensional slice from a three-dimensional array (occasionally, bands/levels may be sliced from a higher-dimensional array).

For instance, an RGB image may be stored as an array X of 8-bit unsigned integers with shape (3,128, 128). The three levels/bands/channels (using NumPy syntax) would be X[0,:,:], X[1,:,:], & X[2,:,:], each of which is a two-dimensional array. These 2D array slices of shape (128,128) would be referred to as the Red channel, the Green channel, and the Blue channel respectively (we could use the words "band" or "level" instead of "channel", but "channel" is the terminology you'll see most often used in the image-processing literature in this particular context).

For raster data, the grid of pixel values arranged in a two-dimensional array are associated with spatial coordinates. You can then think of each level/band as a single scalar field associated with that grid. So, if you had, say variables like pressure, temperature, and velocity associated with a two-dimensional spatial grid of shape (3660,3660), you could store a three-dimensional array of shape (4,3660, 3660) where the 4 bands/levels correspond to pressure, temperature, v_x and v_y (the x- and y-components of the velocity field). Each band, then will be stored as a matrix of numbers with matrix entries being the values of a scalar field associated with that point.

For our GeoTIFF files in the DSWx product, there are generally 10 bands for a given geographical region (as described in the documentation). We could, in principle, store all the bands/levels in a three-dimensional array of shape (10,3660,3660) and store that large three-dimensional array in a single TIFF file. However, it makes more sense to create 10 separate TIFF files, each of which stores a single array of shape (1,3660,3660) (or, equivalently, of shape (3660,3660)). This is part of the idea of "Cloud-Optimized GeoTIFFs" (COGs) in that the 10 DSWx bands associated with a given geographic MGRS tile are stored in distinct files (so that they can be downloaded independently).

Anyway, @marielaraj, please close this issue if this answers your question adequately.

@dhavide
Copy link
Contributor Author

dhavide commented Dec 3, 2024

@marielaraj, as a short follow-up, I found this description of the bands from Landsat satelite observations. Reading this, I infer that the reason they use the term "bands" to refer to different 2D arrays sliced in a 3D dataset is that these slices correspond to measurements of distinct portions of the electromagnetic spectrum (as summarized in various tables on that site). My guess is that the sensors take measurements filtering photons between specific wavelengths and that "band" of measurements constitutes a single slice of a 3D array being built up.

Anyway, this is my even longer, drawn-out answer to your straightforward question because it made me wonder where that terminology came from.

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

No branches or pull requests

2 participants