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
I tried reading data from csv file and use function alt_analysis, but I get an error in the analysis code related to the index of the data. the error message is as follows:
/home/kuri/anaconda3/lib/python3.6/site-packages/px4tools/analysis.py in alt_analysis(data, min_alt, max_alt)
107 pass
108 (-1*data.LPSP_Z).plot(legend=True)
--> 109 (data.SENS_BaroAlt - data.SENS_BaroAlt[i0_Baro].values[0]).plot(legend=True)
110 (data.GPS_Alt - data.GPS_Alt[i0_GPS].values[0]).plot(legend=True)
111 (-1*data).LPOS_Z.plot(legend=True)
AttributeError: 'numpy.float64' object has no attribute 'values'
I modified alt_analysis function in analysis.py by removing the [i0_GPS] & [i0_Baro] since each of the GPS_Alt, and SENS_BaroAlt is field by itself in the csv file and it is np array that could be accessed using values. Also, printing i0_Baro = data.SENS_BaroAlt.first_valid_index() doesn't return the correct first valid index so I had to find the first correct index. I also modified mapping in the same way since it also complained about the index index 0 is out of bounds for axis 0 with size 0...
The changes that were done could be found in the following links: analysis.py mapping.py
After these modifications, the plots were generated,
but I would like to verify these modifications or know if this issue appears to others or did it happen because of the log that was used ??
The text was updated successfully, but these errors were encountered:
I tried reading data from csv file and use function alt_analysis, but I get an error in the analysis code related to the index of the data. the error message is as follows:
I modified alt_analysis function in analysis.py by removing the [i0_GPS] & [i0_Baro] since each of the GPS_Alt, and SENS_BaroAlt is field by itself in the csv file and it is np array that could be accessed using values. Also, printing
i0_Baro = data.SENS_BaroAlt.first_valid_index()
doesn't return the correct first valid index so I had to find the first correct index. I also modified mapping in the same way since it also complained about the indexindex 0 is out of bounds for axis 0 with size 0
...The changes that were done could be found in the following links:
analysis.py
mapping.py
After these modifications, the plots were generated,
but I would like to verify these modifications or know if this issue appears to others or did it happen because of the log that was used ??
The text was updated successfully, but these errors were encountered: