# lsst.obs.base.FilterDefinition should raise if abstract_filter is not set

XMLWordPrintable

#### Details

• Type: Bug
• Status: To Do
• Resolution: Unresolved
• Fix Version/s: None
• Component/s:
• Labels:
• Story Points:
1
• Team:
Data Release Production
• Urgent?:
No

#### Description

Gen3 calib production for latiss fails due to empty SQL results due to missing entries in the abstract_filter table.  The query contains "... AND raw.abstract_filter = abstract_filter.name", which is always false when both sides are NULL.

The fast solution is to alter obs_lsst/filters.py to have abstract_filter="UNKNOWN" entries.  The correct solution probably is to force obs_base to require those entries when calling FilterDefinition.

#### Activity

Hide
Jim Bosch added a comment -

I think I'd prefer to fix this so we can actually use None/NULL to represent missing filters.  That would mean that we instead need to change the query generation logic to handle NULLs explicitly.  This is of course a very reasonable workaround in the meantime, and I have no objection to merging it.

Show
Jim Bosch added a comment - I think I'd prefer to fix this so we can actually use None/NULL to represent missing filters.  That would mean that we instead need to change the query generation logic to handle NULLs explicitly.  This is of course a very reasonable workaround in the meantime, and I have no objection to merging it.
Hide
Jim Bosch added a comment -

I've just created a separate ticket for changing the query logic (DM-21840), so anyone should feel free to use this to implement the "fast solution" described above in the meantime as a workaround.

Show
Jim Bosch added a comment - I've just created a separate ticket for changing the query logic ( DM-21840 ), so anyone should feel free to use this to implement the "fast solution" described above in the meantime as a workaround.
Hide
John Parejko added a comment -

I noticed this while searching for something else and wanted to chime in that "band" (previously "abstract_filter") is explicitly not required for every Filter. Not all filters have a well defined abstract band label.

Show
John Parejko added a comment - I noticed this while searching for something else and wanted to chime in that "band" (previously "abstract_filter") is explicitly not required for every Filter. Not all filters have a well defined abstract band label.

#### People

Assignee:
Unassigned
Reporter:
Christopher Waters
Watchers:
Andrés Alejandro Plazas Malagón, Christopher Waters, Jim Bosch, John Parejko, Nate Lust