Set the position of the source.

        Parameters
        ----------
        skydir : `~astropy.coordinates.SkyCoord`
482000
def set_position(self, skydir):
        

        if not isinstance(skydir, SkyCoord):
            skydir = SkyCoord(ra=skydir[0], dec=skydir[1], unit=u.deg)

        if not skydir.isscalar:
            skydir = np.ravel(skydir)[0]

        radec = np.array([skydir.icrs.ra.deg, skydir.icrs.dec.deg])
        self._set_radec(radec)
413107
def set_position(self, decl_pos):
        """"""
        if decl_pos["typehint"] == "LineSourcePosition":
            self.editor.set_cursor(decl_pos['line'], 0)
        else:  # OffsetSourcePosition
            point = decl_pos["offset"]
            row, col = self.editor.point2pos(point + 1)
            self.editor.set_cursor(row, col)
720806
def reset_coord(self):
        
        (x, y, idx) = self.world2pix(self.init_skycoord.ra,
                                     self.init_skycoord.dec,
                                     usepv=True)
        self.update_pixel_location((x, y), idx)
300912
def cmd_set_origin(self, args):
        ''''''
        (lat, lon) = (self.click_position[0], self.click_position[1])
        alt = self.ElevationMap.GetElevation(lat, lon)
        print("Setting origin to: ", lat, lon, alt)
        self.master.mav.set_gps_global_origin_send(
            self.settings.target_system,
            lat*10000000, # lat
            lon*10000000, # lon
            alt*1000)
142732
public void setPosition(Coordinate position) {
		if (getOriginalLocation() != null) {
			Bbox oldBounds = (Bbox) getOriginalLocation();
			Bbox newBounds = (Bbox) oldBounds.clone();
			newBounds.setCenterPoint(position);
			setOriginalLocation(newBounds);
		} else {
			setOriginalLocation(new Bbox(position.getX(), position.getY(), 0, 0));
		}
	}
831761
def _set_pos(self, pos):
        
        if self._canvas.height < self._max_height:
            pos *= self._max_height - self._canvas.height + 1
            pos = int(round(max(0, pos), 0))
            self._canvas.scroll_to(pos)
981137
def set_last_position(self, last_position):
        
        last_position = last_position or {}
        last_position.setdefault('readed_streams', [])
        last_position.setdefault('stream_offset', {})
        self.last_position = last_position
628755
public void setSrcdir(Path srcDir) {
    if (_src == null) {
      _src = srcDir;
    } else {
      _src.append(srcDir);
    }
  }
1331287
public synchronized Position goTo( Double lon, Double lat, Double elev, Double azimuth, boolean animate ) {
        View view = getWwd().getView();
        view.stopAnimations();
        view.stopMovement();

        Position eyePosition;
        if (lon == null || lat == null) {
            Position currentEyePosition = wwd.getView().getCurrentEyePosition();
            if (currentEyePosition != null) {
                lat = currentEyePosition.latitude.degrees;
                lon = currentEyePosition.longitude.degrees;
            } else {
                return null;
            }
        }

        if (elev == null) {
            // use the current
            elev = wwd.getView().getCurrentEyePosition().getAltitude();
        }
        if (Double.isNaN(elev)) {
            if (!Double.isNaN(lastElevation)) {
                elev = lastElevation;
            } else {
                elev = NwwUtilities.DEFAULT_ELEV;
            }
        }
        eyePosition = NwwUtilities.toPosition(lat, lon, elev);
        if (animate) {
            view.goTo(eyePosition, elev);
        } else {
            view.setEyePosition(eyePosition);
        }
        if (azimuth != null) {
            Angle heading = Angle.fromDegrees(azimuth);
            view.setHeading(heading);
        }
        lastElevation = elev;
        return eyePosition;
    }
1273842
def set_location(self, place, latitude, longitude, pipe=None):
        
        pipe = self.redis if pipe is None else pipe
        pipe.geoadd(self.key, longitude, latitude, self._pickle(place))
356002
def set_position(cls, resource_id, to_position, db_session=None, *args, **kwargs):
        
        db_session = get_db_session(db_session)
        # lets lock rows to prevent bad tree states
        resource = ResourceService.lock_resource_for_update(
            resource_id=resource_id, db_session=db_session
        )
        cls.check_node_position(
            resource.parent_id, to_position, on_same_branch=True, db_session=db_session
        )
        cls.shift_ordering_up(resource.parent_id, to_position, db_session=db_session)
        db_session.flush()
        db_session.expire(resource)
        resource.ordering = to_position
        return True
582034
async def set_position(self, position, wait_for_completion=True):
        
        command_send = CommandSend(
            pyvlx=self.pyvlx,
            wait_for_completion=wait_for_completion,
            node_id=self.node_id,
            parameter=position)
        await command_send.do_api_call()
        if not command_send.success:
            raise PyVLXException("Unable to send command")
        await self.after_update()
370073
def cmd_set_originpos(self, args):
        ''''''
        (lat, lon) = (self.click_position[0], self.click_position[1])
        print("Setting origin to: ", lat, lon)
        self.master.mav.set_gps_global_origin_send(
            self.settings.target_system,
            lat*10000000, # lat
            lon*10000000, # lon
            0*1000)
1251658
def set_location(self, time, latitude, longitude):
        '''
        
        '''
        if isinstance(time, datetime.datetime):
            tzinfo = time.tzinfo
        else:
            tzinfo = time.tz

        if tzinfo is None:
            self.location = Location(latitude, longitude)
        else:
            self.location = Location(latitude, longitude, tz=tzinfo)
720057
public void setPosition(Vector3D v) {
		this.x = v.getX();
		this.y = v.getY();
		this.z = v.getZ();
	}
785983
def set_coordsys(self):
        
        if self.coordsys.lower() in self.coordsys_mapping:
            self.coordsys = self.coordsys_mapping[self.coordsys.lower()]
863463
def set_cover_tilt_position(self, position, channel=None):
        """"""
        try:
            position = float(position)
        except Exception as err:
            LOG.debug("HelperActorBlindTilt.set_level_2: Exception %s" % (err,))
            return False

        level = self.getWriteData("LEVEL", channel)

        self.writeNodeData("LEVEL_2", position, channel)

        # set level after level_2 to have level_2 updated
        self.writeNodeData("LEVEL", level, channel)