ADD: Function to create dummy QC variable from multiple ancillary QC variables.
It was noted in #952 that the SMPS datastream has multiple ancillary QC variabiles that are related to QC checks from various machine learning algorithms. Therefore, I have added a function in the qcfilter accessor qcfilter.create_dummy_qc_variable to support merging together these QC flags into a dummy QC variable by performing the logical OR on the QC masks. qcfilter.create_dummy_qc_variable function supports specifying which ancillary QC flags to use and which tests to include in the mask. In addition, once the dummy variable is created, the various QC display functions and masking function will automatically detect the presence of this dummy variable when it is created.
Here is an example of its use:
`ds = act.io.arm.read_arm_netcdf(act.testssample_files.EXAMPLE_SMPS, cleanup_qc=True) var_name = 'merged_dN_dlogDp' title = 'Merged Number Size Distribution' cbar_title = 'dN/dlogD$_p$ (1/cm$^{3}$)'
# Create the dummy QC variable
ds.qcfilter.create_dummy_qc_variable(var_name,
rm_assessments=['Bad', 'Incorrect', 'Indeterminate', 'Suspect'])
display = act.plotting.TimeSeriesDisplay(ds, subplot_shape=(2,))
display.plot('merged_dN_dlogDp', cvd_friendly=True,
norm=colors.LogNorm(vmin=100., vmax=10000.), set_title=title, cbar_label=cbar_title,
ylabel='Pariticle Diameter (nm)', subplot_index=(0,))
display.axes[0].set_yscale('log')
# Plot the QC variable. Note that this function will automatically detect the dummy variable
display.qc_flag_block_plot('merged_dN_dlogDp', subplot_index=(1,))
display.axes[1].set_ylim([0, 21000])
`
- [x] Closes #952
- [x] Tests added
- [x] Documentation reflects changes
- [x] PEP8 Standards or use of linter
- [x] Xarray Dataset or DataArray variable naming follows 'ds' or 'da' naming