From 8a6a24c51dce85a2dfadfaca0c78dcc98701a8ad Mon Sep 17 00:00:00 2001 From: Brendan Lyons Date: Thu, 12 Jun 2025 15:22:19 -0700 Subject: [PATCH 1/2] Add toroidal vector potential to IDL read_field --- unstructured/idl/read_field.pro | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/unstructured/idl/read_field.pro b/unstructured/idl/read_field.pro index 66fce62a6..8c309ff24 100644 --- a/unstructured/idl/read_field.pro +++ b/unstructured/idl/read_field.pro @@ -1667,6 +1667,25 @@ function read_field, name, x, y, t, slices=slices, mesh=mesh, $ symbol = '!3|!8B!D!9P!N!3|!X' d = dimensions(/b0, _EXTRA=extra) + ;=========================================== + ; toroidal vector potential + ;=========================================== + endif else if(strcmp('toroidal vector potential', name, /fold_case) eq 1) or $ + (strcmp('ay', name, /fold_case) eq 1) then begin + + psi = read_field('psi',x,y,t,slices=time, mesh=mesh, filename=filename, $ + points=pts,rrange=xrange,zrange=yrange, $ + linear=linear,complex=complex,phi=phi0) + + if(itor eq 1) then begin + r = radius_matrix(x,y,t) + endif else r = 1. + + data = psi/r + symbol = '!8A!D!9P!N!X' + d = dimensions(/b0, /l0, =extra) + + ;=========================================== ; Pitch Angle ;=========================================== From 2b2dffd732910a54626957e0b4b85b87473701e7 Mon Sep 17 00:00:00 2001 From: Brendan Lyons Date: Tue, 21 Oct 2025 14:17:20 -0700 Subject: [PATCH 2/2] Fix typo --- unstructured/idl/read_field.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unstructured/idl/read_field.pro b/unstructured/idl/read_field.pro index 8c309ff24..fa39f2447 100644 --- a/unstructured/idl/read_field.pro +++ b/unstructured/idl/read_field.pro @@ -1683,7 +1683,7 @@ function read_field, name, x, y, t, slices=slices, mesh=mesh, $ data = psi/r symbol = '!8A!D!9P!N!X' - d = dimensions(/b0, /l0, =extra) + d = dimensions(/b0, /l0, _EXTRA=extra) ;===========================================