Cambridge-ICCS / ONEFlux

Open Network-Enabled Flux processing pipeline
Other
0 stars 0 forks source link

Create generic MATLAB higher-order function for logging code #24

Open dorchard opened 3 weeks ago

dorchard commented 3 weeks ago

In order to generate test fixtures, we could use a higher-order function to replace function calls to log the inputs and outputs, e.g. of the form:

function y=crocodileClip(f, name, x) 
  record("input", name, x)
  y = f(x)
  record("output", name, y)

This also needs to handle multiple parameters and logging the input/outputs to files, with also some configuration (e.g., via some global constant) so we can identify where the test fixtures came from (i.e., which original data set).

dorchard commented 3 weeks ago

The method will be to replace function calls with the use of this higher order function in a branch, run through with the different test sites, and then bring the generated fixtures across.

dorchard commented 3 days ago

JSON format discussion: https://github.com/Cambridge-ICCS/ONEFlux/issues/24