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

minor bug: jd + 1/2 day, and time units etc. #21

Closed
gmbrandt opened this issue Apr 23, 2021 · 2 comments
Closed

minor bug: jd + 1/2 day, and time units etc. #21

gmbrandt opened this issue Apr 23, 2021 · 2 comments
Labels
bug Something isn't working question Further information is requested

Comments

@gmbrandt
Copy link
Collaborator

in main.py we have:

to_jd = lambda x: Time(x, format='decimalyear').jd + 0.5

when we call htof's fitters. I.e. we add a half day to each of the gaia/hipparcos epochs. This is probably wrong, I think it is a vestigial remnant of an old version of htof.
Anyway, this doesn't matter of course for long period companions that we usually deal with

As I think about it, it might never matter because no one would use hipparcos/gaia accelerations to fit a ~30 day orbital period companion where this will matter. But we should probably fix this at some point.

Anyway: this spawns another very minor bug in that we have all RV data files use JD. This is great because it is well defined.
While for relative astrometry, we use either jyear or decimalyear -- but I don't think that is documented anywhere. And there is a ~half day difference between the two
`In [4]: Time(2020, format='decimalyear').jd
Out[4]: 2458849.5

In [5]: Time(2020, format='jyear').jd
Out[5]: 2458850.0
`
If we use tables with units specified, Issue #10 , then this will go away. The quicker fix though is just to change perhaps the input relative astrometry files to always use JD or something (or specify that these must use astropy time decimalyear or astropy time jyear).

@gmbrandt gmbrandt added bug Something isn't working question Further information is requested labels Apr 23, 2021
@t-brandt
Copy link
Owner

Relative astrometry currently accepts either BJD or decimal year units (lines 183-186 of orbit.pyx). I currently assume that any time >3000 means that you are using BJD, and that <3000 means decimal year, but yes, I've been sloppy about this. If you specify BJD in relative astrometry then the problem goes away. In practice, we're not going to be directly imaging a short period faint companion for a long time (I don't think), so I believe that this isn't an issue in practice.

@gmbrandt
Copy link
Collaborator Author

Makes sense! Thanks. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants