SAGUARO-MMA / kne-cand-vetting

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Integrate DESI spec catalog #17

Closed jrastinejad closed 5 months ago

griffin-h commented 5 months ago

Two questions for @jrastinejad:

  1. Is the DESI database table already populated?
  2. If so, have you tested this on a target that you know has a DESI host galaxy match? Can you post the name of that target here?
griffin-h commented 5 months ago

I fixed one typo and the code runs now. But I tried testing it on a random source in the DESI table, and I found out that that source has 0 flux in all bands:

sassy=# select targetid, target_ra, target_dec, z, flux_g, flux_r, flux_z, fiberflux_g, fiberflux_r, fiberflux_z from desi_spec_q3c limit 1;
      targetid      |     target_ra      |     target_dec     |         z          | flux_g | flux_r | flux_z |      fiberflux_g      |     fiberflux_r      |     fiberflux_z      
--------------------+--------------------+--------------------+--------------------+--------+--------+--------+-----------------------+----------------------+----------------------
 616089230757593610 | 23.914121939862518 | 29.974787585945496 | 1.0791710884059862 |      0 |      0 |      0 | -0.003990191034972668 | 0.026369713246822357 | 0.002765043405815959
(1 row)

We should figure out what this means and decide how to treat matches like this. Right now the code just crashes.

jrastinejad commented 5 months ago

Hey Griffin, I pushed new changes so now the code:

  1. only runs if z, Gaia or flux_r value are greater than zero
  2. uses a Gaia mag if flux_R does not exist.

I looked at the first 20 rows of the DESI table, and only one object did not have a flux_r nor Gaia value. It's spec-z was high (1.2) which leads me to believe we won't miss bright nearby hosts.