xy2traceset¶
- pydl.pydlutils.trace.xy2traceset(xpos, ypos, **kwargs)[source]¶
Convert from x,y positions to a trace set.
- Parameters:
- xpos, yposarray-like
X,Y positions corresponding as [nx,Ntrace] arrays.
- invvararray-like, optional
Inverse variances for fitting.
- func
str
, optional Function type for fitting; defaults to ‘legendre’.
- ncoeff
int
, optional Number of coefficients to fit. Defaults to 3.
- xmin, xmax
float
, optional Explicitly set minimum and maximum values, instead of computing them from
xpos
.- maxiter
int
, 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 byinmask
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()
.- xjumplo
float
, optional x position locating start of an x discontinuity
- xjumphi
float
, optional x position locating end of that x discontinuity
- xjumpval
float
, optional magnitude of the discontinuity “jump” between those bounds (previous 3 keywords motivated by BOSS 2-phase readout)
- Returns: