Skip to content

Conversation

@PaulWessel
Copy link
Member

@PaulWessel PaulWessel commented Sep 7, 2021

This PR further improves greenspline and gpsgridder via common constants and settings and options. New here is

  1. Introduction of three directives to -C: n, r, c. We had n (control number of eigenvalues [all]) from before and r was default (limit based on ratio of eigenvalue to largest, but no r was allowed [0]). This PR also adds v which limits eigenvalues based on the desired model variance fraction [1]. Both n and v can take trailing % for percent instead of values.
  2. Enhanced -E so that when -C +i and/or +c are used we write a history misfit file with summaries of rms misfit for each eigenvalue solution (and add chi2 sums if -W is used). For gpsgridder we also do this as total and east and north components separately.
  3. Demonstration of the revised code is done via updated animation 05 (greenspline) and new animation 15 (gpsgridder). Working on these lead to other bug fixes (e.g., Reset PSL internals at end of building each completion procedure #5732).
  4. Documentation has been updated accordingly and have new sections on explaining the selection of eigenvalues and refer to the animations [links will need to be added and updated later]. I also added the basic solution equations (Green's functions and solution) to gpsgridder as we already do in greenspline.

Both animations show the cumulative and incremental solution as more eigenvalues are added to the solution. The purpose of both is to illustrate how selecting the number of eigenvalues is crucial for the final result and you are making trade-offs between misfit and undesirable short-wavelength noise. The anim05 example grids a ship-track data set whose points are shown on earth_relief_01m on the left panel, with the gridded solution on the right panel, and incremental additions in the center panel. The rms misfit in meters are shown on the right. Here is just a short snippet of the full movie (~2000 frames):

anim05_short.mp4

The anim15 animation derives from test gpsgridder1.sh but has been converted to a movie example. It shows the GPS data and model prediction on the left panel and the incremental vector components (x10 so we can see them) on the right. Above the panels is the history of the rms for the combined (c) as well as for east (u) and north (v) components. Again, this is just a short snippet of the full movie but you get the idea.

gps2.mp4

All tests pass as before. Note: For no eigenvalues we only see the least-squares trend solution upon which the Green's function adds deviations.

@PaulWessel PaulWessel added documentation Improve documentation enhancement Improving an existing feature maintenance Boring but important stuff for the core devs labels Sep 7, 2021
@PaulWessel PaulWessel self-assigned this Sep 7, 2021
@maxrjones maxrjones added the add-changelog Add PR to the changelog label Sep 7, 2021
@PaulWessel PaulWessel requested a review from joa-quim September 7, 2021 21:13
@maxrjones
Copy link
Member

Some comments about the new animation 5:

  1. The current animation is actually quite nice in my opinion, since it is so simple. Though, I think it would be better as a mp4 rather than gif. Would you be open to keeping the old example in addition to the new example (both could be included as part of animation 5)?
  2. I think it would look better to have the earth_relief on the left, gridded result in the center, and incremental changes on the right.
  3. The colorbar should be at the top or to the side, so that it can be viewed while the playback GUI is up on youtube.
  4. What is the motivation for having the colorbar range for the incremental values from -100 to 100? It seems that many values are cut off by this range.
  5. The gridded data should have a colorbar as well.
  6. I find it difficult to get any value from the center panel at the current video speed. Could you slow the animation down?
  7. Would it be possible to color the data points by their z-values?

@PaulWessel
Copy link
Member Author

Some comments about the new animation 5:

  1. The current animation is actually quite nice in my opinion, since it is so simple. Though, I think it would be better as a mp4 rather than gif. Would you be open to keeping the old example in addition to the new example (both could be included as part of animation 5)? Even if we fixed the layout to HD, how would you include it as part of the same animation?

Hm, not sure. The whole point of this exercise was to beef up the animations to HD and MP4. The format for the old anim05 is not HD given its region etc.

  1. I think it would look better to have the earth_relief on the left, gridded result in the center, and incremental changes on the right.

That I can do.

  1. The colorbar should be at the top or to the side, so that it can be viewed while the playback GUI is up on youtube.

You mean inside, like now, but at top or left/right? There is no outside here.

  1. What is the motivation for having the colorbar range for the incremental values from -100 to 100? It seems that many values are cut off by this range.

Magnitudes drop off with eigenvalues. We either have to show some normalized plot which does not tell you much about how large the contribution is, or use a variable CPT taht decays over time to lower magnitues, or we pick something like what I have which forces the first few frames to clip but it sort of works for the rest.

  1. The gridded data should have a colorbar as well.

Yes, was lazy.

  1. I find it difficult to get any value from the center panel at the current video speed. Could you slow the animation down?

I could but would not people just pause and advance one frame etc? Or perhaps not possible in YouTube viewer?

  1. Would it be possible to color the data points by their z-values?

Yes, for which panel? I could color the ones in the left panel with the actual predicted values (so slowly should converge on the background color?

@PaulWessel
Copy link
Member Author

I have updated anim05 as suggested and both animations are now up on YouTube and the GMT docs has been updated with the URLs.:

anim05
anim15

Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
@PaulWessel PaulWessel merged commit 06f31cd into master Sep 10, 2021
@PaulWessel PaulWessel deleted the svd-misfit-history branch September 10, 2021 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog documentation Improve documentation enhancement Improving an existing feature maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants