Open
Conversation
When plotting GPS stations and specifying a specific GPS reference station, it would be convenient if an additional CSV file (e.g. reref_gps_X.csv) would be created which tracks the rereferenced velocity values and accounts for any potential unit factor changes. This would make it easier to make separate, supplemental plots independent of MintPy. For example, in this case, station 70DM is the reference station and I wish to convert the velocities to cm/yr: (mintpy) [ssangha@leffe reref]$ more gps_enu2los.csv Site,Lon,Lat,Displacement,Velocity 7ODM,-117.09358508816442,34.11640732493536,-0.13098726,-0.010960488 BBRY,-116.88515702033878,34.26427837432715,-0.04806125,-0.0043038945 P613,-117.04706501804391,34.19618514313232,-0.05000028,-0.0059998427 (mintpy) [ssangha@leffe reref]$ (mintpy) [ssangha@leffe reref]$ more reref_gps_enu2los.csv Site,Lon,Lat,Displacement,Velocity 7ODM,-117.09358508816442,34.11640732493536,0.0,0.0 BBRY,-116.88515702033878,34.26427837432715,0.08292601,0.66565935 P613,-117.04706501804391,34.19618514313232,0.08098697999999999,0.49606452999999995
Contributor
Author
|
Note, this is honestly a quick and dirty hack to get the file I'd want, so I understand if some cleanup/reorganization may be in order to appropriately accommodate this. |
Before the updated CSV file was only generated if a reference GPS station were specified. Now, this file is generated and captures at least the unit factor conversion regardless of the specification of a reference GPS station.
Member
|
To achieve your purpose, it seems that we could merge your modification into a new sub-function within def save_ref_gps_los_obs(csv_file, ref_gps_site, unit_fac):
...
return ref_csv_fileand call it at site_obs, csv_file = gps.get_gps_los_obs(
meta=metadata,
obs_type=obs_type,
site_names=site_names,
start_date=start_date,
end_date=end_date,
gps_comp=inps.gps_component,
horz_az_angle=inps.horz_az_angle,
print_msg=print_msg,
redo=inps.gps_redo,
)
...
save_ref_gps_los_obs(csv_file, ref_gps_site, unit_fac)This will be a much cleaner and more independent solution. Could you do that? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of proposed changes
When plotting GPS stations and specifying a specific GPS reference station, it would be convenient if an additional CSV file (e.g. reref_gps_X.csv) would be created which tracks the rereferenced velocity values and accounts for any potential unit factor changes. This would make it easier to make separate, supplemental plots independent of MintPy.
For example, in this case, station 70DM is the reference station and I wish to convert the velocities to cm/yr: (mintpy)
Reminders