-
Notifications
You must be signed in to change notification settings - Fork 55
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
edits made by Alex #22
Conversation
# Nested grid setup: chip size being ChipSize0X no need to resize, otherwise has to resize the arrays | ||
if self.ChipSize0X != ChipSizeUniX[i]: | ||
Scale = self.ChipSize0X / ChipSizeUniX[i] | ||
if self.ChipSize0X != (ChipSizeUniX[i]*self.GridSize_ChipSize0_Ratio): #ASG |
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.
chipsize0x -> grid_spacing -> from the file (e.g. 120 m)
GridSize_ChipSize0_Ratio -> GridSpacing_ChipSize0_Ratio -> GridSpacing_ChipSize0_oversample_ratio -> define chipsize0 and calculate the ratio
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 the condition check can be the same as before regardless of whhat gridSpacing is. No need to change it. See below please.
OLD:
if self.ChipSize0X != ChipSizeUniX[i]:
Scale = self.ChipSize0X / ChipSizeUniX[i]
NEW (what we discussed yesterday):
if self.GridSpacingX != (ChipSizeUniX[i] * GS_CS_oversample_ratio):
Scale = self.GridSpacingX / (ChipSizeUniX[i] * GS_CS_oversample_ratio)
If you plug in GridSpacing=120
, ChipSize0=240
, ChipSizeUniX=[240, 480]
(GS_CS_oversample_ratio=0.5
), you will find the NEW one is equivalent to the OLD one.
However, the NEW one sometimes causes problems, while the OLD doesn’t. For example, when GridSpacing=480
, ChipSize0=240
, ChipSizeUniX=[240, 480]
(GS_CS_oversample_ratio=1
), the condition will be invalid when ChipSizeUniX[i]=480
, hhowever we do want it to be valid.
For this reason, I think it is conveninent to keep using the OLD condition check.
if type(self.OverSampleRatio) is dict: | ||
overSampleRatio = self.OverSampleRatio[ChipSizeUniX[i]] | ||
overSampleRatio = self.OverSampleRatio[(ChipSizeUniX[i]*self.GridSize_ChipSize0_Ratio)] #ASG ---------------- |
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.
subpixel program oversampleRatio dictionary is not affected
# Below is for replacing the valid estimates with the bicubic filtered values for robust and accurate estimation | ||
if self.ChipSize0X == ChipSizeUniX[i]: | ||
if self.ChipSize0X == (ChipSizeUniX[i]*self.GridSize_ChipSize0_Ratio): #ASG |
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.
refer to above comment on the condition check; should keep the original version
closing this as has been solved by PR #23 |
No description provided.