pydl.pydlutils.trace.xy2traceset(xpos, ypos, **kwargs)[source]

Convert from x,y positions to a trace set.

xpos, yposarray-like

X,Y positions corresponding as [nx,Ntrace] arrays.

invvararray-like, optional

Inverse variances for fitting.

funcstr, optional

Function type for fitting; defaults to ‘legendre’.

ncoeffint, optional

Number of coefficients to fit. Defaults to 3.

xmin, xmaxfloat, optional

Explicitly set minimum and maximum values, instead of computing them from xpos.

maxiterint, optional

Maximum number of rejection iterations; set to 0 for no rejection; default to 10.

inmaskarray-like, optional

Mask set to 1 for good points and 0 for rejected points; same dimensions as xpos, ypos. Points rejected by inmask are always rejected from the fits (the rejection is “sticky”), and will also be marked as rejected in the outmask attribute.

ia, inputans, inputfuncarray-like, optional

These arguments will be passed to func_fit().

xjumplofloat, optional

x position locating start of an x discontinuity

xjumphifloat, optional

x position locating end of that x discontinuity

xjumpvalfloat, optional

magnitude of the discontinuity “jump” between those bounds (previous 3 keywords motivated by BOSS 2-phase readout)


A TraceSet object.