pyhrs:docs

match_lines

pyhrs.match_lines(xarr, farr, sw, sf, ws, rw=5, npoints=20, xlimit=1.0, slimit=1.0, wlimit=1.0)[source] [edit on github]

Match lines in the spectra with specific wavleengths

Match lines works by finding the closest peak based on the x-position transformed by ws that is within wlimit of a known line.

Parameters:

xarr: numpy.ndarray

pixel positions

farr: numpy.ndarray

flux values at xarr positions

sw: numpy.ndarray

wavelengths of known arc lines

sf: numpy.ndarray

relative fluxes at those wavelengths

ws: function

Function converting xarr into wavelengths. It should be defined such that wavelength = ws(xarr)

rw: float

Radius around peak to extract for fitting the center

npoints: int

The maximum number of points to bright points to fit.

xlimit: float

Maximum shift in line centroid when fitting

slimit: float

Minimum scale for line when fitting

wlimit: float

Minimum separation in wavelength between peak and line

Returns:

mx: numpy.ndarray

x-position for matched lines

mw: numpy.ndarray

Wavelength position for matched lines

Page Contents