-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correction of residuals for interferometry #937
base: feature-interferometry
Are you sure you want to change the base?
Correction of residuals for interferometry #937
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).