Notes on Diagnostic Data and Prediction Enables oliford Some time in 2009, Jakob and I redesigned the data enable system. The new one, used in the JET Polarimeter and also in the JET magnetics, I think, goes somthing like this: --------- Data Enable System --------------- The .getData() .getLOS() .getVariance() etc methods of the data source should ALWAYS return an array of the full number of channels that exist for this pulse/time, regardless of the presence of, quality of or desire for the channels. DO NOT shuffle arrays in the data source or the prediction node, as this is taken care of INSIDE the probability nodes (i.e. in MultivariateNormal) Data Status Flags: The data source should have flags to set if the data is either: NOT_PRESENT - Cannot read the data at all NOT_VALID - Present but not valid: We have read the data, but determined it to be invalid (by some particular test in the data source, flags/errors from the hardware or information from XBase. /DO NOT/ hard-code pulse/time selection into the data-source) VALID - Everything is OK as far as we know. Enable Request Flags: The data source should also have a set of flags for what the user (anyone working on the graph) wants Minerva to test. These should have a setter method and each channel can be set to one of: DIAGNOSTIC.ON - Always ON, regardless if it's valid. DIAGNOSTIC.OFF - Always OFF DIAGNOSTIC.AUTO - On if valid, otherwise off. Data Enable Flags: The data source computes, and provides a getter method for a simple boolean array of flags according to the enable request and data status flags as follows. The getter should be connected to the Enable connectionpoint on the MultivariateNormal (or MV-whatever). Data and variances should be set to Double.NaN if the data is not present but should be left if they are present but deemed invalid. Status: NOT_PRESENT NOT_VALID VALID Request: ON Throw Exception TRUE TRUE OFF FALSE FALSE FALSE AUTO FALSE FALSE TRUE ------------- Prediction Enable -------------- As a related, but independent thing, the prediction should have a similar mechanism. Again, they have a tristate 'PredictionRequest' and an resulting boolean enable flag. The data status is taken via a connection from the data source node, but the truth table is very slightly different: Status(from dataSrc): NOT_PRESENT NOT_VALID VALID Request: ON TRUE TRUE TRUE OFF FALSE FALSE FALSE AUTO FALSE FALSE TRUE The idea is that we still may want to calculate predictions for channels that have no or invalid data and we can do this but for normal operation this is a waste of time - so auto turns it off. The results do not need to be exported from the prediction node, they only determine what the prediction node tries to calculate. Fill predictions with Double.NaN if the result is FALSE.