HTML automatically generated with rman
Table of Contents

Name

snapgalview - coordinate transformations for galactic viewing

Synopsis

snapgalview [parameter=value]

Description

snapgalview transforms a snapshot for internal viewing as if it was our galaxy. For this the "LSR" needs to be defined, either by giving a phase space coordinate (via pos= and vel=) or by referring to a specific particle in the snapshot (see center=).

The snapshot is then recentered in phase space as to be at rest w.r.t. that LSR point, and oriented such that the "galactic center" (defined as 0,0,0 in the input snapshot) would be seen towards the positive X-axis (glat=glon=0).

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=
Input snapshot filename, in standard snapshot format. No default.
out=
Output snapshot filename. No default.
pos=
Position vector of the LSR. By default not used.
vel=
Velocity vector of the LSR. By default not used.
center=
Star # to represent LSR (0=first). By default not used.
times=
Times to select snapshots from [all]

Bugs

The galactic plane is fixed at z=0, therefore selecting an LSR with Z or VZ not zero can give strange results. Use programs like snaprect(1NEMO) to re-orient your disk in the Z=0 plane.

Examples

Here is something close enough to our galactic disk, and after transforming to a particle (half way out to the edge of 20 kpc), of a galactic GLON-VRAD diagram. Notice the proper way of viewing angular sky coordinates from right to left:
    % mkdisk out=disk1 nbody=100000 potname=halo potpars=0,200,1 rmin=0
rmax=20 mass=1 sign=-1
    % set i=25000
    % snapgalview disk1 - center=$i | snapplot - xvar=glon yvar=vr xrange=180:-180
yrange=-200:200 
      LSR(25000):  Pos:9.54165 -2.99296 0  |10.0001|    Vel: -59.5619 -189.885 0
|199.007|

Useful bodytrans functions that have been predefined are:

glon    Galactic Longitude (-180..180)
glat    Galactic Latitude (-90..90)
mul    Proper motion in longitude (sans the 4.74 factor)
mub    Proper motion in latitude (sans the 4.74 factor)
which come from the following formulae (the galactic center pointing along the positive X axis, galactic rotation is positive, i.e. clock wise and thus along the positive Y axis:
    x = r cos(l) cos(b)
    y = r sin(l) cos(b)
    z = r sin(l)
and
    r mu_l = -vx sin(l)        + vy cos(l)
    r mu_b = -vx cos(l) sin(b) - vy sin(l) sin(b) + vz cos(b)

See Also

snaptrans(1NEMO) , snapshift(1NEMO) , snaprotate(1NEMO) , mkgalorbit(1NEMO)
KDUtils:    https://github.com/tvwenger/kd    Utilities to calculate kinematic
distances 

Author

Peter Teuben

Update History


17-Feb-03    V1.0 Created    PJT


Table of Contents