desihub / desitarget

DESI Targeting
BSD 3-Clause "New" or "Revised" License
19 stars 22 forks source link

mpi_select_mock_targets #630

Open alxogm opened 4 years ago

alxogm commented 4 years ago

A full footprint run of mpi_run_select_mock_targets including contaminants failed for a few pixels, due to some Buzzard mock files missing, below is the full error message.

INFO:mockmaker.py:1580:readmock: Reading /global/cfs/cdirs/desi/mocks/buzzard/buzzard_v1.6_desicut/8/4/416/Buzzard_v1.6_lensed-8-416.fits
Traceback (most recent call last):
  File "/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/code/desitarget/master/bin/select_mock_targets", line 107, in <module>
    no_spectra=args.no_spectra, survey=args.survey)
  File "/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/code/desitarget/master/py/desitarget/mock/build.py", line 961, in targets_truth
    ContamGalaxiesMock=ContamGalaxiesMock)
  File "/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/code/desitarget/master/py/desitarget/mock/build.py", line 730, in get_contaminants_onepixel
    target_name='CONTAM_GALAXY', seed=seed)
  File "/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/code/desitarget/master/py/desitarget/mock/mockmaker.py", line 5430, in read
    magcut=magcut)
  File "/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/code/desitarget/master/py/desitarget/mock/mockmaker.py", line 1581, in readmock
    radec = fitsio.read(buzzardfile, columns=['RA', 'DEC'], upper=True, ext=1)
  File "/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/conda/lib/python3.6/site-packages/fitsio/fitslib.py", line 87, in read
    with FITS(filename, **keys) as fits:
  File "/global/common/software/desi/cori/desiconda/20190804-1.3.0-spec/conda/lib/python3.6/site-packages/fitsio/fitslib.py", line 351, in __init__
    raise IOError("File not found: '%s'" % filename)
OSError: File not found: '/global/cfs/cdirs/desi/mocks/buzzard/buzzard_v1.6_desicut/8/4/416/Buzzard_v1.6_lensed-8-416.fits'

Same for (and maybe a few others I've not noticed):

'/global/cfs/cdirs/desi/mocks/buzzard/buzzard_v1.6_desicut/8/3/358/Buzzard_v1.6_lensed-8-358.fits'
 '/global/cfs/cdirs/desi/mocks/buzzard/buzzard_v1.6_desicut/8/3/364/Buzzard_v1.6_lensed-8-364.fits'
 '/global/cfs/cdirs/desi/mocks/buzzard/buzzard_v1.6_desicut/8/1/127/Buzzard_v1.6_lensed-8-127.fits'
 '/global/cfs/cdirs/desi/mocks/buzzard/buzzard_v1.6_desicut/8/3/356/Buzzard_v1.6_lensed-8-356.fits'
 '/global/cfs/cdirs/desi/mocks/buzzard/buzzard_v1.6_desicut/8/2/254/Buzzard_v1.6_lensed-8-254.fits'
'/global/cfs/cdirs/desi/mocks/buzzard/buzzard_v1.6_desicut/8/1/191/Buzzard_v1.6_lensed-8-191.fits'
sbailey commented 4 years ago

Thanks for reporting this. Please track down whether these are edge pixels that just barely touch the footprint, or whether they are some other failure in the middle of the footprint. The footprint file changed in March 2020 (i.e. after the buzzard mocks) which slightly changed the edges. Options:

zhouconghao commented 4 years ago

Hi,

I encountered the same problem when I am running the script. When I was trying to locate where the missing pixels are, I plotted the footprint output by desimodel. Yellow pixels are the ones with missing Buzzard files.

image

I am not sure this is the right DESI footprint, but it does look like the missing pixels lie on the edge of the footprint.

This problem also shows up in select_mock_targets, no surprise.

moustakas commented 4 years ago

@zchvsre can I trouble you to reach out to @j-dr (maybe on the DESI slack?) and see if he would be able to build out the Buzzard footprint to match the latest/final DR9 footprint? Certainly I think the full-footprint Buzzard mocks will be very helpful going forward.

zhouconghao commented 4 years ago

@moustakas Yeah sure!

zhouconghao commented 3 years ago

@moustakas Hi! @j-dr is in the process of producing a large number of new mocks and he will update the footprint in those mocks!

moustakas commented 3 years ago

@moustakas Hi! @j-dr is in the process of producing a large number of new mocks and he will update the footprint in those mocks!

@zchvsre @j-dr any updates on this ticket?