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

Add source table #763

Merged
merged 5 commits into from
Feb 20, 2024
Merged

Add source table #763

merged 5 commits into from
Feb 20, 2024

Conversation

robertdstein
Copy link
Member

@robertdstein robertdstein commented Feb 16, 2024

This PR adds a new table for WINTER sources. Fix #732, fix #734. From now onwards:

  • Source Names are assigned using the source table. New candidates are crossmatched to this.
  • Each candidate has a sourceid foreign key. Many candidates to one source.
  • The sourcetable has an average position. The winter pipeline will retrieve the full history and then update the position in the source table accordingly.
  • Databases are slightly reworked to reflect this. You can now do single spatial crossmatch, multiple spatial crossmatch, or query by parameters in the same way as images.
  • History is now assigned by querying the candidate table for candidates sharing a sourceid, NOT via spatial coordinates.

This is a breaking change, and is somewhat decoupled from the migration of the existing database which we will need to implement. My preference would be to somehow create a clean candidate table and source table, and then reingest old candidates in sequence to assign names correctly. I am just worried it'll undercut all the candidate scanning done so far.

Copy link
Collaborator

@virajkaram virajkaram left a comment

Choose a reason for hiding this comment

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

Approved, but I think we should maybe test the candidate naming before merging. Would it be feasible to add another image to the tests to make sure this is working ?

@coveralls
Copy link

coveralls commented Feb 16, 2024

Pull Request Test Coverage Report for Build 7938845778

Details

  • 129 of 137 (94.16%) changed or added relevant lines in 20 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 86.425%

Changes Missing Coverage Covered Lines Changed/Added Lines %
mirar/processors/sources/namer.py 7 8 87.5%
mirar/processors/database/database_selector.py 33 35 94.29%
mirar/pipelines/winter/generator.py 22 27 81.48%
Files with Coverage Reduction New Missed Lines %
mirar/monitor/base_monitor.py 1 83.0%
Totals Coverage Status
Change from base Build 7920912710: 0.3%
Covered Lines: 10078
Relevant Lines: 11661

💛 - Coveralls

@robertdstein
Copy link
Member Author

Proposed way forward: create a clean candidate table and reingest. Rename old real bogus/candidate table.
Add CI test to winter, with just a source table being loaded to check history assignment.

@robertdstein
Copy link
Member Author

@virajkaram I have confirmed that this does work by creating a dummy candidate, which leads to history/the correct name/ndet=2 in database.

@robertdstein robertdstein merged commit 45154f9 into main Feb 20, 2024
14 of 16 checks passed
@robertdstein robertdstein deleted the sourcetable branch February 20, 2024 21:21
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.

[BUG] Candidate namer broken [FEATURE] Namer uses big radius
3 participants