Closed gmella closed 2 years ago
Draft proposal:
GenericFilter extends Identifiable(String columnName, type=string/numeric, acceptedValues=List<String or Range>, enabled=true/false)
List<GenericFilter>
field to SubsetDefinition
SelectorResult
field to SubsetDefinition
, replace the former fake OIFitsFile reference, fix all usagesMap<OIWavelength, IndexMask> wavelengthMasks
field to SelectorResult
AxisEditor
(later support for multiple ranges)SubsetDefinition.List<GenericFilter>
, that will call updateSubsetDefinition
to query dataupdateSubsetDefinitionRef
will use OCM.findOIData(subsetDefinition)
to get a SelectorResult
, update SubsetDefinition.SelectorResult
field with the newly computed SelectorResult
SubsetDefinition
on the Selector
instance and delegate to oiFitsCollection.findOIData(selector, result)
OIFitsCollection.findOIData(selector, result)
will compute SelectorResult.wavelengthMasks
while computing the SelectorResult
. It will use a code similar to Merger.processOIWavelengths
. It does it for every OIWavelength
used by matching OIData
tables. If all table is hidden, no mask is added. If all table is valid, a null value is added as mask. SelectorResult stores the masks through the successive calls to findOIData(Selector,SelectorResult)
PlotChartPanel.updatePlot()
, for each OIData
, gets the related OIWavelength
, then the IndexMask
from SubsetDefintion.SelectorResult.wavelengthMasks
. It gives it to the updatePlot(parameters)
function, which uses the IndexMask
to skip the unwanted values when it iterates on the waves channels. Also handle the cases when there is no masks and when mask is null.Notes:
BitSet
(1D) along the wavelength axis used like OIVIS2[row index][wlen index]
.TARGET_ID[row index]
.FLAGS
column for more complex filter expressions like VIS2ERR[row][wlen] < threshold_value
About the replacement of Subset OIFitsFile by the SelectorResult, in SubsetDefinition. The following points remain to be treated:
I fixed all former subsetDefinition.OIFitsFile usages except OIFitsBrowser ... Merger has been updated to use SelectorResult's IndexMask
Is your feature request related to a problem? Please describe. Yes , I need to be able to filter my data as done in the command line interface.
Describe the solution you'd like I would like to be able to define a filter list in the GUI starting with a list of wavelength ranges. Exported data and plotted ones should correspond to the ones which would have been merged with the same wavelengh ranges using the OIFitsProcess in command line.
Additional context Further filters (date, baselines...) will be added in the following iterations.
Technical constraints The implementation must evaluate the reuse of the merger bitmask by the plotChartPanel code. 'Export to OIfits file' action should use in addition to the currently selected target the new filter inputs.