pymgp.crstrans.printcrd#

pymgp.crstrans.printcrd(crd, prtfmt='xyz', labels=[], sdcov=[], sdcovfmt='std', unit='rad/m', title='')[source]#

Print a table with coordinates and optional standard deviation/co-variance information.

Parameters:
crdarray_like with shape (…,3)

Array with Cartesian or geographic coordinates.

prtfmt{‘xyz’, ‘neu’,’map’, ‘plh’, ‘dms’,’dmspretty’, …}, default=’xyz’

Coordinate format for printing.

  • ‘xyz’ (‘ecef’): Cartesian XYZ coordinates (default)

  • ‘neu’ (‘local’): Coordinates in local NEU system

  • ‘map’: Coordinates in map projection system

  • ‘plh’ (‘geodetic’): Geographic coordinates printed in decimal degrees

  • ‘dms’ (‘sexagesimal’): Geographic coordiantes printed in degrees, minutes, seconds.

  • ‘dmspretty’: As ‘dms’, with degree, minute and second symbols.

For the options ‘dms’, ‘dmspretty’ and ‘plh’ crd must contain the latitude and longitude in either radians or degrees (with unit=’deg/m’)

labelsarray_like, optional

Optional list with row labels, e.g. station names.

sdcovarray_like with shape (…,3) or shape (…,6)

Optional standard deviations (…,3) and/or co-variances (…,6).

sdcovfmt{‘std’, ‘qvec’, ‘scor’, ‘scov’, …}, optional

Format of the input compact co-variance matrix/vector, see covtransform for all for possible formats. Default is ‘std’

unit{‘rad/m’, ‘deg/m’, ‘deg’, ‘rad’}, optional

Units of input crd array, , default ‘rad/m’.

titlestr, optional

Optional title string.

Returns:
None

Nothing to return.

Examples

Create a test case

>>> crd = np.array([[ 1, 2, 3 ] , [ 4, 5, 6]])
>>> sdcov = np.hstack((crd,crd))
>>> station = [ 'DELF' , 'Stolwijk']

Basic examples without much additional information

>>> printcrd(crd, prtfmt='map')
          x[m]          y[m]        h[m]

        1.0000        2.0000      3.0000
        4.0000        5.0000      6.0000
>>> printcrd(crd, prtfmt='dmspretty', unit='deg')
         Lat[dms]        Lon[dms]       H[m]

    1°00'00.0000"   2°00'00.0000"     3.0000
    4°00'00.0000"   5°00'00.0000"     6.0000

More elaborate examples with labels, standard deviations and covariance information

>>> printcrd(crd, prtfmt='xyz', labels=station, sdcov=sdcov, sdcovfmt="std")  
                    X[m]            Y[m]            Z[m]      sx[m]    sy[m]    sz[m]

DELF              1.0000          2.0000          3.0000     1.0000   2.0000   3.0000
Stolwijk          4.0000          5.0000          6.0000     4.0000   5.0000   6.0000
>>> printcrd(crd, prtfmt='plh', labels=station, sdcov=sdcov, sdcovfmt="qvec", unit='deg')
                Lat[deg]        Lon[deg]       H[m]      sn[m]    se[m]    su[m]   sne[m]   snu[m]   seu[m]

DELF         1.000000000     2.000000000     3.0000     1.0000   1.0000   1.0000   1.0000   1.0000   1.0000
Stolwijk     4.000000000     5.000000000     6.0000     2.0000   2.0000   2.0000   2.0000   2.0000   2.0000