desihub / desitarget

DESI Targeting
BSD 3-Clause "New" or "Revised" License
18 stars 23 forks source link

Update the LRG selection for SV3 #694

Closed rongpu closed 3 years ago

geordie666 commented 3 years ago

@rongpu: Thanks, these new cuts look straightforward, and I see you already updated the wiki. I'm happy for you to merge this branch when you're ready (or I'll merge it in an hour or so).

My only question would be bright-end cuts? I know that we had a few (but only a very few) quite-bright LRGs in the SV2 target files. Has that been handled?

rongpu commented 3 years ago

@geordie666 I wasn't aware that there are very bright LRGs in SV2. I thought the Gaia G>18 cut has already rejected all of them (and the same cut is also included for SV3). Could you point me to specific tile(s) or target catalogs that have the bright LRGs so I can check? Thanks.

geordie666 commented 3 years ago

@rongpu: Here are some examples (at NERSC):

from desitarget.targetmask import desi_mask 
import fitsio  
import numpy as np  
from glob import glob 
fns = glob("/global/cfs/cdirs/desi/target/catalogs/dr9/0.53.0/targets/sv2/resolve/dark/*fits") 
brightlrgs = [] 
for fn in fns: 
     a = fitsio.read(fn) 
     ii = a["SV2_DESI_TARGET"] & desi_mask["LRG"] != 0 
     ii &= 22.5-2.5*np.log10(a["FLUX_R"]) < 15 
     brightlrgs.append(a[ii]) 
brightlrgs = np.concatenate(brightlrgs) 
for bl in brightlrgs: 
     print(desi_mask.names(bl["SV2_DESI_TARGET"]), 22.5-2.5*np.log10(bl["FLUX_R"]))  

['LRG', 'LRG_NORTH'] 14.252433180809021
['LRG', 'LRG_NORTH'] 14.059534072875977
['LRG', 'LRG_NORTH'] 14.790923595428467
['LRG', 'LRG_NORTH'] 14.491814374923706
rongpu commented 3 years ago

@geordie666 Thanks! I realized that these are bright stars missing from GAIA DR2. I had originally proposed a zfiber>16 cut to remove them, but somehow forgot to implement it. I will add the cut to the PR now.

rongpu commented 3 years ago

@geordie666 I have added the fix. The branch is ready to merge now.

deisenstein commented 3 years ago

A question from the paranoid: should we be making bright cuts with FIBERFLUX or FIBERTOTFLUX? It probably almost never matters, but maybe it should be the latter?

On Fri, Mar 26, 2021 at 11:13 PM Rongpu Zhou @.***> wrote:

@geordie666 https://github.com/geordie666 I have added the fix. The branch is ready to merge now.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/desihub/desitarget/pull/694#issuecomment-808635215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPQRGRFMMHBJ36R6DQK423TFVEMFANCNFSM4Z4IRE2A .

geordie666 commented 3 years ago

@deisenstein: For galaxies I'd agree tht we want to make bright end cuts in FIBERTOTFLUX. But, I'm going to merge this to make continued progress. We'll have the option to make another round of (minor) updates once we've tests fiberassign/priorities.