-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for plotting isocontours of vector potential in snap.py #7
base: master
Are you sure you want to change the base?
Changes from 1 commit
f2f57d8
70a66c0
fecb200
6e395d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,9 @@ | |
parser.add_argument('--linecolor', | ||
type=str, default='k', | ||
help='Linecolor of A-contours. Needed only if using --A-contours') | ||
parser.add_argument('--zorder', | ||
type=str, default='k', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whoops! result of copy pasting the previous line to avoid typing, and then forgetting to update it completely. :) |
||
help='zorder for A-contours. Needed only if using --A-contours') | ||
parser.add_argument('--save', | ||
type=str,default=None, | ||
help='Figure filename if you want to save the figure') | ||
|
@@ -119,7 +122,7 @@ def make_snap(dfnam,vnam,coords,size,cmap,logplot, | |
if args.A_contours: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just noticed that args is referenced in |
||
bplt.overlay_field(ax, geom, dump, NLEV=args.nlev, | ||
linestyle=args.linestyle, linewidth=args.linewidth, | ||
linecolor=args.linecolor) | ||
linecolor=args.linecolor, zorder=args.zorder) | ||
ax = a1 | ||
if coords == 'mks': | ||
bplt.plot_X1X3(ax, geom, var, dump, cmap=cmap, vmin=vmin, vmax=vmax, | ||
|
@@ -142,7 +145,7 @@ def make_snap(dfnam,vnam,coords,size,cmap,logplot, | |
if args.A_contours: | ||
bplt.overlay_field(ax, geom, dump, NLEV=args.nlev, | ||
linestyle=args.linestyle, linewidth=args.linewidth, | ||
linecolor=args.linecolor) | ||
linecolor=args.linecolor, zorder=args.zorder) | ||
|
||
if savefig == False: | ||
plt.show() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you dividing
hdr['N1']
by 2?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is the line that I wanted to check with you.
Is
A_phi[j,N1-1-i]
calculating A in the -ve direction andA_phi[j,i+N1]
in the +ve direction? So if I don't divide by 2, ultimately, in line 363,rcyl
andz
ends up having dimensions 256 X 256, andA_phi
is 256 X 512. So I divided by 2 to make N1 represent cells in either the +ve/-ve direction only.