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

Installation Test failed, cv3 file not found #16

Open
abhijithrajan opened this issue Feb 28, 2018 · 6 comments
Open

Installation Test failed, cv3 file not found #16

abhijithrajan opened this issue Feb 28, 2018 · 6 comments

Comments

@abhijithrajan
Copy link

Hi Jarron,

I wanted to test pyNRC to estimate some contrast curves using the NIRCam coronagraphs. I was completing the installation as described in the docs. I was running the tests to ensure that the installation was done correctly when I got the following error message,

error: [Errno 2] No such file or directory: '/Users/arajan/anaconda/envs/astro3/share/webbpsf-data/si_zernikes_isim_cv3.fits'

I could not find this file within my anaconda installation. Is this a concern?

Thanks
Abhi

@JarronL
Copy link
Owner

JarronL commented Mar 1, 2018

Thanks, I'll have a look. Was there a more descriptive error message of where this occurred in the code? That FITS file is a non-standard data file for WebbPSF that hasn't been publicly released (I got it from @mperrin for my own development purposes); it holds the SI-specific WFE models. I thought I had made sure not to reference it anywhere, but seemed to have missed a spot.

@mperrin
Copy link

mperrin commented Mar 1, 2018

@abhijithrajan I will email you that file right now.

@JarronL, as a reminder the only reason that file isn't public is after CV3 I was told by Ray Ohl I wasn't supposed to release any CV3 test data publicly without having it approved by the project PIs, and we never got around to doing that. (In part because we wanted to do a test comparison to rigorously show that WebbPSF outputs matched the CV3 test results first, but that didn't get finished before Joseph left here to start grad school there.) Finishing that report is still on the to-do list, eventually. But on the other hand, if you were to hypothetically walk down the hall and ask Marcia or George if they had any objections to me just going ahead and publicly releasing that data file, that could potentially shortcut past this issue entirely...

@JarronL
Copy link
Owner

JarronL commented Mar 1, 2018

@mperrin Indeed, I already asked Marsha about this and included my own variant of si_zernikes_isim_cv3.fits in the pynrc_data directory to sidestep this very issue. From a code development perspective, I went to great lengths to avoid conflicts with versions of webbpsf-data that did not already include this file (even sub-classed some of the WebbPSF classes and rewrote their functions to explicitly remove mention of si_zernikes_isim_cv3.fits), so I'm perplexed as to why it's coming back to haunt me. As of a few days ago, I have a cleanly installed setup (sans webbpsf-data/si_zernikes_isim_cv3.fits) used for testing, but did not run into @abhijithrajan's issue when running a few basic tests.

@abhijithrajan When you get a chance, let me know exactly what you were running to induce this error. Thanks!

@abhijithrajan
Copy link
Author

@JarronL I got the error message when I ran python setup.py test. I've added the output from the test below though it does not specify where it originated,

running egg_info
creating pynrc.egg-info
writing pynrc.egg-info/PKG-INFO
writing dependency_links to pynrc.egg-info/dependency_links.txt
writing requirements to pynrc.egg-info/requires.txt
writing top-level names to pynrc.egg-info/top_level.txt
writing manifest file 'pynrc.egg-info/SOURCES.txt'
reading manifest file 'pynrc.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pynrc.egg-info/SOURCES.txt'
running build_ext
error: [Errno 2] No such file or directory: '/Users/arajan/anaconda/envs/astro3/share/webbpsf-data/si_zernikes_isim_cv3.fits'

However, once I added the fits file that @mperrin sent, another error message helped me locate the offender. The call is included in the WFE_interpolation.py,

data_dir = webbpsf.utils.get_webbpsf_data_path() + '/'
ztable_full = Table.read(data_dir + 'si_zernikes_isim_cv3.fits')

And I got a numpy not called error,

keys = np.array(ztable_full.keys())
NameError: name 'np' is not defined

After Importing numpy, I finally got the following output -

running test
running egg_info
writing pynrc.egg-info/PKG-INFO
writing dependency_links to pynrc.egg-info/dependency_links.txt
writing requirements to pynrc.egg-info/requires.txt
writing top-level names to pynrc.egg-info/top_level.txt
reading manifest file 'pynrc.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pynrc.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

@JarronL
Copy link
Owner

JarronL commented Mar 1, 2018

Ah, I haven't implemented the python setup.py test yet, so I'm not surprised it failed in weird ways. This is my first time releasing a python package, so still pretty new at some of the basics!

@abhijithrajan
Copy link
Author

Thanks. It appears like everything is working fine.

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

3 participants