HRS notes

These are my notes (mostly to remind me of the method I roughed out with Chris Schwaab) for reducing HRS HS-mode data.

I hope that these are useful in saving time for others looking at HRS data for the first time.

Eventually I will upload code and arc atlases, etc. [The “turquoise” filter used to balance the ThAr lamps is going to change after these SV Data, so I don’t want to make arc atlases yet as the line ratios will change again…]

NOTES: Some SV logs are on this secret webpage (instead of the nightlog!): https://sciencewiki.salt.ac.za/index.php/HRS_Commissioning

Overview of whole reduction procedure so far.

  • Each arm produces one separate FITS file. red is R*fits, blue is H*fits
  • Each CCD consists of two amps with different gains/bias levels ALREADY PASTED TOGETHER. Therefore correction of each amp separately is necessary.

I’m only concerned with WLC for the moment, so I just do line-by-line overscan (on each half) to bring the zeropoint levels into agreement. should check gains and scale to electrons later

 

Test reduction in here: /home/gilbank/Proj/exoplanet/HRS/2013-2-RSA_HET-001.20131114/raw/

 

Various routines to map, attempt to WLC and extract spectra:

Reduction steps

Echelle order tracing

  • I’ve tried two (relatively simple) approaches to trace orders. One is a shift and subtract (poor man’s Laplacian?) edge-finder (in qhrs.py). This works well, but misses one prominent order (see below). May work better on flats than science frame? Traces are written as polynomials (default: cubic) to .npz files (Red.npz, Blue.npz)

Bords Rords

 

The other finds peaks/edges across middle column of detector and made a database with the locations. I can’t seem to find this code. It may have also involved IRAF database files… Anyway, I should make one good database for each arm and keep them fixed (or allow small shifts).

 

NOTE: HRS chips need to be flipped in x for wavelength +ve to run in x +ve direction.

 

WLC (ThAr)

I ‘ve used IRAF .ec.fits WLCs on ThAr done by Maciej Konacki (provided by Luke Tyas) as a starting point for WLC. They are close, but need to be refined for my extractions. I’ve written some little (dumb) bits of code to attempt to refine these to my data (e.g. qwlc.py) but due to differences between his IRAF WAT solutions and mine, it’s not straightforward to avoid two different sets of cubic distortions. Best to start fresh from raw pixel coords.

 

For testing pusposes, I selected one order from the Blue arm (ZZZ) and calibrated with identify in IRAF. This solution was then exported with wspectext and applied to my other extractions.

 

Check of Konacki’s solutions showing each order in different colour:

konacki_red konacki_blue

 

Rectification

This (and other tests suggested by Chris) are done in qchris.py. This code also does a dumb rectification. The above curve tracing is reduced to a rectangular spectrum by simply shifting in y to make the bottom of each column level.

Useful info from Chris: due to the design of HRS (placement of cross-disperser) the line tilt should be constant across all orders (modulo camera distortions at edges?). I fitted a tilt of 0.1 pixels/pixel. To simply rectify this, qchris.py block replicates 10 times in spectral direction and shifts each successive row by one more pixel. This produces a pseudo-rectified spectrum:

rect2d

The improvement caused by this sub-pixel dithering is easily seen in 1D:

rect1d

This procedure is still not optimal (it’s really 1D + 1D fitting rather than true 2D modelling. Also, no noise-based weighting yet), but not a bad start.

Note also this problem (which happens occasionally on some extractions) due to not-quite-flux-conservation:

hrs_rect_problem

Also, to examine the “slit function” as a function of position:

slitfn

Summing the left, middle and right ~1/3s of the order. The 3 bumps show the three slices of the HRS image slicer. It can be seen that the relative ratios change as a function of wavelength.

Iodine cell

Using ThAr calibration and same slit extraction as reference, this is a zoom of small section of B-star(s) + I2 compared with a (smoothed) version of FTS scan of UVES iodine cell

fixed_i2_uves

There were small shifts necessary including a 1.4A shift between ThAr calib and I2 scan (provided by Chris see: /home/gilbank/Proj/exoplanet/HRS/atlas/)

The idea is to take the original (v high resolution) FTS scan of the iodine cell and find the LSF kernel needed to fit the observed iodine absorption (probably by breaking the spectrum into chunks). This should really be done fully in 2D including the full spatial information (1D PSF), which then reduces to a problem like galaxy morphology fitting! 2D image of (ThAr) line:

ds9-2Dline

NOTE: the three separate components in the spatial direction (seen as three different continua in flats, etc.) are the three elements of the image slicer used in the higher-res modes.

Other misc notes

– Chris has been checking on how CCD was oriented wrt grating, etc. It has been mechanically aligned so that the cross-dispersion direction is parallel to the CCD columns (for N&S!).
– I tried to measure the dispersion direction wrt CCD rows (which isn’t necessarily perpendicular to cross-dispersion direction). I didn’t quite do this correctly, but should be near enough. (Should have measured repeated lines in adjacent orders, SAME DISTANCE FROM LAMBDA_BLAZE). Lambda_blaze can be (approximately)  found from peak response of flat. FSR can be found where flux falls to half that at lambda_blaze (not q right due to anamorphic magnification). I found tilt is <1 degree. Knowledge of dispersion direction is important to derive the coordinate system one wishes to transform to when doing the 2D modelling (a la Kelson 2003).
 

DECONVOLVED STELLAR TEMPLATE

Need observation of science target WITHOUT iodine. Ideally book-ended by B-star with iodine. For now, could use the sim. ThAr obs to get the spec. w/o iodine. (also just B-star at one end is prob fine).