Details
-
Type:
Bug
-
Status: To Do
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: afw
-
Labels:None
-
Team:Data Release Production
Description
Footprints are currently not pickleable. For example, using the following code to create, save and load a Footprint:
import pickle |
import tempfile |
|
from lsst.afw.geom import SpanSet |
from lsst.afw.detection import Footprint |
|
# Create a SpanSet and use it to construct a Footprint
|
radius = 5 |
ss = SpanSet.fromShape(radius, offset=(10, 10)) |
foot = Footprint(ss) |
# Add a few peaks to the PeakCatalog (x, y, intensity)
|
foot.addPeak(7, 7, 95) |
foot.addPeak(8, 8, 103) |
foot.addPeak(9, 9, 100) |
# Pickle the footprint
|
fd, fname = tempfile.mkstemp() |
pickle.dump(foot, open(fname, 'wb')) |
# Unpickle the footprint
|
fp = pickle.load(open(fname, 'rb')) |
calling Footprint methods cause the code to segfault, for example:
fp.getBBox()
|
or
fp.getPeaks()
|
Attachments
Issue Links
- mentioned in
-
Page Loading...
Note: Serialization also fails when using the dill package in place of pickle.