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

edits made by Alex #22

Closed
wants to merge 1 commit into from
Closed

edits made by Alex #22

wants to merge 1 commit into from

Conversation

leiyangleon
Copy link
Collaborator

No description provided.

# 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
Copy link
Collaborator Author

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

Copy link
Collaborator Author

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 ----------------
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@leiyangleon
Copy link
Collaborator Author

closing this as has been solved by PR #23

@leiyangleon leiyangleon closed this Apr 2, 2021
@jhkennedy jhkennedy deleted the ASG_edits branch September 28, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant