Skip to content
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

Open
wants to merge 7 commits into
base: feature-interferometry
Choose a base branch
from

Conversation

miroslavbroz
Copy link
Contributor

The reason is that one cannot interpolate in time (many u, v, vis measurements are for the same time).

Comment on lines +3807 to +3809
if dataset_kind in ['vis', 'clo', 't3']:
model_interp = model_param.value
residuals = dataset_param.value - model_param.value
Copy link
Member

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants