aodn / imos-toolbox

Graphical tool for QC'ing and NetCDF'ing oceanographic datasets
GNU General Public License v3.0
46 stars 31 forks source link

Check nearest neighbour pressure plot needs some tweaking #653

Open BecCowley opened 4 years ago

BecCowley commented 4 years ago

The nearest neighbour pressure plot looks like it only looks at the closest instruments +/- 3 or 4 instruments. It does not check for the presence of good pressure measurements. In the case where the instruments either side have no pressure, or all pressure flagged as bad, there is no way to check for pressure drift as nothing is included in the plot.

I suggest refining the plot so it looks at +/- 3 instruments that have valid pressure measurements.

BecCowley commented 4 years ago

Actually, it looks like the selection of instruments is done first (up to maximum of 5 instruments around the one of interest), then the check for valid pressures. Maybe we need to look for valid pressures first, then select the instruments to plot.

ocehugo commented 4 years ago

@BecCowley - this is checkMooringPresDiffs right?

Looks like straight forward - 1. Grab the flags when you are grabbing the pressure variables and substitute the 5 limit heuristics to files and modify iCurrSam to match only valid pressure flags.

However, I'm not familiar with that functionality and don't have easy reach data that I can actually use this function! I assume the dataset is the same as in #652?

BecCowley commented 4 years ago

Yes, same dataset. I'm getting together the files for testing and will send to you via cloudstor.

BecCowley commented 4 years ago

I found another issue with the legend labels that might be fixed when the main problem here is solved. The labels do not match the actual data plotted when 'only good and QC'd data' is selected. This is due to the 'continue' in line 240. The legend indexing comes after this and includes all the data, not the ones that have been skipped. Either need to re-index before the continue or restructure the code to do the QC exclusion first (which is the preferred option).