spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
558 stars 164 forks source link

Determine and simplify jwst dependencies #1508

Open nden opened 6 years ago

nden commented 6 years ago

The JWST dependencies are not listed anywhere and sometimes it's a matter of trial and error to determine everything that's needed for the pipeline to run. This issue makes an attempt to determine the dependencies, try to reduce their number and eventually document them. I put inline comments/questions. Feel free to add more.

Installation dependencies:

Testing dependencies:

Running calspec2:

to be continued...

jhunkeler commented 6 years ago

stsci.sphere references


$ find . -type f -name "*.py" | xargs grep -H 'stsci\.sphere'
./jwst/skymatch/skyimage.py:from stsci.sphere.polygon import SphericalPolygon
./jwst/skymatch/skyimage.py:        :py:class:`~stsci.sphere.polygon.SphericalPolygon`
./jwst/skymatch/skyimage.py:            A :py:class:`~stsci.sphere.polygon.SphericalPolygon` that is
./jwst/skymatch/skyimage.py:            :py:class:`stsci.sphere.polygons.SphericalPolygon`, or
./jwst/skymatch/skyimage.py:            :py:class:`stsci.sphere.polygons.SphericalPolygon`, or
./jwst/skymatch/skyimage.py:        :py:class:`~stsci.sphere.polygon.SphericalPolygon`
./jwst/skymatch/skyimage.py:            A :py:class:`~stsci.sphere.polygon.SphericalPolygon` that is
./jwst/skymatch/skyimage.py:            :py:class:`stsci.sphere.polygons.SphericalPolygon`, or
./jwst/tweakreg/wcsimage.py:from stsci.sphere.polygon import SphericalPolygon
./jwst/tweakreg/wcsimage.py:        :py:class:`~stsci.sphere.polygon.SphericalPolygon`
./jwst/tweakreg/wcsimage.py:            A :py:class:`~stsci.sphere.polygon.SphericalPolygon` that is
./jwst/tweakreg/wcsimage.py:        :py:class:`~stsci.sphere.polygon.SphericalPolygon`
./jwst/tweakreg/wcsimage.py:            A :py:class:`~stsci.sphere.polygon.SphericalPolygon` that is
./jwst/tweakreg/wcsimage.py:        :py:class:`~stsci.sphere.polygon.SphericalPolygon`
./jwst/tweakreg/wcsimage.py:            A :py:class:`~stsci.sphere.polygon.SphericalPolygon` that is```
nden commented 6 years ago

@mcara stsci.sphere is deprecated in favor of spherical_geometry. Could the latter be used as a drop in replacement?

bernie-simon commented 6 years ago

Yes, it should be compatible.

mcara commented 6 years ago

@nden @bernie-simon knows much better than me what is going on with spherical_geometry and he seems to be optimistic. However, I would suggest to wait a little: I could try to replace stsci.sphere with spherical_geometry in stsci.skypac and see if drizzlepac runs fine and if it does - then it is safe to replace. Or, if there are any JWST tests then maybe this can be done directly in jwst.

nden commented 6 years ago

@mcara As far as I can tell the only reason stsci.tools is a dependency is the use of bitmask. Does it make sense to copy it to jwst to avoid stsci.tools?

mcara commented 6 years ago

@nden Do you mean make a copy of the bitmask as a sub-package of jwst? It will be more difficult to maintain, I would think... For example, bitmask is already in the jwst and it is already behind the one in stsci.tools: https://github.com/STScI-JWST/jwst/blob/master/jwst/resample/bitmask.py I wasn't even aware of this before so how could have I updated it?

jdavies-st commented 6 years ago

I notice that fitsblender is still imported in cube_build/ifu_cube.py. @jemorrison ?

Once removed, we can remove it as a dependency.

mcara commented 6 years ago

@nden ... But, if this is what you really want, I guess it could be copied to jwst.

mcara commented 6 years ago

@nden Let me know .

mcara commented 6 years ago

Another option, probably would be to get bitmask into astropy.nddata (or some other place) - see https://github.com/astropy/ccdproc/pull/611#issuecomment-362977219

jdavies-st commented 6 years ago

I like the idea of putting bitmask into astropy.nddata or some other place.

jdavies-st commented 5 years ago

So it turns out that even though we resolved the bitmask issue by using the version on astropy, stsci.tools is a dependency of stsci.image, which we still depend on. So we did not remove the stsci.tools dependency yet. =(

mcara commented 5 years ago

@jdavies-st Well, that's like "second-hand" dependency. It is not a direct dependency. A package manager should be able to resolve all this.