Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 'day_night' flag to DayNightCompositor for day-only or night-only results #1816
Add 'day_night' flag to DayNightCompositor for day-only or night-only results #1816
Changes from 1 commit
9cce883
4a75db1
b3b7b35
2ceb218
80ed09a
630baaf
b294981
baf8501
6bcf7eb
82b84a6
a700799
9bf4207
ca5c3e9
f5c873b
73c2cdc
142e4a5
8d58657
926389e
70f43ee
360d876
0f23b88
1b14f7f
a571014
4c00823
5c265b2
4f32c4c
8cdc9fa
cd55547
8d8377a
af2c6ee
787a6a9
0a75d4a
b59557f
9922f23
872d95a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What do you think about
day_night
for the keyword argument (otherwise is should bechoose_
notchose_
)?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.
Sorry for the spell...
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.
Is there a more descriptive name for this? I suppose "foreground" isn't really correct here.
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.
I think you are right. Whatever you choose, you need a 'foreground' image at least. So 'foreground' and 'background' are more suitable.
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.
Github won't let me comment on it, but the
coszen =
line above usesprojectables[2]
which may or may not exist depending on the day/night mode.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.
This
projectables[2]
remains in the original one. I actually don't know what it's for...May be it's waiting for a solar zenith angle band/dataset from the satellite data?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.
🤦 Oh duh. That is if the YAML file specifies the solar_zenith_angle dataset from the reader (ex. for
viirs_sdr
). Geostationary satellites don't typically have that provided by the file/reader so it isn't specified. You may want this to beprojectables[2 if self.day_night == "day_night" else 1]
.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.
😊OK It's late night here so I'll do these changes tomorrow.
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.
Can the day/night only modes be combined with if statements for the things that are different? You could also ignore the
0
parameters in the logic so that extra computation isn't done when it isn't needed. Oh you might be able to combine all three day/night modes...You'd need some more logic for handling the
add_bands
andzero_missing_data
stuff, but it may actually make the code a lot smaller. Maybe not clearer though... 😨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.
Yeah I also think there's something need to be improved in the logic structure. I'll go look into this.