Skip to content
K Sriram edited this page Nov 22, 2018 · 6 revisions

This page is for expanded discussion and brainstorming of functionality for Echelle spectra, as discussed in this issue. Right now this page is mostly a copy and paste of the aforementioned thread, but I will soon shape it into a cohesive document (iancze).

Proposed Formats

  1. Subclass Spectrum1D to make a Spetrum1DEchelle
  2. use a list of Spectrum1D objects
  3. Use a Spectrum1D object with a 2D flux and wavelength array

(2) duplicates the meta information (the meta field, which in most cases will hold information ffrom the fits header and the units of the dispersion and the flux). I often want to do things that affect all spectra in the list, e.g. change the units of the flux (if they were not set properly by the reader), change the name of the object (e.g. from HD 1234 to AA Lup), recalculate the airmass. Thus, it seems natural for me to hold that info in the same object.

(1) The name of the object already says what's in there. Could add methods for merging echelle orders.

(3) Is almost like one (you get individual orders as spec.array[3,:]) but requires no new programming at this point.

Question: With (3), will there ever be a use case where all echelle orders are not guaranteed to be the same length (ie, a ragged array)? @ksri91: There are cases where all echelle orders are not the same length.

@andycasey: (2) has the disadvantage that all of the items in the list need to have the same metadata, and if there are any changes needing to be made to that metadata then they likely need to be made for every item in the list.

@hamogu the class could be called Spectrum1DEchelle, which is almost identical to Spectrum1D except that it has flux and disp as 2D arrays. Then Spectrum1D can test in the initialization that input arrays are 1D - I think that is important to catch many common types of input error.

The user would access a single order as my_echelle.disp[0, :].

Reading

@wkerzendorf For a 2D-echlle spectrum one just needs to write a WCS that uses the row to know which 1D wcs solution to pick and then evaluate the right column pixel.

Tools

  • Combining orders (flatten a many-order spectrum into a single 1D Spectrum)
  • Fitting and removing blaze function

(@wkerzendorf) "coadding, shifting, crossmatching of spectra is at the moment limited by our interpolation capacity. Interpolation is intricately linked with WCS and the main part missing to do a good general interpolation is a description of the pixel reference frame."

  • More generally, is there any insurance that resample/rebinning routines properly Nyquist sample the spectra? How about convolution with an instrumental kernel.

Pipeline

  • Extracting spectra from raw data

Algorithms

Writing tools