Quickstart#
prose contains the structure to build astronomical images pipelines. Here is a quick example pipeline to characterize the point-spread-function (PSF). Letβs start by loading an example Image
[1]:
from prose import Sequence, blocks
from prose.tutorials import example_image
import matplotlib.pyplot as plt
# getting the example image
image = example_image()
image.show()
[1]:
<AxesSubplot:>
we can now build a Sequence containing single processing unit called Block that will sequentially process our image
[4]:
sequence = Sequence([
blocks.detection.PointSourceDetection(), # stars detection
blocks.Cutouts(size=21), # cutouts extraction
blocks.MedianPSF(), # PSF building
blocks.psf.Moffat2D(), # PSF modeling
])
sequence.run([image])
# plotting the detected stars
image.show()
RUN 100%|βββββββββββββββββββββββββββββββββββββ| 1/1 [00:00<00:00, 1.80images/s]
[4]:
<AxesSubplot:>
prose contains a wide variety of blocks implementing methods and algorithms commonly used in astronomical image processing.
Letβs plot the results from the Image attributes
[5]:
# plotting
# --------
plt.figure(None, (10, 4))
plt.subplot(1, 2, 1, title="Median PSF")
plt.imshow(image.psf, origin="lower")
plt.subplot(1, 2, 2, title=f"PSF model ({image.psf_model_block})")
plt.imshow(image.psf_model, origin="lower")
_ = plt.text(1, 1, f"FWHM x: {image.fwhmx:.2f} pix\nFWHM y: {image.fwhmy:.2f} pix", c="w")