prep_hyp3: ignore whitespace in keys#690
Conversation
|
Thank you for the update @forrestfwilliams. The subtle change of adding/removing whitespace in the upstream (HyP3) can be error-prone to the downstream code (MintPy). How about we ignore the whitespace in all keys while reading the HyP3 metadata file, by adding Line 115 in fe32d26 If so, a few other places in prep_hyp3.py need to remove the whitespace as well. |
|
Yeah @yunjunz I think that would be an improvement. I'll go ahead and make the changes. |
|
Sorry -- this one is my bad (I reviewed the HyP3 PR that made the change). Eventually we'd like to do something a bit better with an included metadata file, but for now, stripping whitespace is probably a good solution. We don't have plans in the near future to modify this file, or the keys in it however. |
There was a problem hiding this comment.
Thank you @forrestfwilliams for the update. It looks all good to me. Please feel free to go ahead and merge the PR.
In the metadata file provided with HyP3 InSAR products, the syntax of the UTC time key has changed form
UTCtimetoUTC timeand the prep_hyp3 scripts needs to be updated to reflect this.A try except statement was added that first tries to index on
UTC time, then indexes onUTCtimeif this produces aKey Error. This ensures backward compatibility with old products.