Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #275 from dstansby/output-doc
Browse files Browse the repository at this point in the history
Clean up output docs
  • Loading branch information
dstansby authored Jan 31, 2021
2 parents 685062e + 2ade428 commit ba7c4b1
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions pfsspy/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _lon0(self):
@property
def coordinate_frame(self):
"""
The coordinate frame that the PFSS solution is in.
Coordinate frame of the input map.
Notes
-----
Expand Down Expand Up @@ -144,7 +144,7 @@ def bunit(self):
@property
def source_surface_br(self):
"""
Br on the source surface.
Radial magnetic field component on the source surface.
Returns
-------
Expand All @@ -167,8 +167,8 @@ def source_surface_pils(self):
Notes
-----
This is always returned as a list of coordinates, as in general there
may be more than one polarity inversion line.
This is always returned as a list of `~astropy.coordinates.SkyCoord`,
as in general there may be more than one polarity inversion line.
"""
from skimage import measure
m = self.source_surface_br
Expand Down Expand Up @@ -238,6 +238,8 @@ def _bTrace(self, t, coord, direction):

def trace(self, tracer, seeds):
"""
Trace magnetic field lines.
Parameters
----------
tracer : tracing.Tracer
Expand Down Expand Up @@ -289,9 +291,9 @@ def bc(self):
Returns
-------
br
btheta
bphi
br : numpy.ndarray
btheta : numpy.ndarray
bphi : numpy.ndarray
"""
br, bs, bp, Sbr, Sbs, Sbp = self._common_b()
# Remove area factors:
Expand Down Expand Up @@ -450,30 +452,23 @@ def _common_b(self):

def get_bvec(self, coords, out_type="spherical"):
"""
Evaluate magnetic vectors in pfss model.
Method which takes an arbitrary astropy SkyCoord and
returns a numpy array containing magnetic field vectors
evaluated from the parent pfsspy.Output pfss model at
the locations specified by the SkyCoords
Interpolate magnetic vectors at arbitrary coordinates.
Parameters
----------
coords : `astropy.SkyCoord`
An arbitary point or set of points (length N >= 1)
in the PFSS model domain (1Rs < r < Rss)
An arbitary point or set of points (length N >= 1) in the PFSS
model domain (1Rs < r < Rss).
out_type : str, optional
Takes values 'spherical' (default) or 'cartesian'
and specifies whether the output vector is in
spherical coordinates (B_r,B_theta,B_phi) or
cartesian (B_x,B_y,B_z)
Takes values 'spherical' (default) or 'cartesian' and specifies
whether the output vector is in spherical coordinates
(B_r, B_theta, B_phi) or cartesian (B_x, B_y, B_z).
Returns
-------
bvec : ndarray
Magnetic field vectors at the requested locations
ndarray.shape = (N,3), units nT)
(N, 3) shaped array of magnetic field vectors.
Notes
-----
Expand Down

0 comments on commit ba7c4b1

Please sign in to comment.