xy2traceset¶
-
pydl.pydlutils.trace.
xy2traceset
(xpos, ypos, **kwargs)[source]¶ Convert from x,y positions to a trace set.
Parameters: xpos, ypos : array-like
X,Y positions corresponding as [nx,Ntrace] arrays.
invvar : array-like, optional
Inverse variances for fitting.
func :
str
, optionalFunction type for fitting; defaults to ‘legendre’.
ncoeff :
int
, optionalNumber of coefficients to fit. Defaults to 3.
xmin, xmax :
float
, optionalExplicitly set minimum and maximum values, instead of computing them from
xpos
.maxiter :
int
, optionalMaximum number of rejection iterations; set to 0 for no rejection; default to 10.
inmask : array-like, optional
Mask set to 1 for good points and 0 for rejected points; same dimensions as
xpos
,ypos
. Points rejected byinmask
are always rejected from the fits (the rejection is “sticky”), and will also be marked as rejected in the outmask attribute.ia, inputans, inputfunc : array-like, optional
These arguments will be passed to
func_fit()
.xjumplo :
float
, optionalx position locating start of an x discontinuity
xjumphi :
float
, optionalx position locating end of that x discontinuity
xjumpval :
float
, optionalmagnitude of the discontinuity “jump” between those bounds (previous 3 keywords motivated by BOSS 2-phase readout)
Returns: A
TraceSet
object.