Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

general/science/

xyz_to_polar.pro


PROCEDURE: xyz_to_polar,xyz PURPOSE: Calculates magnitude, theta and phi given a 3 vector INPUT: several options exist for xyz: string: data associated with the string is used. structure: data.y is assumed to contain the xyz array array(n,3) n by (x,y,z components) array(3) vector: [x,y,z] RETURN VALUES: through the keywords. Same dimensions and type as the input value of x. KEYWORDS: Named variables in which results are put MAGNITUDE: THETA: PHI: MAX_VALUE: MIN_VALUE: MISSING: OPTION KEYWORDS: These are used to set "cart_to_sphere" opts. CO_LATITUDE: If set theta will be in co-latitude. (0<=theta<=180) PH_0_360: If set positive, 0<=phi<=360, if zero, -180<=phi<=180. If set negative, will guess the best phi range. PH_HIST: A 2 element vector, a min and max histeresis value. SEE ALSO: sphere_to_cart.pro EXAMPLES: Passing arrays: x = findgen(100) y = 2*x z = x-20 vecs = [[x],[y],[z]] xyz_to_polar,vecs,mag=mag ;mag will be the magnitude of the array. Passing a structure: dat = {ytitle:'Vector',x:findgen(100),y:vecs} xyz_to_polar,dat,mag=mag,theta=th,phi=ph mag,th and ph will be all be structures. Passing a string: (see store_data, get_data) xyz_to_polar,'Vp' ; This assumes data has been created for this string. This will compute new data quantities: 'Vp_mag','Vp_th','Vp_ph'

Routines

top source xyz_to_polar

xyz_to_polar, data, magnitude=magnitude, theta=theta, phi=phi, tagname=tagname, max_value=max_value, min_value=min_value, missing=missing, clock=clock, co_latitude=co_latitude, tplotnames=tplotnames, ph_0_360=ph_0_360, ph_hist=ph_hist

Parameters

data

Keywords

magnitude
theta
phi
tagname
max_value
min_value
missing
clock
co_latitude
tplotnames
ph_0_360
ph_hist

File attributes

Modification date: Wed Dec 10 10:08:32 2014
Lines: 97