New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipmag.vgpmag_magic erases 'normal' poles if there are reverse ones #649
Comments
It looks like the code is first plotting the normal:
and then plotting the reversed:
What might be happening is that the land and ocean in the second |
yeah but the flag ‘pltgrid’ in Opts is turned off, so it isn’t supposed to do that. I tried a bunch of things and couldn’t get it to work….
lisa
… On Apr 13, 2022, at 2:07 PM, Nick Swanson-Hysell ***@***.***> wrote:
It looks like the code is first plotting the normal:
if len(lats) > 0:
# add the lats and lons of the poles
pmagplotlib.plot_map(FIG['map'], lats, lons, Opts)
and then plotting the reversed:
if len(rlats) > 0:
Opts['sym'] = rsym
Opts['symsize'] = rsize
# add the lats and lons of the poles
pmagplotlib.plot_map(FIG['map'], rlats, rlons, Opts)
What might be happening is that the land and ocean in the second pmagplotlib.plot_map() is covering up the first set of points.
—
Reply to this email directly, view it on GitHub <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_PmagPy_PmagPy_issues_649-23issuecomment-2D1098488155&d=DwMCaQ&c=-35OiAkTchMrZOngvJPOeA&r=HLmFoB00cDyPMQ7s6Fl35Q&m=YdK6F0MjPiTwHkeOagnlXs_8odwLk_4TIhDaYRAT6oATfT9R-gwwfaQCeMD83Pe7&s=trk8Koexbsga_k8ypR-gfDTYYjmAHus-4x2saelRbb4&e=>, or unsubscribe <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AABKWDJBV6YJJPWHJACYIU3VE4ZQ7ANCNFSM5TL2D6EA&d=DwMCaQ&c=-35OiAkTchMrZOngvJPOeA&r=HLmFoB00cDyPMQ7s6Fl35Q&m=YdK6F0MjPiTwHkeOagnlXs_8odwLk_4TIhDaYRAT6oATfT9R-gwwfaQCeMD83Pe7&s=9fBa9bVAP8HAfAZjNb4lUKIvTG8VIvujmAVTJRBEu7Q&e=>.
You are receiving this because you authored the thread.
|
and the really weird thing is that the exact same code works perfectly well on the jupyterhub site. maybe I should just move on….
lisa
… On Apr 13, 2022, at 2:07 PM, Nick Swanson-Hysell ***@***.***> wrote:
It looks like the code is first plotting the normal:
if len(lats) > 0:
# add the lats and lons of the poles
pmagplotlib.plot_map(FIG['map'], lats, lons, Opts)
and then plotting the reversed:
if len(rlats) > 0:
Opts['sym'] = rsym
Opts['symsize'] = rsize
# add the lats and lons of the poles
pmagplotlib.plot_map(FIG['map'], rlats, rlons, Opts)
What might be happening is that the land and ocean in the second pmagplotlib.plot_map() is covering up the first set of points.
—
Reply to this email directly, view it on GitHub <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_PmagPy_PmagPy_issues_649-23issuecomment-2D1098488155&d=DwMCaQ&c=-35OiAkTchMrZOngvJPOeA&r=HLmFoB00cDyPMQ7s6Fl35Q&m=YdK6F0MjPiTwHkeOagnlXs_8odwLk_4TIhDaYRAT6oATfT9R-gwwfaQCeMD83Pe7&s=trk8Koexbsga_k8ypR-gfDTYYjmAHus-4x2saelRbb4&e=>, or unsubscribe <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AABKWDJBV6YJJPWHJACYIU3VE4ZQ7ANCNFSM5TL2D6EA&d=DwMCaQ&c=-35OiAkTchMrZOngvJPOeA&r=HLmFoB00cDyPMQ7s6Fl35Q&m=YdK6F0MjPiTwHkeOagnlXs_8odwLk_4TIhDaYRAT6oATfT9R-gwwfaQCeMD83Pe7&s=9fBa9bVAP8HAfAZjNb4lUKIvTG8VIvujmAVTJRBEu7Q&e=>.
You are receiving this because you authored the thread.
|
An inelegant solution that works is where:
is replaced with:
|
I think it is the plotting of the oceans and land rather than the grid that is hiding the normal points when the reversed map is generated with pmagplotlib.plot_map(). It is likely preferable to be using the map that is already generated rather than making a whole new map (which is what the edited code above does). I can commit that if it looks ok to you. |
yes please. that whole function needs re-writing I guess - but not today!
lisa
… On Apr 13, 2022, at 2:31 PM, Nick Swanson-Hysell ***@***.***> wrote:
yeah but the flag ‘pltgrid’ in Opts is turned off, so it isn’t supposed to do that. I tried a bunch of things and couldn’t get it to work…. lisa
… <x-msg://62/#>
I think it is the plotting of the oceans and land rather than the grid that is hiding the normal points when the reversed map is generated with pmagplotlib.plot_map().
It is likely preferable to be using the map that is already generated rather than making a whole new map (which is what the edited code above does). I can commit that if it looks ok to you.
—
Reply to this email directly, view it on GitHub <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_PmagPy_PmagPy_issues_649-23issuecomment-2D1098506958&d=DwMFaQ&c=-35OiAkTchMrZOngvJPOeA&r=HLmFoB00cDyPMQ7s6Fl35Q&m=fTRpZCKe4xM1Y2nYlddrDs5nMqjOBBUPvzI5AYL4bHzdIp3lVs6_hEUYS-OIDvHl&s=3EsInp0g452cM36F2XfqXwKZA7lm5K_YAFllqZzju64&e=>, or unsubscribe <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AABKWDKK5GKD67KLVICFKXTVE44J5ANCNFSM5TL2D6EA&d=DwMFaQ&c=-35OiAkTchMrZOngvJPOeA&r=HLmFoB00cDyPMQ7s6Fl35Q&m=fTRpZCKe4xM1Y2nYlddrDs5nMqjOBBUPvzI5AYL4bHzdIp3lVs6_hEUYS-OIDvHl&s=QlL3IUuaLvV3pbXGF1V5WPGtdn3LW9KQ3RIV2cKu78w&e=>.
You are receiving this because you authored the thread.
|
Did commit e2a7b00 solve the issue? If so, we can go ahead and close. |
What command was run:
ipmag.vgpmap_magic(dir_path=dir_path,size=50,flip=True,save_plots=True,lat_0=60,rsym='b^',rsize=50,fmt='png')
and
ipmag.vgpmap_magic(dir_path=dir_path,size=50,flip=False,save_plots=True,lat_0=60,rsym='b^',rsize=50,fmt='png')
What happened:
There are no 'normal' poles when flip is set to True. This used to work but something happened!
What I expected to happen:
I expect the red and blue symbols as advertized for when flip is set to True
Data file(s):
sites.txt
Screenshot(s):
plot with both normal and reverse data only shows only reverse poles:
without flip, you get only the normal poles (as expected).
The way it is supposed to work (and does on jupyterhub.earthref.org, weirdly, with the same version of PmagPy).
PmagPy version:
pmagpy-4.2.98
The text was updated successfully, but these errors were encountered: