Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpi_select_mock_targets #630

Open
alxogm opened this issue Jul 9, 2020 · 6 comments
Open

mpi_select_mock_targets #630

alxogm opened this issue Jul 9, 2020 · 6 comments

Comments

@alxogm
Copy link
Contributor

alxogm commented Jul 9, 2020

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
Copy link
Contributor

sbailey commented Jul 9, 2020

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:

  • @j-dr makes a new "desicut" version of the buzzard mocks that use the new footprint (perhaps including some padding) if he still has the original full sky version available.
  • if the area overlap of the missing pixels is less than (something small), just ignore it and move on.
    • BUT: if a mock file is missing in the middle of the footprint that would leave a big hole in the tiles for a particular target class, this should still crash so we don't just silently do the wrong thing.
  • other ideas?

@zhouconghao
Copy link

zhouconghao commented Nov 24, 2020

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
Copy link
Member

@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
Copy link

zhouconghao commented Dec 4, 2020

@moustakas Yeah sure!

@zhouconghao
Copy link

@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
Copy link
Member

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants