from lsst.afw.geom import Box2I, Point2I, Extent2I
It raises error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/tmp/ipykernel_15236/5202209.py in <module>
----> 1 from lsst.afw.geom import Box2I, Point2I, Extent2I
ImportError: cannot import name 'Box2I' from 'lsst.afw.geom' (/home/yu/lsst_stack/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-42-gca6935d93+2883c49432/python/lsst/afw/geom/__init__.py)
I guess it may have changed name, I canāt find them in lsst.afw.geom.
I used tab, and find Bo can invoke Box2D, Po can invoke Point2Endpoint, and Extent can invoke EXtent2I, but they can not been imported, too.
like:
from lsst.afw.geom import Extent2I
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/tmp/ipykernel_15236/2123666387.py in <module>
----> 1 from lsst.afw.geom import Extent2I
ImportError: cannot import name 'Extent2I' from 'lsst.afw.geom' (/home/yu/lsst_stack/stack/miniconda3-py38_4.9.2-0.7.0/Linux64/afw/22.0.1-42-gca6935d93+2883c49432/python/lsst/afw/geom/__init__.py)
So, what have changed? How can I import them?
Thank you!
Hello, I am now studying the dimension concept and I want to see an example since I canāt image that dimension tables. But when I execute the following code:
from lsst.daf.butler import Butler
butler = Butler('SMALL_HSC')
print(butler.registry.dimensions.names)
Raise:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/tmp/ipykernel_9084/3396315571.py in <module>
2 butler = Butler('SMALL_HSC')
3
----> 4 print(butler.registry.dimensions.names)
AttributeError: 'DimensionUniverse' object has no attribute 'names'
I thought something may have changed. So, what have it changed to?
Thank you!
But this change was made in part because we donāt want any code to start depending on the full set of dimension elements; if youāre just poking around and trying to see what dimensions are defined, then you can use the above, but you may be better off looking at the configuration file where they are defined.