pyhrs:docs

fit_order

pyhrs.fit_order(data, detect_kernal, xc, order=3, ratio=0.5)[source] [edit on github]

Given an array and an overlapping detect_kernal, determine two polynomials that would outline the top and bottom of the order

Parameters:

data: ~numpy.ndarray

Image of the orders

detect_kernal: ~numpy.ndarray

An array aligned with data that has the approximate outline of the order. The data shoud have a value of one for where the order is.

xc: int

x-position to determine the width of the order

order: int

Order to use for the polynomial fit.

ratio: float

Limit at which to determine an order. It is the ratio of the flux in the pixle to the flux at the peak.

Returns:

y_l: Polynomial1D

A polynomial that outlines the bottom of the order

y_u: Polynomial1D

A polynomial that outlines the top of the order

Page Contents