Skip to content

Added vector polar plotting#1

Open
bpwrs wants to merge 2 commits into
billetd:mainfrom
bpwrs:main
Open

Added vector polar plotting#1
bpwrs wants to merge 2 commits into
billetd:mainfrom
bpwrs:main

Conversation

@bpwrs

@bpwrs bpwrs commented Jan 13, 2026

Copy link
Copy Markdown

Updated plot_main.py to add the function lompe_scan_plot_vecs_polar that plots the vectors on the same polar plot as the potential plots, as well as added the ability for plot_vecs_model_darn_grid to accept 'mlt' as a coordinated and than plots on the mlt-mlat poolar plots. Had to adjust the magnitude, angles, and arrow scaling so everything looks right, but the colorbar placement is still wonky on the polar plots, I'll submit another pull request when I get that sorted!

bpwrs added 2 commits January 13, 2026 09:36
plot_vecs_model_darn_grid now accepts mlt coordinates
Added function lompe_scan_plot_vecs_polar that plots the flow vectors in an mlt-mlat coordinate system, polar view
@billetd

billetd commented May 6, 2026

Copy link
Copy Markdown
Owner

Hey, so I literally just saw that this PR existed! I will take a look when I'm back from EGU.

@billetd
billetd self-requested a review June 16, 2026 18:12

@billetd billetd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good, but can't test currently due to Apex and time objects not being passed in. Take a look as see what you think.

Comment thread FBI/plotting/plot_main.py
else:
print('Allready processed: ' + save_path)

def lompe_scan_plot_vecs_polar(lompe, path, boundary=True save=True):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def lompe_scan_plot_vecs_polar(lompe, path, boundary=True save=True):
def lompe_scan_plot_vecs_polar(lompe, path, boundary=True, save=True):

Comment thread FBI/plotting/plot_main.py
plot_vecs_model_darn_grid(lompe, ax, apex=apex, time=scan_time, coord=coord)

# Boundary box
if boundary=True:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if boundary=True:
if boundary == True:

Comment thread FBI/plotting/plot_main.py
if boundary=True:
plot_boundary_box(lompe, ax, apex, scan_time)

if save is True:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if save is True:
if save == True:

Comment thread FBI/plotting/plot.py
elif coord == 'mlt':
u_src_crs = v_emag
v_src_crs = v_nmag

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
magnitude = np.sqrt(v_emag ** 2 + v_nmag ** 2)
magn_src_crs = np.sqrt(u_src_crs ** 2 + v_src_crs ** 2)

These got accidentally removed

Comment thread FBI/plotting/plot.py
# magnitude_thick, norm=colours_norm, scale=2000, scale_units='inches', width=0.002,
# headwidth=3, transform=ccrs.PlateCarree(), angles='xy', cmap='viridis', zorder=3)
elif coord == 'mlt':
mlts = apex.mlon2mlt(mlons, time)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The apex and time objects don't get passed into this function. There will need to be some higher level logic in plot_main.py to handle this, or have them brought in as optional variables so it doesn't disturb the code that doesn't require mag conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants