line_trace

pydis.line_trace(img, pcent, wcent, fmask=(1, ), maxbend=10, display=False)[source]

Trace the lines of constant wavelength along the spatial dimension.

To be run after peaks found in the HeNeAr lamp. Usually run internally to HeNeAr_fit()

Method works by tracing up and down from the image center (slice) along each HeNeAr line by 1 pixel, fitting a gaussian to find the center.

Parameters
img2d float

the HeNeAr data

pcentfloat array

the pixel center along the image slice of each HeNeAr line to trace

wcentfloat array

the identified wavelength that corresponds to each peak’s pixel center (pcent)

fmaskfloat array, optional

the illumination section to trace trace over in spatial dimension

maxbendint, optional

How big of a width (in pixel units) to allow the bend in the HeNeAr line to search over (Default is 10). Probably doesn’t need to be modified much.

displaybool, optional

should we display plot after? (Default is False)

Returns
xcent, ycent, wcent
These are the arrays of X pixel (wavelength dimension), Y pixel
(spatial dimension), and corresponding wavelengths of each HeNeAr line.