Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5a41504
some doc updates
craigmillernz Jun 11, 2026
50e9503
Update repo version etc in docs conf.py
May 15, 2026
10a7a13
Add doc templats from pandas
Jun 5, 2026
c677b3e
docs: move images to _static subfolder
Jun 5, 2026
b9b11a2
update template for readable
Jun 11, 2026
f72a5ca
ignore autogenerate api docs
Jun 11, 2026
aa94daa
Add dependencies for jupyter and docs
Jun 11, 2026
1e90583
Doc: Do not autogenerate class member doc in sphinx
Jun 11, 2026
27f4f21
Bug: GravityAnomalies - fix incorrect type hint for tcorr_params arg.
Jun 11, 2026
defab3e
Doc: Improve docstrings
Jun 11, 2026
6895ec6
Doc: Update docstrings.
Jun 11, 2026
ab92c64
Doc: Create separate pages to create for pandas style api documntation
Jun 11, 2026
0a6ffe9
doc: api for obs, sites and survey
Jun 17, 2026
51f1460
Add numpydoc and pandas usage checks.
Jun 17, 2026
921024c
disable numpydoc validation
Jun 17, 2026
638ba3b
Doc: docstring updates
Jun 17, 2026
3519359
doc: Updated api docs - now work on docstrings themselves
Jun 22, 2026
ccb966c
doc: add missig docstring elements
Jun 24, 2026
e0828ce
ignore error no raises section in docstring
Jun 30, 2026
f8e7bdb
Update docstrings
Jun 30, 2026
6911df8
final changes
Jul 14, 2026
c647f09
Fix failing test
Jul 14, 2026
844179d
Potential fix for pull request finding
AdrianBenson Jul 14, 2026
0fb58ef
Potential fix for pull request finding
AdrianBenson Jul 14, 2026
ae6c234
Potential fix for pull request finding
AdrianBenson Jul 14, 2026
2688f8b
fix reports docstring grammar
Copilot Jul 14, 2026
05960c4
fix excel writer keyword compatibility
Copilot Jul 14, 2026
b258892
Fix typos in docstrings and comments.
Jul 14, 2026
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,7 @@ do_not_track/
# pixi environments
.pixi/*
!.pixi/config.toml
docs/_build
docs/source/api/generated
docs/source/api/api/*
docs/zz/*
20 changes: 18 additions & 2 deletions docs/source/Tutorial_calculate_calibration_beta_factor.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ from gsolve import (
DialToMgalConverter,
GSolveReport
)

from gsolve.tide.earth_tide import LongmanTidalCorrection
from gsolve.tide.earth_tide import EternaPredictTidalCorrection
```

Set up the directory and files required. We need a calibration survey dataset (in excel format here), the G meter dial correction table and the reference stations list.
Expand Down Expand Up @@ -76,12 +79,25 @@ obs.apply_dial_to_mgal(g106converter)

Note that as we want to calculate the calibration factor we do not need to apply an existing calibration.

### calculate the earth tide correction which requires location information from sites
### Calculate the earth tide correction

This requires location information from the sites object. There is the option of using the Longman formula or ETERNA Predict with a choice of tidal potential models.
Refer to [pygtide documentation](https://github.com/hydrogeoscience/pygtide) for other options.

```python
obs.apply_earth_tide_correction(sites)
longman = LongmanTidalCorrection(amp_factor=1.2)
obs.apply_earth_tide_correction(sites, tide_corrector = longman)
```

Another option is to use pygtide for corrections which uses the more accurate ETERNA tidal model.

```python
eterna = EternaPredictTidalCorrection(tidalpoten=8)
obs.apply_earth_tide_correction(sites, tide_corrector = eterna)
```

Other tidal parameters for Eterna can be set through ```set_tidal_params``` once the tide correction object is initialised. e.g. ```eterna.set_tidal_params([0, 100, 1.15, 0])```

### calculate earth tide corrected gravity

```python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Plot the observed data for each loop to check for input errors. Here we plot fo
obs.plot_observed_data(2, "datetime", "meter_reading_mgal")
```

![observed data](Figure_1.png)
![observed data](_static/Figure_1.png)

### Plot a network map

Expand All @@ -161,7 +161,7 @@ if has_contextily:
fig.savefig(str(obs_path) + "/ Okataina_network_map.png")
```

![network map](Okataina_network_map.png)
![network map](_static/Okataina_network_map.png)

### Create a survey object using observations and site objects

Expand Down Expand Up @@ -200,8 +200,8 @@ results.plot_residual_drift(loop=2, filename=str(obs_path) + "/ Okataina_residua
results.plot_residual_cdf(loop=2, filename=str(obs_path) + "/ Okataina_residual_cdf.png")
```

![residual_drift](Figure_2.png)
![residual_cdf](Figure_3.png)
![residual_drift](_static/Figure_2.png)
![residual_cdf](_static/Figure_3.png)

### Save output files

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
32 changes: 32 additions & 0 deletions docs/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}

{% block methods %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
{% if item in members and not item.startswith('_') %}
~{{ name }}.{{ item }}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}

{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
{% for item in methods %}
{% if item in members and (not item.startswith('_') or item in ['__call__']) %}
~{{ name }}.{{ item }}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ fullname }}
{{ underline }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
98 changes: 98 additions & 0 deletions docs/source/api/anomalies_corrections.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
==================================
Standard Corrections and Anomalies
===================================

GravityAnomalies
================
.. currentmodule:: gsolve

.. autosummary::
:toctree: api/

GravityAnomalies
GravityAnomalies.copy
GravityAnomalies.from_csv
GravityAnomalies.from_dataframe
GravityAnomalies.from_excel
GravityAnomalies.known_fields
GravityAnomalies.required_fields
GravityAnomalies.set_column
GravityAnomalies.write_to_csv


GravityCorrectionParameters
===========================
.. currentmodule:: gsolve

.. autosummary::
:toctree: api/

GravityCorrectionParameters
GravityCorrectionParameters.from_series
GravityCorrectionParameters.copy
GravityCorrectionParameters.to_dict
GravityCorrectionParameters.to_excel
GravityCorrectionParameters.to_series
GravityCorrectionParameters.summary
GravityCorrectionParameters.bouguer_correction_fields
GravityCorrectionParameters.bouguer_correction_type
GravityCorrectionParameters.default_values
GravityCorrectionParameters.non_default_values


Functions
=========
.. currentmodule:: gsolve.reductions.anomalies

.. autosummary::
:toctree: api/

compute_complete_bouguer_anomaly
compute_free_air_anomaly
compute_simple_bouguer_anomaly

GravityCorrectionProvider
=========================
.. currentmodule:: gsolve.reductions.corrections

.. autosummary::
:toctree: api/

GravityCorrectionProvider
GravityCorrectionProvider.compute
GravityCorrectionProvider.available_corrections
GravityCorrectionProvider.bouguer_corrections
GravityCorrectionProvider.free_air_corrections

GravityCorrections
==================
.. currentmodule:: gsolve.reductions.corrections

.. autosummary::
:toctree: api/

GravityCorrections
GravityCorrections.copy
GravityCorrections.from_csv
GravityCorrections.from_dataframe
GravityCorrections.from_excel
GravityCorrections.known_fields
GravityCorrections.required_fields
GravityCorrections.set_column
GravityCorrections.write_to_csv


Functions
=========
.. currentmodule:: gsolve.reductions.corrections

.. autosummary::
:toctree: api/

atmospheric_correction
bouguer_slab_correction
bouguer_slab_curvature_corrected
free_air_correction
normal_gravity_at_ellipsoid
normal_gravity_at_stn_elevation
spherical_bouguer_cap_correction
80 changes: 51 additions & 29 deletions docs/source/api/api_index.rst
Original file line number Diff line number Diff line change
@@ -1,34 +1,56 @@
=============
API Reference
=============

.. automodule:: gsolve
:members:
:undoc-members:
:show-inheritance:

.. automodule:: gsolve.tide.earth_tide
:members:
:undoc-members:
:show-inheritance:

.. automodule:: gsolve.tide.ocean_load
:members:
:undoc-members:
:show-inheritance:

.. automodule:: gsolve.scintrex
:members:
:undoc-members:
:show-inheritance:

.. automodule:: gsolve.reductions.corrections
:members:
:undoc-members:
:show-inheritance:

.. automodule:: gsolve.reductions.anomalies
:members:
:undoc-members:
:show-inheritance:
This section contains per-module API documentation.

Observations and Site Data
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. toctree::
:maxdepth: 1

observations
sites
survey
scintrex
meter_conversion

Tidal Corrections
~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1

tide_earth_tide
tide_ocean_load

gSolve Algorithms
~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1

gsolve_algorithms
reports

Reductions and Anomalies
~~~~~~~~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1

anomalies_corrections
reductions_terrain_corrections


Utils and Internal Functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 1

core_data
core_excel_io
core_utils
xarray_methods
core_typing



47 changes: 47 additions & 0 deletions docs/source/api/core_data.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
==========================
Base Classes and Protocols
==========================

.. currentmodule:: gsolve.core.data

DataFieldSpecification
======================
.. autosummary::
:toctree: api/

DataFieldSpecification


GSolveParameters
================
.. currentmodule:: gsolve.core.data

.. autosummary::
:toctree: api/

GSolveParameters
GSolveParameters.copy
GSolveParameters.from_series
GSolveParameters.default_values
GSolveParameters.non_default_values
GSolveParameters.summary
GSolveParameters.to_dict
GSolveParameters.to_excel
GSolveParameters.to_series

GSolveTable
===========
.. currentmodule:: gsolve.core.data

.. autosummary::
:toctree: api/

GSolveTable
GSolveTable.copy
GSolveTable.from_csv
GSolveTable.from_dataframe
GSolveTable.from_excel
GSolveTable.known_fields
GSolveTable.required_fields
GSolveTable.set_column
GSolveTable.write_to_csv
13 changes: 13 additions & 0 deletions docs/source/api/core_excel_io.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gsolve.core.excel_io
====================

.. currentmodule:: gsolve.core.excel_io

.. autosummary::
:toctree: api/

read_excel_worksheet
write_excel_worksheet
get_excel_worksheets
get_true_sheet_name
_parse_sheet_name_arg
7 changes: 7 additions & 0 deletions docs/source/api/core_typing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Type Hinting and Protocols
==========================

.. automodule:: gsolve.core._typing
:members:
:undoc-members:
:show-inheritance:
Loading
Loading