Welcome to iraf.net Friday, May 03 2024 @ 09:07 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 DOHYDRA (APSUM) extraction algorithm
   
KBWestfall
 08/17/2007 04:40PM (Read 4640 times)  
+----
Newbie

Status: offline


Registered: 08/17/2007
Posts: 3
We are in the process of creating error spectra for fiber data extracted via dohydra (apsum). The apertures have been extracted using no weighting schemes or background subtraction.Previously, we have created (from first principles) a pixel-by-pixel error image corresponding to the observed data. Using this image, we have attempted to create error spectra by passing the square of this error image (errors should add in quadrature) through dohydra using the same aperture extraction as used for the fiber data; however, we find this results in an underestimate of the errors. We believe this is because of the weighting of partial pixels included in the aperture. The effect is small in the extraction, but becomes more pronounced when the data is resampled to linear (or log-linear) steps in wavelength.We have attempted to recreate the extraction of the data using our own C++ code, which follows as closely as possible the algorithm described by the IRAF help files. The C++ code reads the appropriate trace and aperture width information from the database/ap* files such that for each aperture i, at each spectral pixel k, the spatial width of the aperture is described by:[code:1:917832bc78]
Center_k = Center_i + off_k
Ap_low_k = Ap_low_i + Center_k
Ap_high_k = Ap_high_i + Center_k
[/code:1:917832bc78]where off_k is determined by the fitted trace function and Center_i, Ap_low_i, and Ap_high_i are read from the database/ap* file. The value of the spectrum, S_k, is a sum of the spatial pixels, I_j, following: [code:1:917832bc78]
S_k = 0;
for (j = int(Ap_low_k)+1, jj = int(Ap_high_k); j < jj; ++j)
S_k += I_j;
j = int(Ap_low_k)+1;
S_k += (j-Ap_low_k) * I_j + (Ap_high_k-jj) * I_jj;
[/code:1:917832bc78]We have been unable to reproduce the apsum results using this approach.We have performed two tests: The first test was to input a unity image through dohydra and then through our own code; this should produce spectra that are constant and have a DN value equal to the width of the aperture. We obtained what we expected from our own code, but obtained something different with dohydra. The values of the dohydra-extracted unity image are close to what we expect, but there are small differences in the aperture size (of order 1e-5) and the aperture width has high-frequency variations that are presumably due to numerical error. The difference is very small and, therefore, is not likely an issue; however, it is telling of a more sophisticated extraction algorithm than our simple fractional pixel extraction.In the second test we have compared flat-field spectra extracted from our code and from dohydra. Here we find that the dohydra extraction produces counts that are 8-10% higher than our own counts.One issue may be the indexing of the pixels by the aperture. I found this post:https://iraf.net/phpBB2/viewtopic.php?t=84348&highlight=subpixel+extractionand tried to account for the different pixel indexing in our code, but the extractions were still significantly different for the flat-field spectra.If you would like to see the images from any of these tests, I'd be happy to pass them along.So (finally) my questions are: (1) Can you simply reiterate how apsum indexes the pixels in the aperture definition found in the database/ap* files? I think I understand from the previous post, but it would be helpful to have it restated.(2) What does the apsum extraction algorithm actually do? I had a look at the source code and it seems like it is doing some interpolation across neighboring pixels to get the sub-pixel weight. However, to determine exactly what was happening would have required a significant time investment that would be unnecessary for someone familiar with the code.(3) Is there a similar weighting scheme employed by dispcor to resample data to linear (or log-linear) steps in wavelength, or is it a simple flux conservation algorithm?Just to reiterate: In order to calculate an accurate error spectrum, we need to know the exact weighting of subpixels in all resampling of our data. These resamplings occur near the edges of the apsum extraction aperture and in linearization of the spectra. Currently, our own implementation of the aperture extraction algorithm as reproduced from the apextract documentation does not sufficiently reproduce the subpixel weights.Thank you in advance for any help,
Kyle

 
Profile Email
 Quote
   
Content generated in: 0.04 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login