envelope¶
- tayph.envelope(wlm, fxm, binsize, selfrac=0.05, mode='top', threshold='')[source] [edit on github]¶
This routine measures the top or bottom envelope of a spectrum (wl,fx), by chopping it up into bins of size binsze (unit of wl), and measuring the mean of the top n-% of values in that bin. Setting the mode to ‘bottom’ will do the oppiste: The mean of the bottom n-% of values. The output is the resulting wl and flux points of these bins.
- Parameters
- wlmnp.ndarray
The wavelength axis.
- fxmnp.ndarray
The flux axis.
- binsizeint, float
The width of the bin within which to measure the continuum, in units of wavelength.
- selfrac: float
The top fraction of values in each bin to be used to measure the continuum. Default 0.05.
- modestr
The direction in which the envelope is measured. Can be set to “top” or “bottom”. Default “top”.
- Returns
- wlenp.array
The wavelength points associated with the envelope.
- fxenp.array
The corresponding flux points describing the envelope.