Giter Club home page Giter Club logo

Comments (2)

mperrin avatar mperrin commented on September 13, 2024

Comment by mperrin
Thursday Sep 25, 2014 at 22:59 GMT


More detail from Brian, from his email 2014 July 14 :

The errors I'm getting are as follows. When running the simulator, and
creating a MIRI PSF, I get:

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line
240, in trace_task
R = retval = fun(_args, *_kwargs)
File "/webapp/simulator.py", line 52, in call
return TaskBase.call(self, _args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line
437, in protected_call
return self.run(_args, *_kwargs)
File "/webapp/simulator.py", line 113, in simulate
psf_fits = obs.AddError()
File "/webapp/lib/ObservationModule.py", line 198, in AddError
psf_data,psf_pixel_scale_x,psf_pixel_scale_y =
self._image.ConvolvePSF()
File "/webapp/lib/JwstImage.py", line 342, in ConvolvePSF
psf = ins.calcPSF(oversample=self._scaleFactor)
File "/usr/local/lib/python2.7/dist-packages/webbpsf/webbpsf.py", line
367, in calcPSF
wavelens, weights = self._getWeights(source=source, nlambda=nlambda,
monochromatic=monochromatic)
File "build/bdist.linux-x86_64/egg/poppy/instrument.py", line 634, in
_getWeights
File "/usr/local/lib/python2.7/dist-packages/webbpsf/webbpsf.py", line
565, in _getSynphotBandpass
filterdata = atpy.Table(self._filter_files[wf], type='fits')
TypeError: only integer arrays with one element can be converted to an
index

The key point is that calcPSF dies off somewhere in atpy.Table I think,
and I'm not sure what's happening. I do have astropy installed, so if
removing atpy would be helpful I can try that.

The second is in trying to figure out what was happening. In this case, I
started up a shell on the test server and started python and did the
sample webbpsf scripting code, which got me this error:

import os
os.environ['PYSYN_CDBS'] = "/webapp/sim_input/cdbs"
from webbpsf import *
nc = NIRCam()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/webbpsf/webbpsf.py", line
760, in init
JWInstrument.init(self, "NIRCam") # do this after setting the long
& short scales.
File "/usr/local/lib/python2.7/dist-packages/webbpsf/webbpsf.py", line
145, in init
filter_table = atpy.Table(self._WebbPSF_basepath + os.sep+
'filters.txt',type='ascii',delimiter='\t')
File "/usr/local/lib/python2.7/dist-packages/atpy/basetable.py", line
168, in init
self.read(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/atpy/basetable.py", line
214, in read
registry._readers[table_type](self, *args, **kwargs)
File "", line 2, in read_ascii
File "/usr/local/lib/python2.7/dist-packages/atpy/decorators.py", line
44, in _auto_download_to_file
return read(table, filename, _args, *_kwargs)
File "", line 2, in read_ascii
File "/usr/local/lib/python2.7/dist-packages/atpy/decorators.py", line
56, in _auto_decompress_to_fileobj
header = open(filename, 'rb').read(4)
IOError: [Errno 20] Not a directory:
'/usr/local/lib/python2.7/dist-packages/poppy-0.2.8-py2.7.egg/data/filters.
txt'
mi = MIRI()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/webbpsf/webbpsf.py", line
591, in init
JWInstrument.init(self, "MIRI")
File "/usr/local/lib/python2.7/dist-packages/webbpsf/webbpsf.py", line
145, in init
filter_table = atpy.Table(self._WebbPSF_basepath + os.sep+
'filters.txt',type='ascii',delimiter='\t')
File "/usr/local/lib/python2.7/dist-packages/atpy/basetable.py", line
168, in init
self.read(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/atpy/basetable.py", line
214, in read
registry._readers[table_type](self, *args, **kwargs)
File "", line 2, in read_ascii
File "/usr/local/lib/python2.7/dist-packages/atpy/decorators.py", line
44, in _auto_download_to_file
return read(table, filename, _args, *_kwargs)
File "", line 2, in read_ascii
File "/usr/local/lib/python2.7/dist-packages/atpy/decorators.py", line
56, in _auto_decompress_to_fileobj
header = open(filename, 'rb').read(4)
IOError: [Errno 20] Not a directory:
'/usr/local/lib/python2.7/dist-packages/poppy-0.2.8-py2.7.egg/data/filters.
txt'

from webbpsf.

mperrin avatar mperrin commented on September 13, 2024

Comment by mperrin
Wednesday Nov 19, 2014 at 04:29 GMT


Cannot reproduce on current master. This was probably an atpy issue, now irrelevant since we switched to astropy.table for the FITS table IO.

Test case added anyway in commit 011022c

from webbpsf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.