-
Notifications
You must be signed in to change notification settings - Fork 47
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
Error in the code of Example_MMS_PDist.m #154
Comments
Dear @Sibghat46, |
Hi, The line
assumes you have a PDist distribution loaded with the name desDist3 (3 if ic = 3). If you run the code from the beginning, maybe this is not the case (because the first example loads the PDist in as ePDist3 and iPDist3). The error thus likely comes from the fact that you try to access a field of a non-existent variable. By adding
before you execute the part of the code that gives you the error, the error might go away. However, this example is just to show that there are several ways to construct your PDist. I.e. this example uses an already existing PDist to make a copy of it. The same is the case for
It is thus not meaningful to run the example from the start to the end. The example is also slightly outdated, and I will try to update it in the near future. And then I will also provide better comments, and properly make the needed variables. Let me know if this helps for now. Please also feel free to ask any other questions! Best wishes, |
My apologies for the late reply!
db_info = struct with fields:
Time: 2015-10-30T05:15:45.000000000Z desDist4 = PDist with properties:
Error using evalin Error in c_eval (line 48) Error in Particle_Distributions_MMS (line 25) |
hi,
My Matlab version is R2023a.
irfu-matlab version: v1.16.3
Operating system 64-bit operating system, x64-based processor
Windows 11 pro.
Many irfu-matlab codes run nicely on my system but I have never been able to run this code for particle distributions {Example_MMS_PDist.m}. It loads the file but the error occurs in the desDist.time function. Here I have pasted the errors that I am getting.
db_info =
struct with fields:
Time: 2020-02-19T00:39:00.000000000Z
Directory: C:\Users\sibgh\pydata\mms2\fpi\brst\l2\des-dist\2020\02\19
File: mms2_fpi_brst_l2_des-dist_20200219003833_v3.4.0.cdf (156532063 bytes)
[warning: make_pdist(86)] Times shifted to center of dt-+. dt-+ are recalculated
[warning: make_pdist(86)] Times shifted to center of dt-+. dt-+ are recalculated
Unable to resolve the name 'desDist2.time'.
Error in c_eval (line 48)
for cl_id=sc_list_1, evalin('caller', irf_ssub(ev_str, cl_id)), end
Error in Particle_Distributions_MMS (line 23)
c_eval('ePDist? = PDist(desDist?.time,desDist?.data,''skymap'',energy,ephi?.data,etheta?.data);',ic)
db_info =
struct with fields:
Time: 2015-10-30T05:15:45.000000000Z
Directory: C:\Users\sibgh\pydata\mms3\fpi\brst\l2\des-dist\2015\10\30
File: mms3_fpi_brst_l2_des-dist_20151030051444_v3.3.0.cdf (335671916 bytes)
[warning: make_pdist(86)] Times shifted to center of dt-+. dt-+ are recalculated
[warning: make_pdist(86)] Times shifted to center of dt-+. dt-+ are recalculated
Unable to resolve the name 'desDist3.time'.
Error in c_eval (line 48)
for cl_id=sc_list_1, evalin('caller', irf_ssub(ev_str, cl_id)), end
Error in Particle_Distributions_MMS (line 23)
c_eval('ePDist? = PDist(desDist?.time,desDist?.data,''skymap'',energy,ephi?.data,etheta?.data);',ic)
db_info =
struct with fields:
Time: 2015-10-30T05:15:45.000000000Z
Directory: C:\Users\sibgh\pydata\mms4\fpi\brst\l2\des-dist\2015\10\30
File: mms4_fpi_brst_l2_des-dist_20151030051444_v3.3.0.cdf (334346646 bytes)
[warning: make_pdist(86)] Times shifted to center of dt-+. dt-+ are recalculated
[warning: make_pdist(86)] Times shifted to center of dt-+. dt-+ are recalculated
Unable to resolve the name 'desDist4.time'.
Error in c_eval (line 48)
for cl_id=sc_list_1, evalin('caller', irf_ssub(ev_str, cl_id)), end
Error in Particle_Distributions_MMS (line 23)
c_eval('ePDist? = PDist(desDist?.time,desDist?.data,''skymap'',energy,ephi?.data,etheta?.data);',ic)
The text was updated successfully, but these errors were encountered: