Open BecCowley opened 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.
@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?
Yes, same dataset. I'm getting together the files for testing and will send to you via cloudstor.
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).
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.