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

Higher order fit when the secondary is in Gaia #43

Open
gmbrandt opened this issue Apr 21, 2022 · 0 comments
Open

Higher order fit when the secondary is in Gaia #43

gmbrandt opened this issue Apr 21, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@gmbrandt
Copy link
Collaborator

Currently, we assume that if the companion is in Gaia, then it will have an astrometric fit with the same number of parameters:

orvara/orvara/orbit.pyx

Lines 975 to 979 in 8e51a3f

# TODO for cases with companion in gaia, the npar might be different. Need to handle this.
# can fudge it a bit, by just doing the higher parameter fit and throwing away the higher order fit.
for i in range(Gaia.npar):
for j in range(Gaia.npar):
chi2mat_Gaia_B[i*Gaia.npar + j] = Gaia.chi2_matrix[i, j]

We then just throw away the higher order parameters of that fit, and only compare and care about the first 5 parameters:

orvara/orvara/orbit.pyx

Lines 1012 to 1021 in 8e51a3f

if data.Cinv_G_B[0, 0] != 0:
# TODO this is the case where the companion is in Gaia (e.g., its some widely separated stellar object)
# in this case, we should ideally have a separate fitter for this gaia object, which pulls the
# fit degree (5, 7 or 9 parameters) for this object and uses an appropriate htof fitter for it.
# for now though... just doing a high order fit and throwing away the higher order parameters is OK.
lstsq_C(chi2mat_Gaia_B, b_Gaia_B, Gaia.npar, Gaia.npar, res_Gaia_B)
RA_G_B = res_Gaia_B[1]
Dec_G_B = res_Gaia_B[2]
pmra_G_B = res_Gaia_B[3]
pmdec_G_B = res_Gaia_B[4]

Ideally, we should update this so that if the companion exists in gaia, it will have a Fitter object with the correct number of parameters.

@gmbrandt gmbrandt added the enhancement New feature or request label Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant