You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I use the mms.psd_moments function, (I'm using the example you gave) I always get the following error: Traceback (most recent call last).
File "C:\Users\eric\AppData\Roaming\JetBrains\PyCharmCE2023.1\scratches\demo6.py", line 585, in
moments_e = mms.psd_moments(vdf_e, scpot, **options)
File "C:\anaconda\envs\pyrfu\lib\site-packages\pyrfu\mms\psd_moments.py", line 251, in psd_moments
field_name = vdf.attrs["FIELDNAM"]
KeyError: 'FIELDNAM'
Hi,
Thank you very much for reporting this issue!! The problem was due to changes in the structure of the VDFs (xarray.Dataset). pyrfu is continuously under development, so unspotted bugs can occur (although I do my best to test the code).
I fixed pyrfu.mms.psd_moments and uploaded the new release 2.4.9. The script is now running fine.
Hi, when I use the mms.psd_moments function, (I'm using the example you gave) I always get the following error: Traceback (most recent call last).
File "C:\Users\eric\AppData\Roaming\JetBrains\PyCharmCE2023.1\scratches\demo6.py", line 585, in
moments_e = mms.psd_moments(vdf_e, scpot, **options)
File "C:\anaconda\envs\pyrfu\lib\site-packages\pyrfu\mms\psd_moments.py", line 251, in psd_moments
field_name = vdf.attrs["FIELDNAM"]
KeyError: 'FIELDNAM'
from pyrfu import mms
tint_brst = ["2015-09-01T12:15:28.000", "2015-09-01T12:24:00.000"]
mms.download_data('pdi_fpi_brst_l2',tint_brst,1,data_path="C:\MMS\volumes")
scpot = mms.get_data("V_edp_brst_l2", tint_brst, 1)
vdf_e = mms.get_data("pde_fpi_brst_l2", tint_brst, 1)
options = dict(energy_range=[1, 1000])
moments_e = mms.psd_moments(vdf_e, scpot, **options)
The text was updated successfully, but these errors were encountered: