normalize

pydis.normalize(wave, flux, mode='poly', order=5)[source]

Return a flattened, normalized spectrum. A model spectrum is made of the continuum by fitting either a polynomial or spline to the data, and then the data is normalized with the equation:

>>> norm = (flux - model) / model  
Parameters
wave1-d array

The object’s wavelength array

flux1-d array

The object’s flux array

modestr, optional

Decides which mode should be used to flatten the spectrum. Options are ‘poly’ (Default), ‘spline’, ‘interac’.

orderint, optional

The polynomial order to use for mode=’poly’. (Default is 3)

Returns
Flux normalized spectrum at same wavelength points as the input