0 votes
308 views

I'm trying to explore the forced photometry from MzLS and compare to the tractor photometry as a function of observing conditions.  But I don't find any forced-photometry measurements in the database.  E.g., the following query returns no results

SELECT f.ls_id, f.ls_ccd_id, t.ra, t.dec
    FROM ls_dr8.tractor as t
    JOIN ls_dr8.forced as f ON (f.ls_id = t.ls_id)
    WHERE t.dec > 40

or

SELECT c.ra, c.dec, f.ls_ccd_id, c.camera
   FROM ls_dr8.ccds_annotated as c, ls_dr8.forced as f
   WHERE (f.ls_ccd_id = c.ls_ccd_id) AND c.dec > 40 AND c.camera='mosaic'

Are the MzLS forced-photometry loaded for the "North"?

by michaelwv (140 points) | 308 views

1 Answer

0 votes
Could you please provide the context in which you ran these queries?  For example, did you run these synchronously or asynchronously?  The Python code that you used to execute these SQL statements would be especially useful.
by baweaver (340 points)
This was run in the Query Tool with output to a Virtual Storage file.
https://datalab.noao.edu/query.php
OK, thank you.

It turns out the column ls_id is improperly defined in ls_dr8.tractor_n.  We are working on a fix for this, but in the meantime, you should be able to perform the join as so:

SELECT f.ls_id, f.ls_ccd_id, t.ra, t.dec
    FROM ls_dr8.tractor as t
    JOIN ls_dr8.forced as f ON (f.ls_id = ls_dr8.ls_id(t.release, t.brickid, t.objid))
    WHERE t.dec > 40
You will also need to use a different query interface, such as a Jupyter notebook, since the function that provides ls_id is not compatible with ADQL, which is what the web query interface uses.
Great.  Thanks very much.  I did try this 3 days and your promptness in response is appreciated more than this delay reply would imply.

I tried briefly getting the asynchronous query to work, but didn't quite get things to work.  The query succeed synchronously and failed asynchronously and I couldn't really figure out why.

For now I ended up going back to the files on disk at NERSC for now.
But I will return to this question because I would prefer to include in the paper I'm working on the query I ran -- that's much easier for someone to reproduce than the set of scripts I ran at NERSC.

415 questions

432 answers

437 comments

636 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.

Categories