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-15588: Remove home-brewed SQLite PPDB #32

Merged
merged 4 commits into from
Nov 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 0 additions & 42 deletions data/l1db-ap-pipe-afw-map.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions data/ppdb-ap-pipe-afw-map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file defines mapping between L1DB column names and afw.table column
# names. Top-level structure is a dictionary indexed by table name and the
# values are dictionaries where key is the name of column in L1DB and value
# is the name of the column in afw.table

DiaObject:
diaObjectId: id
ra: coord_ra
decl: coord_dec

DiaSource:
diaSourceId: id
parentDiaSourceId: parent
ra: coord_ra
decl: coord_dec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ columns:
nullable: true
description: Time when validity of this diaObject ends.
default: null
- name: nDiaSources
type: INT
nullable: false
description: Total number of DiaSources associated with this DiaObject.
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit confused by this. You add the same thing to dax_ppdb/data/ppdb-schema-extra.yaml; why do you need two more copies here? Which file is actually being used?

Copy link
Contributor Author

@morriscb morriscb Nov 27, 2018

Choose a reason for hiding this comment

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

The one being used in ap_pipe is from ap_association. The reason the duplication exists is because the ap_association one as extra columns for the observed DiaSource filter. It also doesn't have the DiaObjectLast table as we don't currently use the Ppdb concept of "dailyJob". The current default config is baseline.


---
# DiaObjectLast uses the same columns as DiaObject but has different index
Expand All @@ -27,6 +31,10 @@ indices:
columns:
- diaObjectId
type: INDEX
- name: nDiaSources
type: INT
nullable: false
description: Total number of DiaSources associated with this DiaObject.

---
# Special PK index for DiaObject table with spacial column being first
Expand Down
2 changes: 0 additions & 2 deletions python/lsst/ap/association/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@
from .version import *
from .association import *
from .mapApData import *
from .assoc_db_sqlite import *
from .afwUtils import *
from .l1dbproto import *
598 changes: 431 additions & 167 deletions python/lsst/ap/association/afwUtils.py

Large diffs are not rendered by default.