|
Probably went a bit over the top with this issue...
- Split up FiberTrace, Spectrum, and PSF into individual classes, each also getting a ...Set class
- The spatial profile of a FiberTrace is kept inside the FiberTrace class as a shared pointer to afwImage::Image<float>.
- 1D extraction of the spectra is done by functions inside the FiberTrace class, returning one spectrum (shared pointer to a vector)
- There are 2 ways to extract a spectrum: parallel to the profile fitting (FiberTrace.MkSlitFunc(...)) or using a previously fitted profile (e.g. from the flat, FiberTrace.extractFromProfile(...)).
- If a spectrum (e.g. arc lamp) shall be extracted from a previously fitted flat profile, the procedure is to take the FiberTrace from the Flat, re-extract the FiberTrace from the arc CCD image (keeping the aperture parameters and profile), and then extract the arc spectrum to 1D. This procedure can be repeated as many times as the user wants.
- I shall eventually get rid of the 1D extraction during the profile fitting as it does exactly the same thing as the extractFromProfile(...) function.
- The control FiberTraceExtractionControl was renamed to FiberTraceProfileFittingControl as this is what it really does.
- 2D PSFs can be extracted from a FiberTrace and respective 1D spectrum using the free function
PTR(PSFSet<ImageT, MaskT, VarianceT, WavelengthT>) math::calculate2dPSFPerBin(const FiberTrace<ImageT, MaskT, VarianceT> & fiberTrace, const Spectrum<ImageT, MaskT, VarianceT, WavelengthT> & spectrum, const PTR(TwoDPSFControl) & twoDPSFControl)
- The 1D spectrum is used to find the center of the PSF in dispersion direction.
- Tasks for 1D extraction (extractSpectraTask.py) and extraction of the 2D PSFs (getTwoDPsfPerBinTask.py) have been created.
- Tasks are still not using the butler.
|