Skip to content

Spectrum 1D concept & issues

wkerzendorf edited this page Feb 28, 2012 · 17 revisions

Spectrum1D API concepts and issues

Implementation questions

Instantiator

  • two main suggestions: instantiation with a flux & a dispersion array OR a flux array and a WCS object

  • suggested WCS implementation:

https://github.com/wkerzendorf/specutils/blob/specio/specutils/io/io_utils.py

https://github.com/wkerzendorf/specutils/blob/specwcs/specutils/specwcs/specwcs.py

Slicing

  • slicing can work on either dispersion or pixels

  • keyword to switch between both of them

  • getitem overload?

arithmetic

  • operator overload?

if operator overload

  • what operands allowed? scalars, spectrum same dispersion, spectrum different dispersion
  • op-mode setting in spectrum1d

interpolator

  • for now simple np.interp?
  • thinking about interpolation using wcs?

API questions

Copy vs inplace

  • meta data copy -- time intensive?

  • pythonic to do copy?

methods vs functions

  • when to use functions, when spectrum1d internal methods.

  • argument plotting

  • argument io

Issues outside the Spectrum1D discussion

Error

Mask

Clone this wiki locally