Closed dmargala closed 9 years ago
I would make the catalog name an optional parameter to the new path method, the Database ctor, and bossquery. Unfortunately this means repeating the same default value 3 times, which is not very DRY, but we can fix that by adding a get_default_quasar_catalog_name
as a @staticmethod
of path.Finder
. What do you think?
I didn't realize it would be so easy to leverage the existing create_meta_full
functionality for the quasar catalog - nice! (but perhaps we should rename that method now to create_meta_from_fits
?)
Are there any issues with naming inconsistencies between spAll and the quasar catalog that we should try to normalize (e.g., using the renaming_rules
arg to sql_table_create
) so that these two catalogs give consistent results for queries that they can both handle?
Okay, I can try to do something like that. If there is a default value for the quasar catalog name, though, how will the Database ctor / bossquery know when to use the quasar catalog and when to use the spAll file? It seems like you would need another argument?
There are a few places where sp_all_path
is used and perhaps can be renamed to catalog_path
.
I haven't looked at all the keywords yet but the obvious one is Z
vs Z_PIPE
.
We need two parameters to cover all the bases:
bool: quasar_catalog = False
str: quasar_catalog_name = bossdata.path.Finder.default_quasar_catalog_name
I agree with renaming sp_all_path
to catalog_path
in cases where it might be either spAll or the quasar catalog.
I would probably leave Z_PIPE
as is, to make it clear that you have to chose between Z_PIPE
and Z_VIS
when using the quasar catalog.
@dmargala Can we close this one today? (since it makes it much easier to find SDSS-BOSS repeat quasar observations).
@dkirkby How does that look? If everything is okay I will add a few lines in script.rst
to document usage and then merge.
@dmargala Go ahead and merge when you are ready.
The recent changes to meta.py
complicate this merge.
The lite/full logic in the Database object initialization is more complicated now. I just wrapped the recent changes with:
if quasar_catalog:
...create db...
else:
...complicated lite/full create db...
to avoid breaking anything.
I snuck a fix for #36 into my last commit
This is about the minimum amount of work I could possibly have done to perform queries on the DR12Q catalog via
boss query
(see #11 ).A user can perform queries on the quasar catalog using the
--quasar-catalog
option. Note that--full
also needs to specified because there is no (documented) lite version of the quasar catalog. For example: