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

Querying FITS files by header values #25

Open
danjampro opened this issue Aug 11, 2020 · 3 comments
Open

Querying FITS files by header values #25

danjampro opened this issue Aug 11, 2020 · 3 comments

Comments

@danjampro
Copy link

Hi, I am wondering if it is possible to query NGAS for FITS files with matching key/value pairs in their headers? Or should this info be encoded into the filename?

Thanks!

@awicenec
Copy link
Contributor

Hi, this is not directly possible, but you can write a retrieval plugin to do it. Would be pretty hefty on a big archive, because it would essentially open and scan every single file. We have done this before. I guess I do have the plugin code still somewhere, if you are interested.

@danjampro
Copy link
Author

Hi, this is not directly possible, but you can write a retrieval plugin to do it. Would be pretty hefty on a big archive, because it would essentially open and scan every single file. We have done this before. I guess I do have the plugin code still somewhere, if you are interested.

Hi @awicenec , thanks for getting back so quickly. Maybe this won't be necessary if I can use files_like parameter to query instead. However, I'm not sure how to correctly format this parameter and I can't see much in the documentation about it. I am also not sure how I should format the start and end parameters used by files_between. Can this be clarified?

@awicenec
Copy link
Contributor

The start and end parameters are in SQL format, i.e. if the query would work on a SQL DB it will also work with NGAS. Do you have direct access to the NGAS DB? In general that is the easier way to get such information. The NGAS QUERY command really is just a workaround, useful in some situations, but not really implemented well enough to support actual operations.

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

No branches or pull requests

2 participants