What is the canonical way to extract the flux from a HeavyFootprint as an image? The method
getImageArray doesn’t actually return an image, it returns a 1D array with a pixel value for each index in a
The Following code works (with a
xy0 = heavy.getSpans().getBBox().getBegin() indices = heavy.getSpans().indices() indices = (np.array(indices)-xy0.getY(), np.array(indices)-xy0.getX()) image = afwImage.ImageF(heavy.getBBox()) image.array[indices] = heavy.getImageArray()
but that seems clunky (partly due to API issues that @natelust and I have already discussed and will shortly be addressed in ). Any ideas @natelust or @jbosch, on the proper way to do this? I’m guessing that measurements must require similar code.