Commit 86df9cd5 by Maximilian Schanner

### Add a twopi argument two get_z_at, to remove duplicates if necessary.

parent 47c6806f
 ... @@ -3,6 +3,7 @@ Changelog ... @@ -3,6 +3,7 @@ Changelog 2021-10-20 v1.1.1 2021-10-20 v1.1.1 ----------------- ----------------- * Correct documentation of equi_sph * Correct documentation of equi_sph * Add a twopi argument to get_z_at 2021-08-25 v1.1.0 2021-08-25 v1.1.0 ----------------- ----------------- ... ...
 ... @@ -319,7 +319,7 @@ def equi_sph(n, twopi=True): ... @@ -319,7 +319,7 @@ def equi_sph(n, twopi=True): return np.array([ts, ps], dtype=float) return np.array([ts, ps], dtype=float) def get_z_at(n, R=REARTH, t=1900., random=False): def get_z_at(n, R=REARTH, t=1900., random=False, twopi=True): '''Get input points on the sphere. This is a convenience routine to allow '''Get input points on the sphere. This is a convenience routine to allow easy construction of field maps and synthetic data from the models. easy construction of field maps and synthetic data from the models. ... @@ -335,6 +335,9 @@ def get_z_at(n, R=REARTH, t=1900., random=False): ... @@ -335,6 +335,9 @@ def get_z_at(n, R=REARTH, t=1900., random=False): random : bool, optional random : bool, optional If true, exactly n random points are returned. This is useful for If true, exactly n random points are returned. This is useful for generating synthetic data. generating synthetic data. twopi : bool, optional Whether to include 2*pi as a duplicate of 0 for the longitutinal angle (useful for plotting purposes). Only used if random is False. Returns Returns ------- ------- ... @@ -349,8 +352,9 @@ def get_z_at(n, R=REARTH, t=1900., random=False): ... @@ -349,8 +352,9 @@ def get_z_at(n, R=REARTH, t=1900., random=False): if random: if random: n_ret = n n_ret = n n = 100*n n = 100*n twopi = False angles = equi_sph(n) angles = equi_sph(n, twopi=twopi) z_at = np.zeros((4, angles.shape[1]), order='F') z_at = np.zeros((4, angles.shape[1]), order='F') z_at[0] = np.rad2deg(angles[0]) z_at[0] = np.rad2deg(angles[0]) z_at[1] = np.rad2deg(angles[1]) z_at[1] = np.rad2deg(angles[1]) ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment