Conversation
Codecov Report
@@ Coverage Diff @@
## 4.x #889 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 158 159 +1
Lines 6697 6725 +28
=========================================
+ Hits 6697 6725 +28
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
This might be somewhat nit-picky, but I think that the parameters should be in the reverse order to match the style of other pcv writing functions that generally have the img data first, followed by the filename. |
|
|
||
| # Read written hyperspectral image | ||
| array_data = read_data(filename=filename) | ||
| assert np.shape(array_data.array_data) == (lines, samples, bands) |
There was a problem hiding this comment.
Would going beyond checking if the dimensions are the same to see if some of the values are the same be helpful? Or is just checking that they're the same shape usually sufficient
There was a problem hiding this comment.
That is a good question. We could check some values or also verify that it's the exact array. I think it depends on what can go wrong. Since the array is vectorized and written as a binary array, in order to have the correct dimensions the data type and the interleave format should be correct.
There was a problem hiding this comment.
Ok cool, would just a simple assert np.array_equal(array_data.array_data, rand_spectral_array) be good or do you think that would take up more time than it's worth?
There was a problem hiding this comment.
I think both ways are good options
|
|
||
| # Read written hyperspectral image | ||
| array_data = read_data(filename=filename) | ||
| assert np.shape(array_data.array_data) == (lines, samples, bands) |
There was a problem hiding this comment.
Would going beyond checking if the dimensions are the same to see if some of the values are the same be helpful? Or is just checking that they're the same shape usually sufficient
|
|
||
| # Read written hyperspectral image | ||
| array_data = read_data(filename=filename) | ||
| assert np.shape(array_data.array_data) == (lines, samples, bands) |
There was a problem hiding this comment.
Ok cool, would just a simple assert np.array_equal(array_data.array_data, rand_spectral_array) be good or do you think that would take up more time than it's worth?
Describe your changes
Add the functionality to write ENVI-format hyperspectral images.
Type of update
Is this a:
Associated issues
Additional context