To make it easier for users to run scarlet and to better understand what they are running when they report problems, I think we need to make executable version of our main workflows. This is in addition to people constructing their own pipelines e.g. in notebooks.
I think these two would be a good start:
scarlet2.py gets a number of FITS files for images, weights, and PFSs; runs sep to perform background estimation and source detection; initializes everything as Source; runs the fitter, possibly with neural priors; reports a set of user-specified measurements.
scarlet2-td.py gets a number of FITS files, weights and PSFs; runs sep to perform background estimation and source detection; searches for transient; initializes StaticSource and Sources; runs the fitter, possibly with neural priors; reports a set of user-specified measurements.
Under the hood, we would have to unpack the information from the FITS files. Probably best to require that the order of these files is consistent, e.g.
Depending on WCS information in the image files, we'd have consistent pixel grids or require resampling to align them; we can determine the sky area and bands over which we fit the data; and for scarlet2-td we'd get the time frame as well.
In both cases, we could get the same bands multiple times. We need to make sure that we create the model_frame.channels correctly, especially for the TD case.
We probably need some configuration to be passed, including the source model types and possible priors as well as the measurements to be reported:
To make it easier for users to run scarlet and to better understand what they are running when they report problems, I think we need to make executable version of our main workflows. This is in addition to people constructing their own pipelines e.g. in notebooks.
I think these two would be a good start:
scarlet2.py
gets a number of FITS files for images, weights, and PFSs; runssep
to perform background estimation and source detection; initializes everything asSource
; runs the fitter, possibly with neural priors; reports a set of user-specified measurements.scarlet2-td.py
gets a number of FITS files, weights and PSFs; runssep
to perform background estimation and source detection; searches for transient; initializesStaticSource
andSource
s; runs the fitter, possibly with neural priors; reports a set of user-specified measurements.Under the hood, we would have to unpack the information from the FITS files. Probably best to require that the order of these files is consistent, e.g.
Depending on WCS information in the image files, we'd have consistent pixel grids or require resampling to align them; we can determine the sky area and bands over which we fit the data; and for
scarlet2-td
we'd get the time frame as well.In both cases, we could get the same bands multiple times. We need to make sure that we create the
model_frame.channels
correctly, especially for the TD case.We probably need some configuration to be passed, including the source model types and possible priors as well as the measurements to be reported:
If no outfile is given, just dump to stdout, otherwise save catalog in requested format.