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

Fix radec/seppa conversion with OFTI sampler #109

Merged
merged 5 commits into from
Jun 10, 2019
Merged

Fix radec/seppa conversion with OFTI sampler #109

merged 5 commits into from
Jun 10, 2019

Conversation

henry-ngo
Copy link
Collaborator

This is a fix for Issue #108

As discussed, I remove sampler.data_table and sampler.input_table in favour of system.data_table and system.input_table. I moved the actual radec/seppa conversion calculation to be done within the system object, as I wanted it to change system.data_table in place while also updating the arrays system.radec and system.seppa used to keep track of which entries are in which format. I believe these arrays are necessary in additional to the quant_type column of data_table because it sorts them by body number.

Right now, these conversions are done for one body at a time since we don't do multi-planet yet. It seems like the OFTI sampler was already hard-coded for just 1 planet so I kept it that way to keep the scope of this PR only on #108. It can be made to accommodate multiple planets when we make that bigger update!

…c to sep/PA for a given object number. Updates `data_table` in place and updates the `system.radec` and `system.seppa` arrays which track which rows are in which format
…TI` (only exists in `System` now).

Uses new method from `System` to do radec/seppa conversion that will properly update `data_table`
Copying observed astrometry from `data_table` now happens *after* radec/seppa conversion.
@coveralls
Copy link

coveralls commented Jun 7, 2019

Pull Request Test Coverage Report for Build 730

  • 23 of 24 (95.83%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 86.002%

Changes Missing Coverage Covered Lines Changed/Added Lines %
orbitize/sampler.py 7 8 87.5%
Files with Coverage Reduction New Missed Lines %
orbitize/sampler.py 1 96.07%
Totals Coverage Status
Change from base Build 721: 0.3%
Covered Lines: 768
Relevant Lines: 893

💛 - Coveralls

Copy link
Collaborator

@semaphoreP semaphoreP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. convert_data_table_radec2seppa is a pretty long function name but I can't think of anything shorter.

@sblunt
Copy link
Owner

sblunt commented Jun 10, 2019

Looks good to me! Thanks again @henry-ngo! I agree that the function name is long but I like that it's descriptive.

@isabelangelo
Copy link
Collaborator

I think this is definitely an improvement, thanks Henry!

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.

None yet

5 participants