Spectrum Extraction ACS vs. NICMOSlook
flatfielding
- The "flatfielding" corrects for RELATIVE sensitive variations
of individual pixel with wavelength. It does NOT include the
absolute flux calibration (response), which only depends on
lambda. This is just a choice of parameterization.
For a given pixel,
flux(mJy)=
flux(DN/sec) * flatfield(x,y,lambda) * response(lambda)
The normalization of the flatfields for a given lambda is
ARBITRARY since response(lambda) can be adjusted to reflect
any value.
- The flatfielding algorithm is NOT affected by distortions
(flux conservation).
Calibration files have to be prepared which only reflect the
pixel-to-pixel sensitivity variations.
- two methods to compute flatfield(x,y,lambda) are implemented
in nicmoslook:
- flux(x,y,lambda)= linint( flat(lamda1), flat(lambda2), ... )
where linint is a linear interpolation in lambda, and
flat(lambda_n) are images where each pixel value reflects
the relative detector sensitive of this pixel.
- flux(x,y,lambda= a(x,y) + b(x,y)*lambda + c(x,y)*lambda**2
where the coefficients a, b, c have been determined in
the calibration step.
distortions
- for one point on the chip, the "deviations" from a straight line
are implemented as a 3rd order polynomial:
delta_y= d1+d2*x+d3*x**2+d4*x**3
These parameterization assumes that spectral are "almost linear".
The coefficients for one given pixel are specified in "grismspec.dat"
and can be changed interactively.
- The dispersion is similarly approximated by a third order
polynomial
lambda= a1+a2*sqrt(x**2+y**2)+a3*(x**2+y**2)
+a4*(x**2+y**2)**1.5
The coefficients for one given pixel are specified in "grismspec.dat"
and can be changed interactively.
- The field dependence of distortion coefficients a1, ..., a4 and
d1, ... d4 are specified in a "distortion file" in the form
d1= d1_0 + d1_x* (x-x0) + d1_y* (y-y0) + d1_yx* (y-y0)(x-x0)
+ d1_x2* (x-x0)**2 + d1_y* (y-y0)**2
where d1_0 is the value specified in grismspec.dat. x0 and y0 are
the coordinates of the reference pixel which are together with
and the field parameters d1_* specified in the distortion file.
weights
weights in NICMOSlook are computed either from:
- undispersed object.
This was the original implementation. The rational was that
we thought that given the large variations in background,
weights from the spectrum might be unreliable. This turned
out not to be the case.
- user input file (psf).
- spectrum similar to apextract, parameter is "smoothing" (number
of columns averaged).
All the options have in common that weights are first computed
as a function of distance from the center of the spectrum.
Subsequently, the weight image is distorted, i.e. weights are
computed as a function distance from a line y= y0 + (x-x0)*tan(alpha)
extraction of spectra
Spectrum on pixel grid
Shapes of spetral lines
definition of extraction parameters
- step 0: create a list with pixel coordinates x(lambda) and y(lambda)
for reference lambda:
compute orientation of spectral line from orientation of
undispersed object theta(obj):
if size*sin(theta(obj)) > 1 : theta= theta(obj)
else : theta= 90
x_i(k)= x1+ i*cos(theta)
y_i(k)= y1+ i*sin(theta)
where i is small step size.
for each x in spectrum:
- step 1: create new coordinate list:
compute y_min and y_max for given x
y_min= y1 + x*sin(alpha) -size
y_max= y1 + x*sin(alpha) +size
select y's from list:
y(k')= y(k) if y_min < y(k) < y_max
"shift" spectral line:
x(k')= x_i(k) + (x-x1) if y_min < y(k) < y_max
- step 2: compute weight for each pixel in list. The weight
is previously determined either from the undispersed weight.
weight(x,Delta_l, d)
where
d= sqrt( tan(alpha) * y_0 -tan(alpha) * y1 - x1)**2
/(1-tan(alpha)**2) + (y_0-y1)**2+x1**2
- step 3: compute the lambda at the CENTER of each pixel:
lambda(k')= a1+a2*Delta_l+a3*Delta_l**2 +a4**Delta_l**3
compute lambda_x= average(lambda(k')*weight(k'))
- step 4: sum:
flux_x= sum( flux(mJy, x_i, y_i)*weight(k'))