desihub / desispec

DESI spectral pipeline
BSD 3-Clause "New" or "Revised" License
36 stars 23 forks source link

TARGETID mismatch #967

Open dkirkby opened 4 years ago

dkirkby commented 4 years ago

I am looking at spec 0 of exposure 55355 of dithered tile 63160 from 20200314, using the Andes reductions.

I am trying to match up spectra in the FRAME file with their corresponding entries in the ZBEST file, but finding that they both have 500 unique entries but they do not exactly match:

> FRAME='/global/cfs/cdirs/desi/spectro/redux/andes/exposures/20200314/00055355/frame-b0-00055355.fits'
> ZBEST='/global/cfs/cdirs/desi/spectro/redux/andes/tiles/63160/20200314/zbest-0-63160-20200314.fits'
> tid_frame = fitsio.read(FRAME, ext='FIBERMAP')['TARGETID']
> tid_zbest = fitsio.read(ZBEST, ext='ZBEST')['TARGETID']
> len(np.unique(tid_frame)), len(np.unique(tid_zbest))
(500, 500)
> set(tid_frame) - set(tid_zbest)
{35186463138120221,
 35186463142314187,
 35186468355837583,
 35186478724156249,
 35186483899926563,
 611647215437349574}
> set(tid_zbest) - set(tid_frame)
{576489231627584346,
 576489231631777850,
 576489231635972786,
 576489236849492237,
 576489247217811633,
 576489252389389316}
dkirkby commented 4 years ago

I see the same problem for all of the 12 dithered exposures 63160 - 63171.

akremin commented 4 years ago

Hi David,

Do you know if this is also true of the cframes in the tiles directory (actually just sim links). Those are what we use as inputs to Redrock.

I'll take a look at this shortly.

Best, Anthony

On Tue, May 19, 2020, 2:56 PM David Kirkby notifications@github.com wrote:

I see the same problem for all of the 12 dithered exposures 63160 - 63171.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/desihub/desispec/issues/967#issuecomment-631104990, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBM5O7VIG5M7SW6KK3RK43RSL6BTANCNFSM4NFMBNKQ .

akremin commented 4 years ago

*sym links

I ask as a first sanity check to understand the issue.

On Tue, May 19, 2020, 3:39 PM Anthony Kremin akremin@lbl.gov wrote:

Hi David,

Do you know if this is also true of the cframes in the tiles directory (actually just sim links). Those are what we use as inputs to Redrock.

I'll take a look at this shortly.

Best, Anthony

On Tue, May 19, 2020, 2:56 PM David Kirkby notifications@github.com wrote:

I see the same problem for all of the 12 dithered exposures 63160 - 63171.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/desihub/desispec/issues/967#issuecomment-631104990, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBM5O7VIG5M7SW6KK3RK43RSL6BTANCNFSM4NFMBNKQ .

dkirkby commented 4 years ago

I just realized that I was off by one in the TILEID I associated with each exposure in the dither sequence. Even though the targets are nominally the same for the whole sequence, I guess fiber assignment is actually rerun so some sky and fluxcal targets might vary?