Skip to content

Restructure coordinate-benchmarks - #42

Merged
cdeil merged 43 commits into
astropy:masterfrom
cdeil:restructure
Jan 21, 2015
Merged

cdeil merged 43 commits into
astropy:masterfrom
cdeil:restructure

Conversation

@cdeil

@cdeil cdeil commented Jan 14, 2015

Copy link
Copy Markdown
Member

This is a complete re-structure (almost a re-write) of the coordinates-benchmarks.
It should not change the results from the existing benchmarks ... it's just a code re-organisation.

Motivation / changes:

  • Put all code into a package (so that it's separated from output files and we can have utils imported in all scripts)
  • Use Astropy table and coordinates more instead of ad-hoc solutions (e.g. I/O and handing things around)
  • Have one command line tool that runs sub-commands (via click)
  • Add benchmark_horizontal command to run the AltAz to celestial transformations benchmark
  • Add clean, preview, deploy commands.
  • Remove astrolib ... see discussion in astrolib celestial results are "random" #44 .

I think this way it will be easier to grow this in the future (e.g. add more precision benchmarks or performance benchmarks)

Comments welcome!

@astrofrog

Copy link
Copy Markdown
Member

This looks good so far! +1 to making it into a package.

I have no issues with the click dependency since this is not in the core package.

Small note: for the astrolib files you deleted and added instead of git mv hence the large diff.

@cdeil cdeil changed the title WIP: Restructure coordinate-benchmarks Restructure coordinate-benchmarks Jan 15, 2015
@cdeil

cdeil commented Jan 15, 2015

Copy link
Copy Markdown
Member Author

I'm running out of time and want to finish this up ... the splitting of the summary table computation and html page generation will have to be done later ... there's already an open issue for that: #35 .

@cdeil

cdeil commented Jan 15, 2015

Copy link
Copy Markdown
Member Author

This is 90% done, but I'm out of time for today.
I can finish this up tomorrow morning.

There must be some minor bug because the summary.txt changed where it shouldn't have.

@astrofrog - If you have time to review this, please do.

@cdeil

cdeil commented Jan 18, 2015

Copy link
Copy Markdown
Member Author

@astrofrog This is mostly ready ... there's one major issue left which is that the summary now shows larger disagreements that before, although the individual results txt files are identical. So probably I introduced a bug into the code that computes the summary, but I couldn't find it now and unfortunately won't have time to debug this further before Wednesday ...

Current results on the web (which I confirmed locally match what current master dd6c851 gives)

screen shot 2015-01-18 at 13 44 54

With this PR:

screen shot 2015-01-18 at 13 44 43

Comment thread coordinates_benchmark/utils.py Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the cause of the big changes visible in the summary ... this way to compute separations on the sky in arcsecs gives different results from the _vicenty_dist_arcsec function we used previously.
I'll think the results from this version are incorrect ... not sure where the precision is lost yet ... I'll fix it this afternoon.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a reason we can't just use the one from astropy directly?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@astrofrog - That's what I was doing in this PR ... change from a copy of _vicenty_dist_arcsec in coordinates-benchmark to call astropy.coordinates.angle_utilities.angular_separation which is what is used internally in Astropy.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I made a stupid mistake here ... sep is in radian, not degree ... will fix this now.

@cdeil

cdeil commented Jan 21, 2015

Copy link
Copy Markdown
Member Author

As far as I see this PR now gives identical results as before, as it should:
screen shot 2015-01-21 at 13 43 34

@astrofrog Can you please give this a final review?
I'd like to merge this soon so that work on AltAz benchmarks can start (in future PRs, not here, the diff is too large).

@astrofrog

Copy link
Copy Markdown
Member

@cdeil - this looks great to me! Two comments that we can address later (because they are beyond the scope of reorganizing):

  • We should include units in the tables, maybe we can do this once astropy supports ECSV
  • We could use jinja2 templates for the HTML output

But this is for the future. For now, please go ahead and merge.

cdeil added a commit that referenced this pull request Jan 21, 2015
Restructure coordinate-benchmarks
@cdeil
cdeil merged commit c110a2b into astropy:master Jan 21, 2015
@cdeil

cdeil commented Jan 21, 2015

Copy link
Copy Markdown
Member Author

There is already an issue that we should use jinja2: #35
I've made a new issue that we should store the units in the tables: #45

@cdeil cdeil mentioned this pull request Jan 21, 2015
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