-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add in a lookuptable thumbnail function #105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like an improvement to me, pushing more code in here from datacube-alchemist
.
My only concern, and not a blocker, is that this doesn't go far enough. It's still too method call driven which means extra logic in the client. Maybe we should add parameters to DatasetAssembler.write_thumbnail()
and it gets to decide on the method to use to generate the thumbnail...
What do you think, @jeremyh? Want me to weave the two functions into a single meta function with two code paths? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. It's different enough of a situation that I don't mind a second function for convenience. Though I like where Damien's coming from.
If combining them means making all the current red/green/blue args optional on the existing function I'd probably prefer not to combine, as their arguments are too different and we'll have a confusing set of completely-mutually-exclusive optional/required parameter combinations on the one function.
Perhaps also add a line to one of our minimal tests to run the function, eg:
p.write_thumbnail_singleband('blue', None, bit=1)
(I also ran it at first without any bit
argument and got a cryptic error message -- we're never checking the bit is None and lookup_table is None
case in our old method parameter checking)
Bike shedding... should it be |
I think singleband is a single word... keeping it as it is ;-) |
Install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Add in a way to call the existing function for a singleband lookuptable from the dataset assembler class.