This can create issues if you wish to integrate flux or simply improve the cosmetic appearance.
One approach is to smooth the data but this degrades all the spectra. Instead use KAPPA::FILLBAD. This replaces just the bad values with a smooth function derived from neighbouring values, derived by iterating to a solution of Laplace's equation.
Just using FILLBAD's default values will duly fill in the holes. You might prefer not to smooth in the spectral axis by setting Parameter SIZE to [s,s,0] where s is the initial scale length in pixels. The zero means do not smooth along the third axis. The scale length should have a value about half the size of the largest region of bad data to be replaced. Since the largest bad regions apart from the cube peripheries are two pixels across, a command like this
fillbad in=holey out=filled size="[1,1,0]"is appropriate. The graphic below shows the same region as before, but with the holes filled in.
FILLBAD does what it says on the tin.
There will be some smoothing, but it's not obvious. Below is a KAPPA::CLINPLOT graphic for a part of the filled cube. Each spectrum is a pixel in the image above. Can you identify the three spectra which were previously bad?
No comments:
Post a Comment