Skip to content

add tropoTotal#337

Merged
sssangha merged 8 commits intoaria-tools:sss_raidersupfrom
mgovorcin:sss_raidersup
Jan 24, 2023
Merged

add tropoTotal#337
sssangha merged 8 commits intoaria-tools:sss_raidersupfrom
mgovorcin:sss_raidersup

Conversation

@mgovorcin
Copy link
Collaborator

add function to create troposphereTotal on the fly using gdal PixelFunction

did little clean up, please feel free to reject suggestions


def __init__(self, filearg, bbox=None, workdir='./', num_threads=1,
url_version='None', nc_version='None', verbose=False):
url_version='None', nc_version='1c', verbose=False):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nc_version was giving me error so I set it to be the latest initially

@sssangha
Copy link
Collaborator

@mgovorcin this PR looks solid, thanks for the integration of the discussed features and clean-up! I was able to get it working on my end with some minor fixes.

I have a few of broader notes:
I removed the function where you computed the total tropo within tsSetup,py, as this is handled in extractProduct.py, and without forcing the user to extract the dry and wet components when they don't want to.

To extract the total tropo by default though (i.e. without the user having to specify it as an argument), I reintroduced the layerCheck function and made some adjustments to the logic. This is intended to check whether or not the tropo layers exist in all standard products in the first place before proceeding.

Hence because of this, I made some changes to the way the default layers are managed and extracted.

# e.g. [unwrappedPhase, unwrapPhase, unwrap]
# NOTE is it necessary to have the option for different names
# as they are hardcoreded, maybe because of different nc version, double-check?
_find_match = lambda x: re.findall('[A-Z][^A-Z]*', x)[0] \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This could be moved to a separate script that check the nc version, input files, find stored layers in the container and output the layers names for futher processing. Maybe for a next update :D

Copy link
Collaborator Author

@mgovorcin mgovorcin left a comment

Choose a reason for hiding this comment

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

@sssangha looks good! Added two comments for a next update

if re.search('tropo', x) \
else re.findall('[a-z][^A-Z]*', x)[0]

# Special case - gacos correction files
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do not know Sim is it better to move older version of code for correcting unwrapped Phase with total tropo delay from GACOS to separate script:

  1. ingest GACOS products, and prepare tropoTotal vrt files (in a similar manner like ariaExtract.py)
  2. use tsSetup.py to prepare tropoTotal stack vrt
  3. have optional script to treat unwrappedPhase files with GACOS/other model tropoTotal files

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is simplify both ariaExtract and tsSetup scripts,

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mgovorcin I understood that the intention was though to no longer directly correct the phase through ARIA-tools. I.e. once I merge these changes, we should work to now push corrections to a separate cube which we then interface with MintPy to use instead to correct the phase on their end.

@sssangha sssangha merged commit e4c1ea3 into aria-tools:sss_raidersup Jan 24, 2023
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.

2 participants