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

Improve/bands definition #54

Merged
merged 22 commits into from
Jul 26, 2024
Merged

Improve/bands definition #54

merged 22 commits into from
Jul 26, 2024

Conversation

Joao-L-S-Almeida
Copy link
Member

@Joao-L-S-Almeida Joao-L-S-Almeida commented Jul 19, 2024

It adds support to a easier way to define the dataset and output bands when there are many variables.
Now the bands can be defined by intervals:

output_bands:
 -  [0,10]

Or subintervals:

output_bands:
 - [0,5]
 - [5,10]
 

See tests/manufactured-finetune_prithvi_swin_B_band_interval.yaml for more details.

Furthermore, the bands also can be defined via strings, as:

dataset_bands:
 -  "band_0"
 -  "band_1"
 -  "band_2"
 -  "band_3"
 
 output_bands:
 - "band_1"
 - "band_2"

@Joao-L-S-Almeida Joao-L-S-Almeida self-assigned this Jul 19, 2024
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
@Joao-L-S-Almeida Joao-L-S-Almeida added the enhancement New feature or request label Jul 19, 2024
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Copy link
Contributor

@CarlosGomes98 CarlosGomes98 left a comment

Choose a reason for hiding this comment

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

Just some initial comments, have not been able to finish the review yet

@CarlosGomes98
Copy link
Contributor

@Joao-L-S-Almeida I like the idea of the ranges! However, in this idea, I am wondering if it makes sense to still retain dataset_bands.

Maybe what makes most sense is to give users two options:

  1. Use dataset_bands to name your bands using strings or HLSBands (or ints?) and then output_bands will match those.
  2. Use only output_bands without naming the bands with dataset_bands, in which case we can then accept ints or ranges as a tuple of two ints.

What caught my attention was that, when using ranges, having to specify that same range in dataset_bands is sort of pointless

What do you think?

@CarlosGomes98
Copy link
Contributor

Also, lets make sure to add documentation for this new feature! (extending the docstrings is probably enough)

Joao-L-S-Almeida and others added 8 commits July 23, 2024 10:12
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
@CarlosGomes98 CarlosGomes98 force-pushed the improve/bands_definition branch from 4eee3c9 to 3faf7d3 Compare July 26, 2024 10:18
Signed-off-by: Carlos Gomes <[email protected]>
@CarlosGomes98 CarlosGomes98 force-pushed the improve/bands_definition branch from fee7129 to 1a254e4 Compare July 26, 2024 15:58
@Joao-L-S-Almeida Joao-L-S-Almeida merged commit da480f0 into main Jul 26, 2024
3 checks passed
@CarlosGomes98 CarlosGomes98 deleted the improve/bands_definition branch October 2, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants