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

q > 1 is not allowed #84

Open
jenniferyee opened this issue Mar 22, 2023 · 4 comments
Open

q > 1 is not allowed #84

jenniferyee opened this issue Mar 22, 2023 · 4 comments
Assignees

Comments

@jenniferyee
Copy link
Collaborator

In wide binaries, there are two similar caustics. Technically, it is possible to probe source trajectories centered on either caustic. But in practice, it is often simpler to just use q --> 1/q to probe the other caustic because then t0 corresponds to the peak of the light curve.

Is there actually a limitation in the code algorithms that prevents q > 1? i.e., if we remove the raise Error for q > 1, will the code work as described above or will something weird happen?

@jenniferyee
Copy link
Collaborator Author

Simple test:

  1. Write unit tests for the case q > 1.
  2. Remove the condition new_q > 1 from Line 935 of modelparameters.py (q.setter method)

@rpoleski
Copy link
Owner

The above approach is fine, but not enough. We should also test trajectory plotting etc.

When we have wide-orbit planets and source approaches planet much closer than star , then I fit it using example 16 and re-parametrization of the model. Though, I had no case with alpha~90 or 270 deg (i.e., u_0 ~ s-1/s).

There may be cases when q~1 and in different models we would like to have different bodies to be more massive.

Definitely it's worth allowing q > 1 for the users perspective.

@rapoliveira
Copy link
Contributor

Removing the condition q > 1 from lines 751 and 1095 of the current modelparameters.py, similar caustics can be obtained with q -> 1/q and alpha -> alpha +/- 180, as shown in the figure. I used the parameters from example01, with a slightly different value of s and with q = 0.25 and 4.

FINAL_figs_combined

Should I write unit tests and/or implement warnings in that case?

@rpoleski
Copy link
Owner

Great!
The next step would be to calculate magnification curves for both q=0.25 and q=4 case and make sure that they're the same. Assume rho = 0.001 and run it using each of four finite-source methods (for a list of methods see second page of documents/magnification_methods.pdf).

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

No branches or pull requests

3 participants