Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/_templates/footer_start.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{%- if show_copyright %}
<a href="{{ pathto('about') }}#authors"><i class="far fa-copyright"></i> {{ copyright }} </a>
<a href="{{ pathto('about/authors') }}"><i class="far fa-copyright"></i> {{ copyright }} </a>
{%- endif %}
16 changes: 9 additions & 7 deletions doc/_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
{% block body %}

<h1 class="display-5">
pyGIMLi is an open-source library for multi-method modelling and inversion in geophysics.
Open-source multi-method modelling and inversion in geophysics.
</h1>
<a class="btn btn-primary btn-lg mt-2" href="{{pathto('about')}}">
<i class="fas fa-book me-1"></i> Learn more
</a>
<a class="btn btn-success btn-lg mt-2 ms-2 text-white" href="{{pathto('user-guide/getting-started/index')}}">
<i class="fas fa-rocket me-1"></i> Getting started
</a>
<div class="d-flex flex-column flex-sm-row gap-2 mt-2">
<a class="btn btn-primary btn-lg" href="{{pathto('about')}}">
<i class="fas fa-book me-1"></i> Learn more
</a>
<a class="btn btn-success btn-lg text-white" href="{{pathto('user-guide/getting-started/index')}}">
<i class="fas fa-rocket me-1"></i> Getting started
</a>
</div>

<h1 class="mt-5">Showcase
<small class="text-muted">
Expand Down
4 changes: 2 additions & 2 deletions doc/community/development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Coding standards and contribution workflow for pyGIMLi.

How to write and format documentation with Markdown and MyST.
:::
:::{grid-item-card} Dependencies
:::{grid-item-card} Compiling from source
:link: sec-install-pre
:link-type: ref

Tools and libraries required to build pyGIMLi from source.
Tools and dependencies required to compile pyGIMLi from source.
:::
::::

Expand Down
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
'sphinxcontrib.programoutput',
"bibtexparser",
"sphinx_design",
"sphinx_copybutton",
# "sphinx_tippy"
# "sphinxcontrib.spelling"
#'sphinx.ext.pngmath', # for breath
Expand Down
57 changes: 0 additions & 57 deletions doc/gimlisoftware.bib

This file was deleted.

15 changes: 15 additions & 0 deletions pygimli/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,21 @@ def __EQ_RVector__(self, val):
# useful stuff
############################
def toIVector(v):
"""Convert an array-like to a pgcore.IVector.

.. deprecated::
Use a plain NumPy integer array instead. This function will be
removed in a future release.

Parameters
----------
v : array-like
Values to convert.

Returns
-------
pgcore.IVector
"""
print("do not use toIVector(v) use ndarray directly .. "
"this method will be removed soon")
ret = pgcore.IVector(len(v), 0)
Expand Down
27 changes: 27 additions & 0 deletions pygimli/core/datacontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@


def __DataContainer_str(self):
"""Return a short human-readable summary of the data container."""
return "Data: Sensors: " + str(self.sensorCount()) + " data: " + \
str(self.size()) + ", nonzero entries: " + \
str([d for d in self.dataMap().keys() if self.isSensorIndex(d) or
Expand Down Expand Up @@ -50,6 +51,7 @@ def __DataContainer_setSensors(self, sensors):


def __DataContainer_copy(self):
"""Return a copy of this data container, preserving its concrete type."""
return type(self)(self)


Expand All @@ -72,6 +74,18 @@ def __DC_setVal(self, key, val):


def __DC_getVal(self, key):
"""Return data values for *key*, as integer array for sensor-index fields.

Parameters
----------
key : str
Data token to retrieve.

Returns
-------
numpy.ndarray or pg.Vector
Integer array for sensor-index tokens, otherwise the raw pg.Vector.
"""
if self.isSensorIndex(key):
return np.array(self(key), dtype=int)
# return self(key).array() // d['a'][2] = 0.0, would be impossible
Expand All @@ -82,6 +96,11 @@ def __DC_getVal(self, key):


def __DataContainer_ensure2D(self):
"""Swap Y and Z coordinates if sensors are arranged in the X-Z plane.

Corrects sensor positions when data were stored with depth in the Z
direction but the 2-D convention requires depth along Y.
"""
sen = self.sensors()
if ((zVari(sen) or max(abs(z(sen))) > 0) and
(not yVari(sen) and max(abs(y(sen))) < 1e-8)):
Expand All @@ -93,6 +112,7 @@ def __DataContainer_ensure2D(self):


def __DataContainer_swapXY(self):
"""Swap X and Y sensor coordinates in-place."""
sen = self.sensors()
swapYZ(sen)
self.setSensorPositions(sen)
Expand Down Expand Up @@ -183,6 +203,13 @@ def __DataContainer_getIndices(self, **kwargs):


def __DataContainer_removeData(self, **kwargs):
"""Remove data entries matching all supplied key=value conditions.

Parameters
----------
**kwargs :
Token–value pairs; entries for which all conditions hold are removed.
"""
self.markInvalid(self.getIndices(**kwargs))
self.removeInvalid()

Expand Down
Loading
Loading