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

update psf-quicksim #161

Open
alxogm opened this issue Aug 23, 2022 · 3 comments
Open

update psf-quicksim #161

alxogm opened this issue Aug 23, 2022 · 3 comments

Comments

@alxogm
Copy link

alxogm commented Aug 23, 2022

@julienguy @sbailey I have noticed that in order to match the wavelength output from specsim simulations I need to provide an updated file of $DESIMODEL/data/specpsf/psf-quicksim.fits, is there a script to produce this file?

I think the update needed is to provide a finer wavelength grid and a shorter wavelength range.

The alternative I think is to hack specsim, but David advised not to do that.

@sbailey
Copy link
Contributor

sbailey commented Aug 23, 2022

@alxogm the original code to convert the optical model spots PSFs into the quicksim PSFs is in $DESIMODEL/bin/psf2quicksim.py. I think you'd need to change line 139 to use the wavelength grids from the real data (per-camera) and I expect the rest would still work.

@alxogm
Copy link
Author

alxogm commented Aug 23, 2022

Thanks! I'll take a look .

@alxogm
Copy link
Author

alxogm commented Aug 24, 2022

It worked using desi_enviroment 20.4, with more recent ones throws the following error:

File "psf2quicksim.py", line 144, in <module>
   data = quicksim_input_data(psffile, ww)
 File "psf2quicksim.py", line 52, in quicksim_input_data
   hdr = fitsio.read_header(psffile)
 File "/global/common/software/desi/cori/desiconda/20200801-1.4.0-spec/conda/lib/python3.8/site-packages/fitsio/fitslib.py", line 229, in read_header
   return FITSHDR(_fits.read_header(hdunum))
OSError: FITSIO status = 412: datatype conversion overflow
Error in ffc2dd converting string to double: 4.77449053078351E-312
Error in ffc2d evaluating string as a double: 4.77449053078351E-312

I didn't tried to solve it as I could generate the file I needed with the older desi_enviroment.

I have one question: 1) should I commit the new file I generated to svn, perhaps with a different name so that the original can still be used?

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

No branches or pull requests

2 participants