general/misc/
cart_to_sphere.pro
***************************************************************************************** FUNCTION : cart_to_sphere.pro PURPOSE : Transforms from cartesian to spherical coordinates. CALLED BY: xyz_to_polar.pro add_df2dp.pro add_df2d_to_ph.pro CALLS: NA REQUIRES: NA INPUT: X : N-Element array of cartesian X-component data points Y : N-Element array of cartesian Y-component data points Z : N-Element array of cartesian Z-component data points R : Named variable to return the radial magnitudes in spherical coordinates THETA : Named variable to return the poloidal angles (deg) PHI : Named variable to return the azimuthal angles (deg) EXAMPLES: KEYWORDS: PH_0_360 : IF > 0, 0 <= PHI <= 360 IF = 0, -180 <= PHI <= 180 IF < 0, ***if negative, best guess phi range returned*** PH_HIST : 2-Element array of max and min values for PHI [e.g. IF PH_0_360 NOT set and PH_HIST=[-220,220] THEN if d(PHI)/dt is positive near 180, then PHI => PHI+360 when PHI passes the 180/-180 discontinuity until phi reaches 220.] CO_LATITUDE : If set, THETA returned between 0.0 and 180.0 degrees MIN_VALUE : Deprecated keyword, maintained for backwards compatibility MAX_VALUE : Deprecated keyword, maintained for backwards compatibility CREATED BY: Davin Larson LAST MODIFIED: 06/21/2009 v1.1.0 MODIFIED BY: Lynn B. Wilson III $LastChangedBy: pcruce $ $LastChangedDate: 2012-06-27 16:55:47 -0700 (Wed, 27 Jun 2012) $ $LastChangedRevision: 10653 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/cart_to_sphere.pro $ *****************************************************************************************
Routines
File attributes
Modification date: | Thu Feb 13 16:43:48 2014 |
Lines: | 71 |