# core module¶

Module to manipulate, analyze and visualize structural geology data.

class `apsg.core.``Vec3`

Bases: `numpy.ndarray`

`Vec3` is base class to store 3-dimensional vectors derived from `numpy.ndarray` on which `Lin` and `Fol` classes are based.

`Vec3` support most of common vector algebra using following operators
• `+` - vector addition
• `-` - vector subtraction
• `*` - dot product
• `**` - cross product
• `abs` - magnitude (length) of vector

Check following methods and properties for additional operations.

Parameters: arr (array_like) – Input data that or can be converted to an array. This includes lists, tuples, and ndarrays. When more than one argument is passed (i.e. inc is not None) arr is interpreted as dip direction of the vector in degrees. inc (float) – None or dip of the vector in degrees. mag (float) – The magnitude of the vector if inc is not None. `Vec3` object

Example

```>>> v = Vec3([1, -2, 3])
>>> abs(v)
3.7416573867739413
```

# The dip direction and dip angle of vector with magnitude of 1 and 3. >>> v = Vec3(120, 60) >>> abs(v) 1.0

```>>> v = Vec3(120, 60, 3)
>>> abs(v)
3.0
```
`H`(other)

Return `DefGrad` rotational matrix H which rotate vector u to vector v.

Parameters: other (`Vec3`) – other vector `Defgrad` rotational matrix

Example

```>>> u = Vec3(210, 50)
>>> v = Vec3(60, 70)
>>> u.transform(u.H(v)) == v
True
```
`angle`(other)

Calculate the angle between two vectors in degrees.

Parameters: other – other `Vec3` vector The angle between self and other in degrees.

Example

```>>> v = Vec3([1, 0, 0])
>>> u = Vec3([0, 0, 1])
>>> v.angle(u)
90.0
```
`cross`(other)

Calculate the cross product of two vectors.

Parameters: other – other `Vec3` vector The cross product of self and other.

Example

```>>> v = Vec3([1, 0, 0])
>>> u = Vec3([0, 0, 1])
>>> v.cross(u)
V(0.000, -1.000, 0.000)
```
`proj`(other)

Return projection of vector u onto vector v.

Parameters: other (`Vec3`) – other vector vector representation of self projected onto ‘other’

Example

>> u.proj(v)

Note

To project on plane use: u - u.proj(v), where v is plane normal.

classmethod `rand`()

Random unit vector from distribution on sphere

`rotate`(axis, angle)

Parameters: axis (`Vec3`) – axis of rotation angle (float) – angle of rotation in degrees vector represenatation of self rotated angle degrees about vector axis. Rotation is clockwise along axis direction.

Example

# Rotate e1 vector around z axis. >>> u = Vec3([1, 0, 0]) >>> z = Vec3([0, 0, 1]) >>> u.rotate(z, 90) V(0.000, 1.000, 0.000)

`transform`(F, **kwargs)

Return affine transformation of vector u by matrix F.

Parameters: Keyword Arguments: F (`DefGrad` or `numpy.array`) – transformation matrix norm – normalize transformed vectors. [True or False] Default False vector representation of affine transformation (dot product) of self by F

Example

# Reflexion of y axis. >>> F = [[1, 0, 0], [0, -1, 0], [0, 0, 1]] >>> u = Vec3([1, 1, 1]) >>> u.transform(F) V(1.000, -1.000, 1.000)

`V`

Convert self to `Vec3` object.

Note

This is an alias of `asvec3` property.

`asfol`

Convert self to `Fol` object.

Example

```>>> u = Vec3([1,1,1])
>>> u.asfol
S:225/55
```
`aslin`

Convert self to `Lin` object.

Example

```>>> u = Vec3([1,1,1])
>>> u.aslin
L:45/35
```
`asvec3`

Convert self to `Vec3` object.

Example

```>>> l = Lin(120,50)
>>> l.asvec3
V(-0.321, 0.557, 0.766)
```
`dd`

Return azimuth, inclination tuple.

Example

```>>> v = Vec3([1, 0, -1])
>>> azi, inc = v.dd
>>> azi
0.0
>>> inc
-44.99999999999999
```
`flip`

Return a new vector with inverted z coordinate.

`type`

Return the type of `self`.

`upper`

Return True if z-coordinate is negative, otherwise False.

`uv`

Normalize the vector to unit length.

Returns: unit vector of `self`

Example

```>>> u = Vec3([1,1,1])
>>> u.uv
V(0.577, 0.577, 0.577)
```
class `apsg.core.``Lin`

Bases: `apsg.core.Vec3`

Represents a linear feature.

It provides all `Vec3` methods and properties but behave as axial vector.

Parameters: azi – The plunge direction or trend in degrees. inc – The plunge in degrees.

Example

```>>> Lin(120, 60)
L:120/60
```
`angle`(other)

Return an angle (<90) between two linear features in degrees.

Example

```>>> l = Lin(45, 50)
>>> l.angle(Lin(110, 25))
55.253518182588884
```
`cross`(other)

Create planar feature defined by two linear features.

Example

```>>> l = Lin(120,10)
>>> l.cross(Lin(160,30))
S:196/35
```
`dot`(other)

Calculate the axial dot product.

classmethod `rand`()

Random Lin

`dd`

Return trend and plunge tuple.

class `apsg.core.``Fol`

Bases: `apsg.core.Vec3`

Represents a planar feature.

It provides all `Vec3` methods and properties but plane normal behave as axial vector.

Parameters: azi – The dip azimuth in degrees. inc – The dip angle in degrees.

Example

```>>> Fol(120, 60)
S:120/60
```
`angle`(other)

Return angle of two planar features in degrees.

Example

```>>> f = Fol(120, 30)
>>> f.angle(Fol(210, 60))
64.34109372674472
```
`cross`(other)

Return linear feature defined as intersection of two planar features.

Example

```>>> f = Fol(60,30)
>>> f.cross(Fol(120,40))
L:72/29
```
`dot`(other)

Axial dot product.

`rake`(rake)

Return a `Vec3` object with given rake.

Example

```>>> f = Fol(120,50)
>>> f.rake(30)
V(0.589, 0.711, 0.383)
>>> f.rake(30).aslin
L:50/23
```
classmethod `rand`()

Random Fol

`transform`(F, **kwargs)

Return affine transformation of planar feature by matrix F.

Parameters: Keyword Arguments: F (`DefGrad` or `numpy.array`) – transformation matrix norm – normalize transformed vectors. True or False. Default False representation of affine transformation (dot product) of self by F

Example

```>>> F = [[1, 0, 0], [0, 1, 1], [0, 0, 1]]
>>> f = Fol(90, 90)
>>> f.transform(F)
S:90/45
```
`dd`

Return dip-direction, dip tuple.

`dv`

Return a dip `Vec3` object.

Example

```>>> f = Fol(120,50)
>>> f.dv
V(-0.321, 0.557, 0.766)
```
`rhr`

Return strike and dip tuple (right-hand-rule).

class `apsg.core.``Pair`(fazi, finc, lazi, linc)

Bases: `object`

The class to store pair of planar and linear feature.

When `Pair` object is created, both planar and linear feature are adjusted, so linear feature perfectly fit onto planar one. Warning is issued, when misfit angle is bigger than 20 degrees.

Parameters: fazi (float) – dip azimuth of planar feature in degrees finc (float) – dip of planar feature in degrees lazi (float) – plunge direction of linear feature in degrees linc (float) – plunge of linear feature in degrees

Example

```>>> p = Pair(140, 30, 110, 26)
```
classmethod `from_pair`(fol, lin)

Create `Pair` from `Fol` and `Lin` objects.

Example

```>>> f = Fol(140, 30)
>>> l = Lin(110, 26)
>>> p = Pair.from_pair(f, l)
```
classmethod `rand`()

Random Pair

`rotate`(axis, phi)

Rotates `Pair` by angle phi about axis.

Parameters: axis (`Vec3`) – axis of rotation phi (float) – angle of rotation in degrees

Example

```>>> p = Pair(140, 30, 110, 26)
>>> p.rotate(Lin(40, 50), 120)
P:210/83-287/60
```
`transform`(F, **kwargs)

Return an affine transformation of `Pair` by matrix F.

Parameters: Keyword Arguments: F (`DefGrad` or `numpy.array`) – transformation matrix norm – normalize transformed vectors. True or False. Default False representation of affine transformation (dot product) of self by F

Example

```>>> F = [[1, 0, 0], [0, 1, 1], [0, 0, 1]]
>>> p = Pair(90, 90, 0, 50)
>>> p.transform(F)
P:90/45-50/37
```
`fol`

Return a planar feature of `Pair` as `Fol`.

`lin`

Return a linear feature of `Pair` as `Lin`.

`rax`

Return an oriented vector perpendicular to both `Fol` and `Lin`.

`type`
class `apsg.core.``Fault`(fazi, finc, lazi, linc, sense)

Bases: `apsg.core.Pair`

Fault class for related `Fol` and `Lin` instances with sense of movement.

When `Fault` object is created, both planar and linear feature are adjusted, so linear feature perfectly fit onto planar one. Warning is issued, when misfit angle is bigger than 20 degrees.

Parameters: fazi (float) – dip azimuth of planar feature in degrees finc (float) – dip of planar feature in degrees lazi (float) – plunge direction of linear feature in degrees linc (float) – plunge of linear feature in degrees sense (float) – sense of movement +/-1 hanging-wall up/down

Example

```>>> p = Fault(140, 30, 110, 26, -1)
```
classmethod `from_pair`(fol, lin, sense)

Create `Fault` with given sense from `Fol` and `Lin` objects

classmethod `from_vecs`(fvec, lvec)

Create `Fault` from two ortogonal `Vec3` objects

Parameters: fvec – vector normal to fault plane lvec – vector parallel to movement
`rotate`(axis, phi)

Rotates `Fault` by phi degrees about axis.

Parameters: axis – axis of rotation phi – angle of rotation in degrees

Example

```>>> f = Fault(140, 30, 110, 26, -1)
>>> f.rotate(Lin(220, 10), 60)
F:300/31-301/31 +
```
`d`

Return dihedra plane as `Fol`

`m`

Return kinematic M-plane as `Fol`

`p`

Return P-axis as `Lin`

`pvec`

Return P axis as `Vec3`

`sense`

Return sense of movement (+/-1)

`t`

Return T-axis as `Lin`

`tvec`

Return T-axis as `Vec3`.

class `apsg.core.``Group`(data, name='Default')

Bases: `list`

Represents a homogeneous group of `Vec3`, `Fol` or `Lin` objects.

`Group` provide append and extend methods as well as list indexing to get or set individual items. It also supports following operators:

• `+` - merge groups
• `**` - mutual cross product
• `abs` - array of magnitudes (lengths) of all objects

See following methods and properties for additional operations.

Parameters: data (list) – list of `Vec3`, `Fol` or `Lin` objects name (str) – Name of group `Group` object

Example

```>>> g = Group([Lin(120, 20), Lin(151, 23), Lin(137, 28)])
```
`angle`(other=None)

Return angles of all data in `Group` object

Without arguments it returns angles of all pairs in dataset. If argument is group or single data object all mutual angles are returned.

`append`(object) → None -- append object to end
`bootstrap`(N=100, size=None)

Return iterator of bootstraped samples from `Group`.

Parameters: N – number of samples to be generated size – number of data in sample. Default is same as `Group`.

Example

```>>> np.random.seed(58463123)
>>> g = Group.randn_lin(100, mean=Lin(120,40))
>>> sm = [gb.R for gb in g.bootstrap(100)]
>>> g.fisher_stats
{'k': 16.1719344862197, 'a95': 3.627369676728579, 'csd': 20.142066812987963}
>>> Group(sm).fisher_stats
{'k': 1577.5503256282452, 'a95': 0.3559002104835758, 'csd': 2.0393577026717056}
```
`copy`() → list -- a shallow copy of L
`cross`(other=None)

Return cross products of all data in `Group` object

Without arguments it returns cross product of all pairs in dataset. If argument is group or single data object all mutual cross products are returned.

`dot`(vec)

Return array of dot products of all data in `Group` with vector.

classmethod `examples`(name=None)

Create `Group` from example datasets. Available names are returned when no name of example dataset is given as argument.

Keyword Arguments:
name – name of dataset

Example

```>>> g = Group.examples('B2')
```
`extend`(iterable) → None -- extend list by appending elements from the iterable
classmethod `fisher_lin`(N=100, mean=L:0/90, kappa=20, name='Default')

Method to create `Group` of `Lin` objects distributed according to Fisher distribution.

Parameters: N – number of objects to be generated kappa – precision parameter of the distribution. Default 20 name – name of dataset. Default is ‘Default’

Example

```>>> g = Group.fisher_lin(100, mean=Lin(120,10))
```
classmethod `from_array`(azis, incs, typ=<class 'apsg.core.Lin'>, name='Default')

Create `Group` object from arrays of azimuths and inclinations

Parameters: Keyword Arguments: azis – list or array of azimuths incs – list or array of inclinations typ – type of data. `Fol` or `Lin` name – name of `Group` object. Default is ‘Default’

Example

```>>> f = Fault(140, 30, 110, 26, -1)
```
classmethod `from_csv`(filename, typ=<class 'apsg.core.Lin'>, acol=0, icol=1)

Create `Group` object from csv file

Parameters: Keyword Arguments: filename (str) – name of CSV file to load typ – Type of objects. Default `Lin` acol (int or str) – azimuth column (starts from 0). Default 0 icol (int or str) – inclination column (starts from 0). Default 1 When acol and icol are strings they are used as column headers.

Example

```>>> g1 = Group.from_csv('file1.csv', typ=Fol)
>>> g2 = Group.from_csv('file2.csv', acol=1, icol=2)
```
classmethod `from_file`(filename)

Parameters: filename (str) – name of data file to load.
classmethod `gss_fol`(N=500, name='Default')

Method to create `Group` of uniformly distributed `Fol` objects. Based on `Group.gss_vec3` method, but only half of sphere is used.

Parameters: N – number of objects to be generated. Default 500 name – name of dataset. Default is ‘Default’

Example

```>>> g = Group.gss_fol(300)
>>> g.ortensor.eigenvals
(0.33498372991251285, 0.33333659934369725, 0.33167967074378996)
```
classmethod `gss_lin`(N=500, name='Default')

Method to create `Group` of uniformly distributed `Lin` objects. Based on `Group.gss_vec3` method, but only half of sphere is used.

Parameters: N – number of objects to be generated. Default 500 name – name of dataset. Default is ‘Default’

Example

```>>> g = Group.gss_lin(300)
>>> g.ortensor.eigenvals
(0.33498372991251285, 0.33333659934369725, 0.33167967074378996)
```
classmethod `gss_vec3`(N=1000, name='Default')

Method to create `Group` of uniformly distributed `Vec3` objects. Golden Section Spiral points on a sphere algorithm.

http://www.softimageblog.com/archives/115

Parameters: N – number of objects to be generated. Default 1000 name – name of dataset. Default is ‘Default’

Example

```>>> v = Group.gss_vec3(300)
>>> v.ortensor.eigenvals
(0.3333568856957158, 0.3333231511543691, 0.33331996314991513)
```
classmethod `kent_lin`(p, kappa=20, beta=0, N=500, name='Default')

Method to create `Group` of `Lin` objects distributed according to Kent distribution (Kent, 1982) - The 5-parameter Fisher–Bingham distribution.

Parameters: p – Pair object defining orientation of data N – number of objects to be generated kappa – concentration parameter. Default 20 beta – ellipticity 0 <= beta < kappa name – name of dataset. Default is ‘Default’

Example

```>>> p = Pair(135, 30, 90, 22)
>>> g = Group.kent_lin(p, 30, 5, 300)
```
`proj`(vec)

Return projections of all data in `Group` onto vector.

classmethod `randn_fol`(N=100, mean=S:0/0, sig=20, name='Default')

Method to create `Group` of normaly distributed random `Fol` objects.

Keyword Arguments:

• N – number of objects to be generated
• mean – mean orientation given as `Fol`. Default Fol(0, 0)
• sig – sigma of normal distribution. Default 20
• name – name of dataset. Default is ‘Default’

Example

```>>> np.random.seed(58463123)
>>> g = Group.randn_fol(100, Lin(240, 60))
>>> g.R
S:237/60
```
classmethod `randn_lin`(N=100, mean=L:0/90, sig=20, name='Default')

Method to create `Group` of normaly distributed random `Lin` objects.

Keyword Arguments:

• N – number of objects to be generated
• mean – mean orientation given as `Lin`. Default Lin(0, 90)
• sig – sigma of normal distribution. Default 20
• name – name of dataset. Default is ‘Default’

Example

```>>> np.random.seed(58463123)
>>> g = Group.randn_lin(100, Lin(120, 40))
>>> g.R
L:118/42
```
`rotate`(axis, phi)

Rotate `Group` object phi degress about axis.

classmethod `sfs_fol`(N=500, name='Default')

Method to create `Group` of uniformly distributed `Fol` objects. Based on `Group.sfs_vec3` method, but only half of sphere is used.

Parameters: N – number of objects to be generated. Default 500 name – name of dataset. Default is ‘Default’

Example

```>>> g = Group.sfs_fol(300)
>>> g.ortensor.eigenvals
(0.33417707294664595, 0.333339733866985, 0.332483193186369)
```
classmethod `sfs_lin`(N=500, name='Default')

Method to create `Group` of uniformly distributed `Lin` objects. Based on `Group.sfs_vec3` method, but only half of sphere is used.

Parameters: N – number of objects to be generated. Default 500 name – name of dataset. Default is ‘Default’

Example

```>>> g = Group.sfs_lin(300)
>>> g.ortensor.eigenvals
(0.33417707294664595, 0.333339733866985, 0.332483193186369)
```
classmethod `sfs_vec3`(N=1000, name='Default')

Method to create `Group` of uniformly distributed `Vec3` objects. Spherical Fibonacci Spiral points on a sphere algorithm adopted from John Burkardt.

http://people.sc.fsu.edu/~jburkardt/

Keyword Arguments:

• N – number of objects to be generated. Default 1000
• name – name of dataset. Default is ‘Default’

Example

```>>> v = Group.sfs_vec3(300)
>>> v.ortensor.eigenvals
(0.33346453471636356, 0.33333474915201167, 0.3332007161316248)
```
`to_csv`(filename, delimiter=', ', rounded=False)

Save `Group` object to csv file

Parameters: Keyword Arguments: filename (str) – name of CSV file to save. delimiter (str) – values delimiter. Default ‘,’ rounded (bool) – round values to integer. Default False
`to_file`(filename)

Save group to pickle file.

Parameters: filename (str) – name of file to save.
`transform`(F, **kwargs)

Return affine transformation of `Group` by matrix ‘F’.

Parameters: Keyword Arguments: F – Transformation matrix. Should be array-like value e.g. `DefGrad` norm – normalize transformed vectors. True or False. Default False
classmethod `uniform_fol`(N=500, name='Default')

Method to create `Group` of uniformly distributed `Fol` objects.

Keyword Arguments:

• N – approximate (maximum) number of objects to be generated
• name – name of dataset. Default is ‘Default’

Example

```>>> g = Group.uniform_fol(300)
>>> g.ortensor.eigenvals
(0.3354383042654646, 0.3322808478672677, 0.3322808478672675)
```
classmethod `uniform_lin`(N=500, name='Default')

Method to create `Group` of uniformly distributed `Lin` objects.

Keyword Arguments:

• N – approximate (maximum) number of objects to be generated
• name – name of dataset. Default is ‘Default’

Example

```>>> g = Group.uniform_lin(300)
>>> g.ortensor.eigenvals
(0.33543830426546456, 0.3322808478672677, 0.3322808478672676)
```
`R`

Return resultant of data in `Group` object.

Resultant is of same type as `Group`. Note that `Fol` and `Lin` are axial in nature so resultant can give other result than expected. For most cases is should not be problem as it is calculated as resultant of centered data. Anyway for axial data orientation tensor analysis will give you right answer.

As axial summing is not commutative we use vectorial summing of centered data for Fol and Lin

`V`

Return `Group` object with all data converted to `Vec3`.

`asfol`

Return `Group` object with all data converted to `Fol`.

`aslin`

Return `Group` object with all data converted to `Lin`.

`asvec3`

Return `Group` object with all data converted to `Vec3`.

`centered`

Rotate `Group` object to position that eigenvectors are parallel to axes of coordinate system: E1(vertical), E2(east-west), E3(north-south)

`cluster`

Return hierarchical clustering `Cluster` of `Group`.

`data`

Return list of objects in `Group`.

`dd`

Return array of azimuths and inclinations of `Group`

`delta`

Cone angle containing ~63% of the data in degrees.

`fisher_stats`

Fisher’s statistics.

fisher_stats property returns dictionary with k, csd and a95 keywords.

`flip`

Return `Group` object with inverted z-coordinate.

`halfspace`

Change orientation of vectors in Group, so all have angle<=90 with resultant.

`ortensor`

Return orientation tensor `Ortensor` of `Group`.

`rdegree`

Degree of preffered orientation of data in `Group` object.

D = 100 * (2 * |R| - n) / n

`rhr`

Return array of strikes and dips of `Group`

`totvar`

totvar = sum(|x - R|^2) / 2n

Note that difference between totvar and var is measure of difference between sample and population mean

`upper`

Return boolean array of z-coordinate negative test

`uv`

Return `Group` object with normalized (unit length) elements.

`var`

Spherical variance based on resultant length (Mardia 1972).

var = 1 - |R| / n

class `apsg.core.``PairSet`(data, name='Default')

Bases: `list`

Represents a homogeneous group of `Pair` objects.

`append`(object) → None -- append object to end
`extend`(iterable) → None -- extend list by appending elements from the iterable
classmethod `from_array`(fazis, fincs, lazis, lincs, name='Default')

Create PairSet from arrays of azimuths and inclinations

classmethod `from_csv`(fname, delimiter=', ', facol=1, ficol=2, lacol=3, licol=4)

`rotate`(axis, phi)

Rotate PairSet

`to_csv`(fname, delimiter=', ', rounded=False)
`data`
`fol`

Return Fol part of PairSet as Group of Fol

`fvec`

Return vectors of Fol of PairSet as Group of Vec3

`lin`

Return Lin part of PairSet as Group of Lin

`lvec`

Return vectors of Lin part of PairSet as Group of Vec3

`misfit`

Return array of misfits

class `apsg.core.``FaultSet`(data, name='Default')

Represents a homogeneous group of `Fault` objects.

`angmech`(method='classic')

Implementation of Angelier-Mechler dihedra method

Parameters: method – ‘probability’ or ‘classic’. Classic method assigns +/-1 individual positions, while 'probability' returns maximum (to) – estimate. (likelihood) –
classmethod `examples`(name=None)

Create `FaultSet` from example datasets. Available names are returned when no name of example dataset is given as argument.

Keyword Arguments:
name – name of dataset

Example

```>>> fs = FaultSet.examples('MELE')
```
classmethod `from_array`(fazis, fincs, lazis, lincs, senses, name='Default')

Create dataset from arrays of azimuths and inclinations

classmethod `from_csv`(fname, delimiter=', ', facol=1, ficol=2, lacol=3, licol=4, scol=5)

`to_csv`(fname, delimiter=', ', rounded=False)
`d`

Return dihedra planes of FaultSet as Group of Fol

`m`

Return m-planes of FaultSet as Group of Fol

`p`

Return p-axes of FaultSet as Group of Lin

`pvec`

Return p-axes of FaultSet as Group of Vec3

`sense`

Return array of sense values

`t`

Return t-axes of FaultSet as Group of Lin

`tvec`

Return t-axes of FaultSet as Group of Vec3

class `apsg.core.``Cluster`(d, **kwargs)

Bases: `object`

Provides a hierarchical clustering using scipy.cluster routines.

The distance matrix is calculated as an angle between features, where `Fol` and `Lin` use axial angles while `Vec3` uses direction angles.

`cluster`(**kwargs)

Do clustering on data

Result is stored as tuple of Groups in `groups` property.

Keyword Arguments:

• criterion – The criterion to use in forming flat clusters
• maxclust – number of clusters
• angle – maximum cophenetic distance(angle) in clusters
`dendrogram`(**kwargs)

Show dendrogram

See `scipy.cluster.hierarchy.dendrogram` for possible kwargs.

`elbow`(no_plot=False, n=None)

Plot within groups variance vs. number of clusters.

Elbow criterion could be used to determine number of clusters.

`linkage`(**kwargs)

Keyword Arguments:
method – The linkage algorithm to use
`R`

Return group of clusters resultants.

class `apsg.core.``StereoGrid`(d=None, **kwargs)

Bases: `object`

The class to store regular grid of values to be contoured on `StereoNet`.

`StereoGrid` object could be calculated from `Group` object or by user- defined function, which accept unit vector as argument.

Parameters: Keyword Arguments: g – `Group` object of data to be used for desity calculation. If zero values grid is returned. (ommited,) – npoints – approximate number of grid points Default 1800 grid – type of grid ‘radial’ or ‘ortho’. Default ‘radial’ sigma – sigma for kernels. Default 1 method – ‘exp_kamb’, ‘linear_kamb’, ‘square_kamb’, ‘schmidt’, ‘kamb’. Default ‘exp_kamb’ trim – Set negative values to zero. Default False Note – Euclidean norms are used as weights. Normalize data if you dont want to use weigths.
`apply_func`(func, *args, **kwargs)

Calculate values using function passed as argument. Function must accept vector (3 elements array) as argument and return scalar value.

`calculate_density`(dcdata, **kwargs)

Calculate density of elements from `Group` object.

`contour`(*args, **kwargs)

Show contours of values.

`contourf`(*args, **kwargs)

Show filled contours of values.

`initgrid`(**kwargs)
`plotcountgrid`()

Show counting grid.

`max`
`max_at`
`min`
`min_at`
`apsg.core.``G`(s, typ=<class 'apsg.core.Lin'>, name='Default')

Create a group from space separated string of azimuths and inclinations.