Subject: Re: Aliasing and dithering

From: [email-masked] (Donald H. Gudehus)
Date: 12 Sep 1995 17:07:40 -0500

Peter Newman writes:

>1) How do you avoid aliasing problems when re-binning digital spectra
>(e.g.  using the _scrunch_ command in Figaro)?  I suspect I need to worry
>about mutual primeness of the bin sizes before and after, but since the
>original data is not linearly binned, I am a bit stuck.  References or
>methods appreciated. 

While I am not familiar with Figaro, scrunching (on evenly sampled data, but
not necessarily evenly spaced in some physical variable) involves establishing
the mathematical relationship between the old and new physical spatial
variables, inverting the relationship to pick out the old variable values
corresponding to the desired spacing of the new variable, and then using a
good interpolation method (usually a tapered sinc) to obtain the intensity at
the old interpolated positions.  The intensities, which can be flux 
preserved if desired by multiplying by the derivative, are written to the
evenly spaced locations in the new physical variable.  

For example, if a spectrum recorded on a CCD has a nonlinear relationship 
between wavelength and pixel location, one establishes a calibration that
describes that situation and then rebins to create a linear relationship.
One can go further, by purposely creating a nonlinear (but controlled) 
relationship, say log(wavelength) for the new rebinned data.

The sinc interpolation is optimal for interpolation on even sampled data,
however one normally has to taper the contributions of the higher order terms.
Aliasing should not be a problem unless you wind up being undersampled in the
new rebinned relation.  If this is the case, an intermediate highly sampled
version can be filtered and then rebinned to a lower sample rate.

For some code on this topic see DUA4:[MIIPS.FOR]SCRUNCH.FOR and the called
subroutines at vms.ucc.okstate.edu, accessible via anonymous ftp.

            Donald Gudehus
            [email-masked]

---

From: [email-masked] (Andrew Cooke)
Date: 18 Sep 1995 10:32:51 -0500

i asked about interpolation (especially wrt spectra) on this
	group last year.  i posted a summary which, hopefully, is
	archived somewhere - check the FAQ?

	basically, sinc interpolation is the `best' you can do to
	estimate the spectrum at positions other than the centre of
	the bins in the original spectra, but it does horrible things
	to any simple error analysis you might hope to use later.

	for good quality data, sinc interpolation is probably the way
	to go.  for noisy data it's not so nice - you can get -ve
	values if you're really unlucky.

	iraf has sinc interpolation in one dimension, but i don't 
	think figaro does.

	andrew

	(p.s. there does not seem to be a FAQ for this group on the
	www at http://www.cis.ohio-state.edu/hypertext/faq/usenet )

In article <[email-masked]>,
-- 
  [email-masked]  work phone 0131 668 8357  home phone/fax 0131 667 0208
    institute for astronomy, royal observatory, blackford hill, edinburgh
                     http://www.roe.ac.uk/ajcwww