incorrect sort order when using multi-page plotw_rs
@aakash10gupta pointed out that using plotw_rs with option max_traces_per_rs, which splits a record section over multiple pages, sorts incorrectly over the pages. That is, if sorted by distance, each individual page is sorted correctly, but when viewed all together the sorting runs in the opposite direction.
@bch0w,
While the above fix resolved issues with some sorting options, there are still some similar issues with some of the other sorting options. I have tried tabulating these pending 'sorting' issues, which are kind of related but not necessarily related to 'multi-page' plotw_rs below -
| 'sort_by' | trace ordering | multi-page plot ordering | labels |
|---|---|---|---|
| distance | ok | ok | ok |
| abs_distance | reversed | reversed | inside the plot |
| azimuth | ok | ok | ok |
| abs_azimuth | reversed | reversed | inside the plot |
| distance_r | ok | ok | ok |
| abs_distance_r | reversed | reversed | inside the plot |
| azimuth_r | ok | ok | ok |
| abs_azimuth_r | reversed | reversed | inside the plot |
I am also attaching a quick python script pysep_test.txt to run all the above tabulated cases at once. The notebook runs in the latest pysep@devel [41c2d47] environment.
I am also listing some additional checks that would be needed once this is resolved -
- consistency in the spacing of traces sorted by absolute values of both distance as well as azimuth, over multi-page figures
- non-redundancy in the placement of red horizontal lines in azimuthally sorted plots at multiples of 45 degrees, over multi-page figures
- correctness of plots when using
start_azimuth_deg = 30i.e. something non-zero as a plotw_rs input
Thanks for compiling this table and providing the example script @aakash10gupta, very helpful for quickly fixing things.
A question for you re. 'inside the plot' y labels: since we can only have one set of labels for the y-axis, it was either show the distances or trace labels there. My solution was to place the text labels inside the plot so we can see the distances on the y-axis. How does the old version of the code handle this? I suppose we could do the same thing as the azimuth bins and place red lines to mark distances, or not have them at all. (fyi, there is a parameter y_label_loc that allows you to force those labels to different locations, but that doesnt seem to be working properly either)
To summarize fixes in the next PR:
- [x] reverse sort order for
abs_distanceandabs_distance_r - [x] reverse sort order for
abs_azimuthandabs_azimuth_r - [x] bugfix: y-label locations for absolute sorting not showing properly
- [x] fix multi-page sort order for
abs_distanceandabs_distance_rrecord sections - [ ] maintain consistent trace spacing for multi-page
abs_*sorting - [x] fix multi-page sort order for
abs_azimuthandabs_azimuth_rrecord sections - [x] ensure unique azimuthal lines for multi-page
abs_azimuthandabs_azimuth_r - [ ] bugfix: nonzero azimuth starting point for multi-page record sections
How about this?
For absolute azimuth, we remove the azimuth from the label and place the label on the left or right, not on top of the seismograms. Previously it was on the right, as shown in this example:
For absolute distance, we remove the distance from the label and do the same.
How about this? For absolute azimuth, we remove the azimuth from the label and place the label on the left or right, not on top of the seismograms. Previously it was on the right, as shown in this example:
For absolute distance, we remove the distance from the label and do the same.
Thanks @carltape , that looks good, I'll make the default behavior when plotting on absolute bounds to place the text labels to the right side of the figure
The tests above were based on only 8 of the total choices for the plotting option sort_by. Extending the tests to the sort_by options abs_backazimuth and abs_backazimuth_r seems to break the script.
The tests above were based on only 8 of the total choices for the plotting option
sort_by. Extending the tests to thesort_byoptionsabs_backazimuthandabs_backazimuth_rseems to break the script.
This is addressed in #100
sort_by options abs_backazimuth and abs_backazimuth_r seem to be working now. Thanks.
Something that has come up during discussions is that for absolute azimuth sorting cases, since we have the absolute azimuths marked along the y-axis we can get done with the horizontal red lines demarcating specific azimuth intervals. This might also help tackle some of the pending issues in this thread.
Yes, I second the vote to remove the horizontal red lines for plotting by absolute azimuth, since this information is already visible (in the text labels and in the y-axis).
Just tested the sorting by absolute (back)azimuth with the update. The horizontal red lines no longer show up for these cases.