marvin
marvin copied to clipboard
Multiple results from obsinfo
Describe the bug
Doing a query that uses a column from obsinfo
returns multiple rows for the same target.
To Reproduce Steps to reproduce the behavior:
- Go to the Search page in Marvin
- Do a query with the filer
plateid > 1 and haflux > 25
- The resulting table contains multiple entries for the same plateifu, one for each exposure.
Expected behavior I'm not sure if this is a really a bug. Maybe this behaviour makes sense but it seems a bit counterintuitive when combined with a query that should return only one result per galaxy.
That was the designed behaviour. The obsinfo
table is organized by unique exposure per row. I added the unique identifiers of expnum
and mgdpos
as default return parameters when querying on this table. By default, the queries return the normal per row results. Anytime we want to group results together, e.g. by galaxy, then we will need to write special code to do that for those cases. Which we can do. I think it depends on what people are looking for when they perform the query. If we group by default then people interested in exploring individual exposures can't do so.
That makes sense. My only worry with this is when obsinfo
is combined with DAP queries. In that case it seems it will multiply each spaxel by N exposures. This is not a critical issue right now but we should think about it.