set bend magnetic field

        :param x: new bend field to be assigned, [T]
        :return: None
496232
def setBendField(self, x):
        
        if x != self.bend_field:
            self.bend_field = x
            self.refresh = True
1206606
def _bend_angle_low(a, b, deriv):
    """"""
    result = _bend_cos_low(a, b, deriv)
    return _cos_to_angle(result, deriv)
473139
def configure(self, x0, axis):
        
        self.x0 = x0
        self.axis = axis
984405
public void setPosition(int x,int y) {
		int cx = (xoffset.getMin() + xoffset.getMax()) / 2;
		int cy = (yoffset.getMin() + yoffset.getMax()) / 2;
		
		int dx = x - cx;
		int dy = y - cy;
		
		xoffset.setMin(xoffset.getMin() + dx);
		xoffset.setMax(xoffset.getMax() + dx);
		yoffset.setMin(yoffset.getMin() + dy);
		yoffset.setMax(yoffset.getMax() + dy);
		
		xoffset.fireUpdated(null);
		yoffset.fireUpdated(null);
	}
989220
def _set_initial_x(self):
        

        return np.random.random(self._data_shape).astype(self._data_type)
427539
def _set_toChange(x):
        
        for key in list(x.keys()):
            self.toChange[key] = True
459505
def x(self, position=None):
        """"""
        p = self.GetPosition()
        if position is None:
            return p[0]
        self.SetPosition(position, p[1], p[2])
        if self.trail:
            self.updateTrail()
        return self
544424
def setxy(self):
        
        self._edge_inverter()
        self._detect_alignment_conflicts()
        inf = float('infinity')
        # initialize vertex coordinates attributes:
        for l in self.layers:
            for v in l:
                self.grx[v].root  = v
                self.grx[v].align = v
                self.grx[v].sink  = v
                self.grx[v].shift = inf
                self.grx[v].X     = None
                self.grx[v].x     = [0.0]*4
        curvh = self.dirvh # save current dirvh value
        for dirvh in xrange(4):
            self.dirvh = dirvh
            self._coord_vertical_alignment()
            self._coord_horizontal_compact()
        self.dirvh = curvh # restore it
        # vertical coordinate assigment of all nodes:
        Y = 0
        for l in self.layers:
            dY = max([v.view.h/2. for v in l])
            for v in l:
                vx = sorted(self.grx[v].x)
                # mean of the 2 medians out of the 4 x-coord computed above:
                avgm = (vx[1]+vx[2])/2.
                # final xy-coordinates :
                v.view.xy = (avgm,Y+dY)
            Y += 2*dY+self.yspace
        self._edge_inverter()
383548
def set_param(self, idx):
        

        self.modifier.set_param(self.format[self.param_begin:idx])
1214382
def _line_shift(x:Tensor, mask:bool=False):
    ""
    bs,nh,n,p = x.size()
    x_pad = torch.cat([x.new_zeros(bs,nh,n,1), x], dim=3)
    x_shift = x_pad.view(bs,nh,p + 1,n)[:,:,1:].view_as(x)
    if mask: x_shift.mul_(torch.tril(x.new_ones(n,p), p-n)[None,None,])
    return x_shift
460586
public void setKnotPosition(int n, int x) {
		xKnots[n] = PixelUtils.clamp(x);
		sortKnots();
		rebuildGradient();
	}
1352926
public AddBrownPtoN_F32 setDistortion( /**/double[] radial, /**/double t1, /**/double t2) {
		params = new RadialTangential_F32(radial, t1, t2);
		return this;
	}
1032956
def setVerCrossPlotAutoRangeOn(self, axisNumber):
        
        setXYAxesAutoRangeOn(self, self.verCrossPlotRangeCti, self.yAxisRangeCti, axisNumber)
150748
def loopangle(c1: Dict[str, Any]) -> xarray.Dataset:
    
    angles = np.atleast_1d(c1['angle'])
    TR = xarray.Dataset(coords={'wavelength_nm': None, 'angle_deg': angles})

    for a in angles:
        c = c1.copy()
        c['angle'] = a
        TR = TR.merge(golowtran(c))

    return TR
1007436
def setAutoRangeOn(self, axisNumber):
        
        setXYAxesAutoRangeOn(self, self.xAxisRangeCti, self.yAxisRangeCti, axisNumber)
14338
public void setAxisValue(int axis, float value) {
        switch (axis) {
            case AXIS_X:
                x = value;
                break;
            case AXIS_Y:
                y = value;
                break;
            case AXIS_PRESSURE:
                pressure = value;
                break;
            case AXIS_SIZE:
                size = value;
                break;
            case AXIS_TOUCH_MAJOR:
                touchMajor = value;
                break;
            case AXIS_TOUCH_MINOR:
                touchMinor = value;
                break;
            case AXIS_TOOL_MAJOR:
                toolMajor = value;
                break;
            case AXIS_TOOL_MINOR:
                toolMinor = value;
                break;
            case AXIS_ORIENTATION:
                orientation = value;
                break;
            default: {
                if (axis < 0 || axis > 63) {
                    throw new IllegalArgumentException("Axis out of range.");
                }
                final long bits = mPackedAxisBits;
                final long axisBit = 1L << axis;
                final int index = Long.bitCount(bits & (axisBit - 1L));
                float[] values = mPackedAxisValues;
                if ((bits & axisBit) == 0) {
                    if (values == null) {
                        values = new float[INITIAL_PACKED_AXIS_VALUES];
                        mPackedAxisValues = values;
                    } else {
                        final int count = Long.bitCount(bits);
                        if (count < values.length) {
                            if (index != count) {
                                System.arraycopy(values, index, values, index + 1,
                                        count - index);
                            }
                        } else {
                            float[] newValues = new float[count * 2];
                            System.arraycopy(values, 0, newValues, 0, index);
                            System.arraycopy(values, index, newValues, index + 1,
                                    count - index);
                            values = newValues;
                            mPackedAxisValues = values;
                        }
                    }
                    mPackedAxisBits = bits | axisBit;
                }
                values[index] = value;
            }
        }
    }
46044
def moveToPoint(self, xxx_todo_changeme1):
        
        (x,y) = xxx_todo_changeme1
        self.set_cx(float(self.get_cx()) + float(x))
        self.set_cy(float(self.get_cy()) + float(y))