Dear Anders,
I have been playing with your Python subroutines. They are great and very easy to use. Well done!
I am not sure how to seek for help, so I will just post it here.
I am using the master branch as of Feb 8th 2022. I want to plot the plasma response of RMP in the regression test. So I should just say, according to your manual,
m.plot_field('B', filename='C1.h5', coord='vector', time='last', linear=True, lcfs=True)
So far I have a problem with the option linear=True in plotting subroutines. I encounter an error complaining that the variable filename should not be a numpy array.
I thought the problem might come from that you have explicitly made filename as a numpy array in setup_sims by saying
filename = np.atleast_1d(filename)
However, later you wrote after if linear:
sim = np.append(sim,fpy.sim_data(filename,time=-1))
which passes the numpy array to Nate's fpy wrapper.
Changing it to
sim = np.append(sim,fpy.sim_data(filename[0],time=-1))
would fix the problem, but I am not entirely sure about your logical flow here.
Thank you in advance for your help.
Zhisong
Dear Anders,
I have been playing with your Python subroutines. They are great and very easy to use. Well done!
I am not sure how to seek for help, so I will just post it here.
I am using the master branch as of Feb 8th 2022. I want to plot the plasma response of RMP in the regression test. So I should just say, according to your manual,
So far I have a problem with the option
linear=Truein plotting subroutines. I encounter an error complaining that the variablefilenameshould not be a numpy array.I thought the problem might come from that you have explicitly made
filenameas a numpy array insetup_simsby sayingHowever, later you wrote after
if linear:which passes the numpy array to Nate's
fpywrapper.Changing it to
would fix the problem, but I am not entirely sure about your logical flow here.
Thank you in advance for your help.
Zhisong