The MARVELS Pipelines
The various processing steps utilized to create the DR12 and DR11 data sets are listed in a table below, so that the features of the two reductions may be compared. Note that the processing steps may not necessarily occur in the order shown in the table. the order in which the processing steps are executed on a typical science image is described below.
DR12: Typical order of processing
- Bias subtraction
- Image Trimming
- Cosmic Ray removal
- Trace correction
- Deslant correction
- Collapse to 1D
- Determine the observation to be used as template based on overall highest flux in series
- Find instrumental drift
- Find stellar drift
- RV extraction
- Misplug & dead fiber rejection
- Sift for planets
DR11: Typical order of processing
- Bias subtraction
- Flat-fielding (not activated due to residuals in flat field)
- Initial (rough) image trimming
- Cosmic ray rejection (not activated due to residuals left by cleaning routine)
- Trace correction
- Deslant correction with simultaneous wavelength solution
- Illumination correction
- Horizontal spatial filtering (interferometer comb removal)
- Whirl creation, accounting for optical distortion along the slit direction (collapse spectrum to 1D, but record fringe phase information as a function of wavelength in addition to flux)
- Instrumental drift calculation
- Stellar shift calculation
- RV extraction
Processing Steps
Processing step | DR11 implementation | DR12 implementation |
---|---|---|
Bias Subtraction | Subtracted using a single master bias from MJD=55165. | Subtracted using a bias created from a median combination of the nearest nine (in time) available bias frames. |
Pixel-to-pixel flatfielding | Not activated (although available in pipeline) because the master flatfields contain residual interferometer fringe patterns that harm the data being flatfielded. | Not activated. |
Image trimming | The regions where the 120 individual spectra lie on each exposure were originally adjusted by hand. The pipeline used the regions to cut out and save each individual spectrum from each exposure, with a generous initial margin to ensure the majority of the light was saved. Later, just before extracting each spectrum to 1-D, the spectra are trimmed again to discard the low-flux regions at the top and bottom edges of the spectrograph slit image. | The left and right edges are trimmed by 50 pixels to avoid the sudden drop in flux at the edge of the spectral illumination prior to the CCD edge. The top and bottom of each of the 120 spectra are trimmed according to a generous margin determined manually. These same preset trim borders are used for all spectra at a given beam location. Some of the adjacent spectra are also included since it is impossible to trim a spectra using a rectangle due to the slope of the spectra in the y-direction as a function of x-location (trace). The flux from adjacent spectra is removed when the trimmed spectra is further corrected. |
Trace Correction | For each pixel along the dispersion direction, a slice of the 2-D master trace calibration spectrum (a no-fringe tungsten lamp exposure, TUNGNF) is extracted. We record the pixel positions where the flux in the slice falls to 10% of the maximum flux in the slice (interpolated to fractional pixel position). This 10% flux level defines the initial boundaries of the trace. For each slice, the location of the centre point between the boundaries is computed. This defines the master trace. For all other exposures, the master trace is used to shift the slices using a sinc-shift algorithm until the trace centre points are aligned horizontally in the 2-D spectrum. | The trace for each beam location is found using a TIO image created by adding many individual TIO exposures at each beam location. The TIO provides a bright and full illumination of the underlying spectral shape. For each pixel along the dispersion direction, initial top and bottom boundaries of the spectra are determined by finding the minimum in flux when approaching the adjacent spectra, which are partially included in each trim operation. The flux centroid is then found along the dispersion direction by finding the sub-pixel location where flux is divided evenly between the borders. After smoothing, this trace of the centroid provides the solution by which each column needs to be shifted to provide a horizontal spectra. The top and bottom regions are then finally cut again such that no region is included beyond the previously determine flux valley towards a neighbor. This master solution is uniformly applied to all stellar and TIO spectra for the given location. |
Deslant Correction | A master thorium-argon lamp exposure is chosen (with fringes, because the slant of the no-fringe spectra is significantly different). Using a previously hand-produced line identification on the middle row of the spectrum, the lines on all other rows are automatically reidentified. The resulting 2-D array of wavelengths as a function of position is fitted by a 2-D polynomial surface in order to provide interpolated wavelength values for all pixels on the image. The parameters of the 2-D polynomial surface are used to interpolate the flux values along regularly spaced contours of constant wavelength. The flux values along constant wavelength contours are written out as the deslanted 2-D spectrum (all pixels with the same x-coordinates have the same wavelength). | The deslant correction is based on the observed feature distortions in stellar spectra. A master stellar template is created for each beam location by adding multiple observations to avoid complications from fringe patterns. The brightest overall row is used as the template and each of the other rows is aligned to it. This is done in a series of boxes in the dispersion direction because the slant varies in both x and y. This process proceeds outward from the center until the flux is too low to attain a reliable alignment. The result is a 2-D surface that defines the required x-shift at any location. The top and bottom edges where no solution was obtainable are discarded. |
Illumination Correction | In DR11, the illumination correction step normalizes the spectrum as a by-product of the process. For each row along the slit, a continuum fit is performed to the spectrum on that row, using a low order (~6th degree) polynomial. The polynomial fit is weighted, in an attempt to trace the true continuum level of the spectrum without being pulled down into stellar absorption lines. Each row is then divided by its continuum fit, which causes the entire 2-D spectrum to be normalized. In the resulting 2-D spectrum, at any position, the continuum level is equal to 1. The original photon counts per pixel are saved in a separate file for use in weighting in later steps. | Not Included |
Dead Fiber Detection | Not implemented. | Dead fibers are detected through an analysis of the computed RV for each chunk of the stellar spectra in a given observation. The spectra is broken into 34, 100-pixel chunks during processing. The RV for each of these chunks should be consistent with the others to within the errors dictated by the photon limits of that chunk and instrument systematics. But in the case of a dead fiber the results for each chunk are based entirely on noise and will be unrelated. If the variation among chunks is such that the overall precision of the entire measurement is larger than 1000 m/s then the observation is declared dead. |
Cosmic Ray Rejection | Not used (experimentation showed the lacosmic routine left artifacts too large to be acceptable; cosmic rays are instead handled by outlier rejection at a later stage). | Cosmic rays are rejected from each stellar spectra after trimming but prior to trace and deslant. Outliers are identified based on an algorithm which analyzes the deviation from the continuum and also adapts its thresholds based on spectral feature knowledge obtained from adjacent areas. Calibration spectra are not processed due to their stronger intensity and shorter exposure times. |
Horizontal Spatial Filtering | The 2-D spectrum is low-pass filtered in the horizontal direction to remove the high-frequency pattern of diagonal fringes caused by the interferometer, leaving only the low-frequency pattern of intersections between the diagonal fringes and the stellar lines. | Not necessary in DR12 |
Collapse to 1D | This process is named "whirl creation" in DR12. For each wavelength, a slice of the 2-D spectrum at that wavelength is extracted. The fluxes along the slice are modelled by a sinusoidal fit (with a choice of modifying the fit by a distortion model to account for any optical distortions along the slit direction). The sum of the fluxes along the slice is recorded as the 1-D spectrum, but the sinusoidal fit parameters are also recorded alongside the fluxes. Because the collapsed spectrum contains both the 1-D collapsed spectrum and the sinusoidal fits, it is named a "whirl". | The deslanted 2D spectra is simply collapsed to 1D by summing the flux in each column. |
Find Instrumental Drift | The instrumental drift is parametrized by doing RV extraction of a calibration lamp exposure with fringes, relative to a reference epoch. (Note that this attempts to express all changes in the instrument by a single parameter, which does not fully capture the complex nature of the changes across the chip; DR12 has a more sophisticated treatment of the drift.) The DR11 reduction used the tungsten lamp shining through a temperature-stabilized iodine gas cell ("TIO" lamp source) as the calibration, and the reference epoch was on MJD 55165. Since the calibration lamp has a true RV of zero, the measured RV is taken to be the correction for instrumental drift. | The instrument drift is characterized by determining the shift of the "TIO" spectra which bracket the stellar observation. A reference day is first established for a field based on the highest stellar flux observation. The shift between each other TIO spectra is determined relative the reference. The two spectra are broken into the same 100-pixel chunks and the shift between each chunk is found through a least squares alignment. The instrument drift is therefore determined as a function of the dispersion direction. |
Find Stellar Shifts | The stellar RV is found first by doing RV extraction of the current stellar exposure in comparison to the exposure of the star taken at the template epoch. We also account for the barycentric correction during the RV extraction routine, ensuring that the chi-squared minimizer does not need to search as far in velocity space as it would if Earth’s motion were not removed. This produces raw stellar RV's. We interpolate an RV correction for instrumental drift, computed from the TIO calibration source before and after each stellar exposure, and these RV corrections are subtracted from each stellar RV measurement. | The pixel shift of each stellar spectra is found relative to the same template date used for the instrument drift process. The same pixel chunks and least squares alignment algorithm used with calibration are used here as well. The TIO shifts are directly subtracted from these values to calibrate the stellar results. These corrected shifts are converted into RV by using a predetermined wavelength solution which is unique for each beam. The barycentric velocity for each observation is subtracted to yield the stellar RV relative to the reference epoch. The entire RV curve is then adjusted to a mean of zero. |
RV Extraction | We use chi-squared minimization to determine the best-fit velocity shift for each epoch, relative to a template spectrum chosen to be the brightest one from the epochs that were observed. Specifically, we determine the best-fit velocity shift that minimizes the shift of the spectrum along the wavelength and slit axes, relative to the template spectrum. | The final RV calculation is based on a mean of the individual chunks. Outlier chunks are rejected and the remaining are weighted according to their individual photon limits to produce the final, single RV number presented for each observation. |
Misplug Rejection | Not implemented. | When a fiber is accidentally switched with another (misplug) the observed spectra in a series will actually be from a different star than the rest. The computed RV for a misplug will usually be quite extreme since different stars generally have quite different absolute velocities, and because the computed RV is relative to a reference epoch in the series. A misplug is generally observed over 2 or 3 subsequent observations and the matching misplug will be observed to have nearly opposite outliers at the same times. Misplugs are identified and masked by scanning the RV results for an entire plate for large outliers with roughly matching but inverted results in another star. |