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

DM-16441 Speed up creation of footprints table for Firefly #20

Merged
merged 3 commits into from Nov 6, 2018

Conversation

stargaser
Copy link
Contributor

  • Replace slow loop over table rows with column-wise copies
  • Delete the intermediate Astropy table after we've made a VOTable from it
  • Stream the footprints VOTable to Firefly using BytesIO

Copy link

@tgoldina tgoldina left a comment

Choose a reason for hiding this comment

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

Tested the notebook, works fine.

elif (('base_NaiveCentroid_x' in inputColumnNames) and
('base_NaiveCentroid_y' in inputColumnNames) and
np.isfinite(outTable.array['base_NaiveCentroid_x']).any() and
np.isfinite(outTable.array['base_NaiveCentroid_y']).any()):
coord_column_string = 'base_NaiveCentroid_x;base_NaiveCentroid_y;ZERO-BASED'
else:
raise RuntimeError('No valid coordinate columns in catalog')
Copy link

Choose a reason for hiding this comment

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

It might be more efficient if we did all error checking and modifications on the original table and converted to the VO format at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this check could be made earlier until waiting to test for valid coordinates at the end. We are likely going to make more changes to the columns that are used for the center coordinates of the footprints so this should be kept in mind.

@stargaser stargaser merged commit 4ef8440 into master Nov 6, 2018
@stargaser stargaser deleted the tickets/DM-16441 branch November 6, 2018 00:10
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

2 participants