Correction of residuals for interferometry#937
Correction of residuals for interferometry#937miroslavbroz wants to merge 7 commits intophoebe-project:feature-interferometryfrom
Conversation
| if dataset_kind in ['vis', 'clo', 't3']: | ||
| model_interp = model_param.value | ||
| residuals = dataset_param.value - model_param.value |
There was a problem hiding this comment.
this assumes that the model and dataset have the same times. Since calculate_residuals is available to be called directly by the user, we'll probably want to check for that and raise an error if that is not the case.
For solvers that call this themselves, we probably will want to check in advance as part of run_checks_solver to enforce that the input times (https://phoebe-project.org/docs/latest/tutorials/solver_times) will match the dataset times.
There was a problem hiding this comment.
I do not think this check will ever be needed, because VIS, CLO, T3 datasets are handled in a different way (cf. original_index). One can call calculate_residuals() without problems. The residuals as well as chi^2 is correct (w.r.t. manual computations). No other datasets are affected.
A single call is 31 ms, i.e., 3.1 s per 100 times. :-(
The reason is that one cannot interpolate in time (many u, v, vis measurements are for the same time).