magsurveypy 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. magsurveypy-1.0.0/BATCH_COMMAND_EXAMPLES.md +77 -0
  2. magsurveypy-1.0.0/CITATION.cff +12 -0
  3. magsurveypy-1.0.0/CONTRIBUTING.md +13 -0
  4. magsurveypy-1.0.0/INSTALL.md +162 -0
  5. magsurveypy-1.0.0/LICENSE +29 -0
  6. magsurveypy-1.0.0/MANIFEST.in +13 -0
  7. magsurveypy-1.0.0/PKG-INFO +300 -0
  8. magsurveypy-1.0.0/README.md +222 -0
  9. magsurveypy-1.0.0/SECURITY.md +5 -0
  10. magsurveypy-1.0.0/docs/ANALYSIS_GUIDE.md +91 -0
  11. magsurveypy-1.0.0/docs/ASC_CONSTRUCTION_GUIDE.md +27 -0
  12. magsurveypy-1.0.0/docs/CLEANING_GUIDE.md +13 -0
  13. magsurveypy-1.0.0/docs/COMMAND_HISTORY_AND_OUTPUT_VERSIONING.md +123 -0
  14. magsurveypy-1.0.0/docs/COMMAND_REFERENCE.md +139 -0
  15. magsurveypy-1.0.0/docs/DETAILED_HELP.md +29 -0
  16. magsurveypy-1.0.0/docs/EXPORT_GUIDE.md +259 -0
  17. magsurveypy-1.0.0/docs/FIGURE_BUILDER_GUIDE.md +159 -0
  18. magsurveypy-1.0.0/docs/FILTERS_GUIDE.md +95 -0
  19. magsurveypy-1.0.0/docs/FLUXGATE_GUIDE.md +43 -0
  20. magsurveypy-1.0.0/docs/FUNCTIONS_AND_RESULTS_REFERENCE.md +296 -0
  21. magsurveypy-1.0.0/docs/GEOREFERENCING_GUIDE.md +178 -0
  22. magsurveypy-1.0.0/docs/GRID_ASSEMBLY_GUIDE.md +15 -0
  23. magsurveypy-1.0.0/docs/GRID_LAYOUT_GUIDE.md +67 -0
  24. magsurveypy-1.0.0/docs/INSTALL.md +162 -0
  25. magsurveypy-1.0.0/docs/INTERPOLATION_GUIDE.md +56 -0
  26. magsurveypy-1.0.0/docs/POSITION_ALIGNMENT_GUIDE.md +15 -0
  27. magsurveypy-1.0.0/docs/PRM_PHASE_DECODING_GUIDE.md +20 -0
  28. magsurveypy-1.0.0/docs/PROJECT_GUIDE.md +154 -0
  29. magsurveypy-1.0.0/docs/PROJECT_STRUCTURE.md +35 -0
  30. magsurveypy-1.0.0/docs/QUICKSTART.md +87 -0
  31. magsurveypy-1.0.0/docs/README.md +28 -0
  32. magsurveypy-1.0.0/docs/RELEASE_NOTES_v1.0.0.md +24 -0
  33. magsurveypy-1.0.0/docs/REPRODUCIBILITY_AND_METHODS.md +57 -0
  34. magsurveypy-1.0.0/docs/RTK_WORKFLOW.md +48 -0
  35. magsurveypy-1.0.0/docs/SCIENTIFIC_WORKFLOW.md +39 -0
  36. magsurveypy-1.0.0/docs/SENSYS_PRM_GUIDE.md +59 -0
  37. magsurveypy-1.0.0/docs/SOFTWARE_ARCHITECTURE.md +97 -0
  38. magsurveypy-1.0.0/docs/THINNING_GUIDE.md +91 -0
  39. magsurveypy-1.0.0/docs/TOTAL_FIELD_GUIDE.md +87 -0
  40. magsurveypy-1.0.0/docs/TROUBLESHOOTING.md +47 -0
  41. magsurveypy-1.0.0/docs/VALIDATION.md +84 -0
  42. magsurveypy-1.0.0/docs/WEB_GIS_GUIDE.md +154 -0
  43. magsurveypy-1.0.0/docs/WORKFLOW_COOKBOOK.md +77 -0
  44. magsurveypy-1.0.0/examples/magsurveypy_batch_examples.ps1 +35 -0
  45. magsurveypy-1.0.0/examples/magsurveypy_batch_examples.sh +48 -0
  46. magsurveypy-1.0.0/pyproject.toml +84 -0
  47. magsurveypy-1.0.0/setup.cfg +4 -0
  48. magsurveypy-1.0.0/src/magsurveypy/__init__.py +4 -0
  49. magsurveypy-1.0.0/src/magsurveypy/__main__.py +4 -0
  50. magsurveypy-1.0.0/src/magsurveypy/assets/magsurveypy_logo.png +0 -0
  51. magsurveypy-1.0.0/src/magsurveypy/assets/north_arrow.png +0 -0
  52. magsurveypy-1.0.0/src/magsurveypy/banner.py +137 -0
  53. magsurveypy-1.0.0/src/magsurveypy/cli.py +18764 -0
  54. magsurveypy-1.0.0/src/magsurveypy/lib/__init__.py +1 -0
  55. magsurveypy-1.0.0/src/magsurveypy/lib/analysis.py +247 -0
  56. magsurveypy-1.0.0/src/magsurveypy/lib/figures.py +179 -0
  57. magsurveypy-1.0.0/src/magsurveypy/lib/georef.py +273 -0
  58. magsurveypy-1.0.0/src/magsurveypy/lib/point_filters.py +85 -0
  59. magsurveypy-1.0.0/src/magsurveypy/web/magsurveypy_web.html +372 -0
  60. magsurveypy-1.0.0/src/magsurveypy.egg-info/PKG-INFO +300 -0
  61. magsurveypy-1.0.0/src/magsurveypy.egg-info/SOURCES.txt +66 -0
  62. magsurveypy-1.0.0/src/magsurveypy.egg-info/dependency_links.txt +1 -0
  63. magsurveypy-1.0.0/src/magsurveypy.egg-info/entry_points.txt +2 -0
  64. magsurveypy-1.0.0/src/magsurveypy.egg-info/requires.txt +23 -0
  65. magsurveypy-1.0.0/src/magsurveypy.egg-info/top_level.txt +1 -0
  66. magsurveypy-1.0.0/templates/ASSEMBLY_LAYOUT_TEMPLATE.csv +4 -0
  67. magsurveypy-1.0.0/templates/FLUXGATE_LAYOUT_TEMPLATE.csv +5 -0
  68. magsurveypy-1.0.0/templates/TOTAL_FIELD_LAYOUT_TEMPLATE.csv +6 -0
@@ -0,0 +1,77 @@
1
+ # Workflow Cookbook
2
+
3
+ These examples use the public acquisition-class interface.
4
+
5
+ ## Multichannel survey
6
+
7
+ ```bash
8
+ mspy project init Rupea --category multichannel
9
+ mspy project import Rupea /path/to/acquisition_export --type multichannel
10
+ mspy survey multichannel --project Rupea --format auto --workflow standard
11
+ mspy analyze survey --project Rupea
12
+ mspy process interpolate --project Rupea
13
+ ```
14
+
15
+ ## Multichannel ploughed/noisy variants
16
+
17
+ ```bash
18
+ mspy survey multichannel --project Site --format auto --workflow ploughed
19
+ ```
20
+
21
+ ```bash
22
+ mspy survey multichannel --project Site --format auto --workflow noisy
23
+ ```
24
+
25
+ ## Total-field preservation workflow
26
+
27
+ ```bash
28
+ mspy project init Site --category total-field
29
+ mspy project import Site /path/to/data --type total-field
30
+ mspy survey grid --project Site --protocol total-field --workflow preservation
31
+ ```
32
+
33
+ ## Total-field archaeology workflow
34
+
35
+ ```bash
36
+ mspy survey grid --project Site --protocol total-field \
37
+ --traverse-zero median --deslope robust \
38
+ --destripe protected --destripe-strength 1 \
39
+ --high-pass 5 --archaeology-center robust \
40
+ --cell-size 0.25 --statistic mean
41
+ ```
42
+
43
+ ## Optional vertical gradient from split total-field sensors
44
+
45
+ ```bash
46
+ mspy survey grid --project Site --protocol total-field \
47
+ --gradient vertical --sensor-separation 0.50
48
+ ```
49
+
50
+ ## Optional horizontal gradient from split total-field sensors
51
+
52
+ ```bash
53
+ mspy survey grid --project Site --protocol total-field \
54
+ --gradient horizontal --sensor-separation 0.50
55
+ ```
56
+
57
+ These gradient commands retain `Results/TOTAL_FIELD` and add `Results/GRADIENT_VERTICAL` or `Results/GRADIENT_HORIZONTAL`.
58
+
59
+ ## Fluxgate/gradiometer local grids
60
+
61
+ ```bash
62
+ mspy project init GradSite --category fluxgate
63
+ mspy project import GradSite /path/to/grid_data --type fluxgate
64
+ mspy layout gui --project GradSite --protocol fluxgate
65
+ mspy layout validate --project GradSite --protocol fluxgate
66
+ mspy survey grid --project GradSite --protocol fluxgate --workflow archaeology
67
+ ```
68
+
69
+ ## Analysis and presentation
70
+
71
+ ```bash
72
+ mspy analyze survey --project Site
73
+ mspy analyze spectrum --project Site --from INTERPOLATED
74
+ mspy figure single --project Site --from INTERPOLATED --display-range 15
75
+ mspy export map --project Site --from INTERPOLATED
76
+ mspy web --project Site
77
+ ```
@@ -0,0 +1,12 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use MagSurveyPy in research, please cite the software and the associated publication when available."
3
+ title: "MagSurveyPy: Archaeological Magnetometry Prospection Suite"
4
+ type: software
5
+ license: BSD-3-Clause
6
+ authors:
7
+ - family-names: "Hegyi"
8
+ given-names: "Alexandru"
9
+ version: 1.0.0
10
+ date-released: 2026-09-10
11
+ url: "https://github.com/alexandruhegyi/MagSurveyPy"
12
+ repository-code: "https://github.com/alexandruhegyi/MagSurveyPy"
@@ -0,0 +1,13 @@
1
+ # Contributing to MagSurveyPy
2
+
3
+ Contributions are welcome through GitHub issues and pull requests.
4
+
5
+ For code changes:
6
+
7
+ 1. Create a branch from the current development branch.
8
+ 2. Keep scientific changes separate from interface/documentation changes where possible.
9
+ 3. Add or update a regression test when changing processing behavior.
10
+ 4. Run `mspy --version`, `mspy --help`, and `mspy tools doctor` after installation.
11
+ 5. Describe any change that can alter scientific output explicitly in the pull request.
12
+
13
+ Please avoid committing project datasets, generated results, environments, caches, or credentials.
@@ -0,0 +1,162 @@
1
+ # MagSurveyPy v1.0.0 — Installation
2
+
3
+ MagSurveyPy supports Python 3.11 and newer. The installed command-line interface is `mspy`.
4
+
5
+ ## Recommended installation: pip
6
+
7
+ ### From PyPI
8
+
9
+ After the public PyPI release:
10
+
11
+ ```bash
12
+ python -m pip install magsurveypy
13
+ ```
14
+
15
+ Verify:
16
+
17
+ ```bash
18
+ mspy --version
19
+ mspy --help
20
+ mspy tools doctor
21
+ ```
22
+
23
+ ### From a cloned or extracted source tree
24
+
25
+ From the directory containing `pyproject.toml`:
26
+
27
+ ```bash
28
+ python -m pip install .
29
+ ```
30
+
31
+ For development only:
32
+
33
+ ```bash
34
+ python -m pip install -e .
35
+ ```
36
+
37
+ To refresh an installed local checkout without reinstalling already-present dependencies:
38
+
39
+ ```bash
40
+ python -m pip install --force-reinstall --no-deps .
41
+ ```
42
+
43
+ The `[project.scripts]` entry in `pyproject.toml` creates `mspy` automatically. No shell launcher or manually created alias is required.
44
+
45
+ ### Install directly from GitHub
46
+
47
+ After the public repository is ready:
48
+
49
+ ```bash
50
+ python -m pip install git+https://github.com/alexandruhegyi/MagSurveyPy.git
51
+ ```
52
+
53
+ ### Upgrade
54
+
55
+ ```bash
56
+ python -m pip install --upgrade magsurveypy
57
+ ```
58
+
59
+ ### Uninstall
60
+
61
+ ```bash
62
+ python -m pip uninstall magsurveypy
63
+ ```
64
+
65
+ If you installed into a virtual environment or Conda environment, activate that same environment before uninstalling. Uninstalling MagSurveyPy removes the installed package and `mspy` command from that environment only; it does not delete user projects, raw data, processed results, source folders or downloaded archives.
66
+
67
+ ## Alternative installation: Conda environment
68
+
69
+ The supplied `environment.yml` is an alternative for users who prefer Conda/Miniforge. Run it from the MagSurveyPy source directory:
70
+
71
+ ```bash
72
+ conda env create -f environment.yml
73
+ conda activate magsurveypy
74
+ mspy --version
75
+ mspy --help
76
+ ```
77
+
78
+ The environment file installs both the scientific/GIS dependencies and the local MagSurveyPy package. Therefore the `mspy` command is created inside the Conda environment as well.
79
+
80
+ To remove the entire Conda environment:
81
+
82
+ ```bash
83
+ conda deactivate
84
+ conda env remove -n magsurveypy
85
+ ```
86
+
87
+ To keep the environment but uninstall only MagSurveyPy:
88
+
89
+ ```bash
90
+ conda activate magsurveypy
91
+ python -m pip uninstall magsurveypy
92
+ ```
93
+
94
+ ## Project workspace
95
+
96
+ Projects are stored by default under:
97
+
98
+ ```text
99
+ ~/MagSurveyPy_Projects/
100
+ ```
101
+
102
+ Set a custom workspace with `MAGSURVEYPY_WORKSPACE`.
103
+
104
+ Linux/macOS:
105
+
106
+ ```bash
107
+ export MAGSURVEYPY_WORKSPACE=/data/MagSurveyPy_Projects
108
+ ```
109
+
110
+ Windows PowerShell:
111
+
112
+ ```powershell
113
+ $env:MAGSURVEYPY_WORKSPACE = "D:\MagSurveyPy_Projects"
114
+ ```
115
+
116
+ ## First project
117
+
118
+ Multichannel:
119
+
120
+ ```bash
121
+ mspy project init Site --category multichannel
122
+ mspy project import Site /path/to/data --type multichannel
123
+ mspy survey multichannel --project Site --format auto --workflow standard
124
+ ```
125
+
126
+ Total field:
127
+
128
+ ```bash
129
+ mspy project init Site --category total-field
130
+ mspy project import Site /path/to/data --type total-field
131
+ mspy survey grid --project Site --protocol total-field --workflow preservation
132
+ ```
133
+
134
+ Fluxgate/gradiometer:
135
+
136
+ ```bash
137
+ mspy project init Site --category fluxgate
138
+ mspy project import Site /path/to/data --type fluxgate
139
+ mspy survey grid --project Site --protocol fluxgate --workflow archaeology
140
+ ```
141
+
142
+ For split-sensor total-field data, optional gradient products can be added with `--gradient vertical` or `--gradient horizontal` and a known `--sensor-separation`.
143
+
144
+ ## Linux Tk support
145
+
146
+ The local-grid layout editor uses Tk. Most Conda distributions and standard Python installers provide it. On a minimal Debian/Ubuntu system, if Tk is unavailable:
147
+
148
+ ```bash
149
+ sudo apt install python3-tk
150
+ ```
151
+
152
+ ## Troubleshooting
153
+
154
+ Confirm which executable is active:
155
+
156
+ ```bash
157
+ which mspy
158
+ mspy --version
159
+ python -m pip show magsurveypy
160
+ ```
161
+
162
+ On Windows PowerShell use `Get-Command mspy` instead of `which mspy`.
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Alexandru Hegyi
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,13 @@
1
+ include README.md
2
+ include INSTALL.md
3
+ include BATCH_COMMAND_EXAMPLES.md
4
+ recursive-include src/magsurveypy/assets *.png
5
+ recursive-include src/magsurveypy/web *.html
6
+ recursive-include docs *.md
7
+ recursive-include examples *.sh *.ps1
8
+ recursive-include templates *.csv
9
+
10
+ include LICENSE
11
+ include CITATION.cff
12
+ include CONTRIBUTING.md
13
+ include SECURITY.md
@@ -0,0 +1,300 @@
1
+ Metadata-Version: 2.4
2
+ Name: magsurveypy
3
+ Version: 1.0.0
4
+ Summary: Archaeological Magnetometry Prospection Suite
5
+ Author-email: Alexandru Hegyi <alexandruhegyi@gmail.com>
6
+ License: BSD 3-Clause License
7
+
8
+ Copyright (c) 2026, Alexandru Hegyi
9
+ All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are met:
13
+
14
+ 1. Redistributions of source code must retain the above copyright notice, this
15
+ list of conditions and the following disclaimer.
16
+
17
+ 2. Redistributions in binary form must reproduce the above copyright notice,
18
+ this list of conditions and the following disclaimer in the documentation
19
+ and/or other materials provided with the distribution.
20
+
21
+ 3. Neither the name of the copyright holder nor the names of its
22
+ contributors may be used to endorse or promote products derived from
23
+ this software without specific prior written permission.
24
+
25
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+
36
+ Project-URL: Homepage, https://alexandruhegyi.com
37
+ Project-URL: Documentation, https://github.com/alexandruhegyi/MagSurveyPy
38
+ Project-URL: Source, https://github.com/alexandruhegyi/MagSurveyPy
39
+ Project-URL: Issues, https://github.com/alexandruhegyi/MagSurveyPy/issues
40
+ Keywords: archaeology,archaeological geophysics,magnetometry,geophysics,GIS,magnetic prospection
41
+ Classifier: Development Status :: 4 - Beta
42
+ Classifier: Environment :: Console
43
+ Classifier: Intended Audience :: Science/Research
44
+ Classifier: License :: OSI Approved :: BSD License
45
+ Classifier: Natural Language :: English
46
+ Classifier: Operating System :: OS Independent
47
+ Classifier: Programming Language :: Python :: 3
48
+ Classifier: Programming Language :: Python :: 3.11
49
+ Classifier: Programming Language :: Python :: 3.12
50
+ Classifier: Topic :: Scientific/Engineering
51
+ Classifier: Topic :: Scientific/Engineering :: GIS
52
+ Requires-Python: >=3.11
53
+ Description-Content-Type: text/markdown
54
+ License-File: LICENSE
55
+ Requires-Dist: numpy>=1.26
56
+ Requires-Dist: scipy>=1.11
57
+ Requires-Dist: pandas>=2.0
58
+ Requires-Dist: pyproj>=3.6
59
+ Requires-Dist: rasterio>=1.3
60
+ Requires-Dist: affine>=2.4
61
+ Requires-Dist: matplotlib>=3.8
62
+ Requires-Dist: tqdm>=4.66
63
+ Requires-Dist: scikit-image>=0.22
64
+ Requires-Dist: Pillow>=10
65
+ Requires-Dist: geopandas>=0.14
66
+ Requires-Dist: shapely>=2.0
67
+ Requires-Dist: threadpoolctl>=3.1
68
+ Requires-Dist: contextily>=1.5
69
+ Requires-Dist: xyzservices>=2024.4.0
70
+ Requires-Dist: metpy>=1.6
71
+ Requires-Dist: ppigrf>=2.0.0
72
+ Requires-Dist: pyogrio>=0.9
73
+ Provides-Extra: dev
74
+ Requires-Dist: build>=1.2; extra == "dev"
75
+ Requires-Dist: pytest>=8; extra == "dev"
76
+ Requires-Dist: ruff>=0.6; extra == "dev"
77
+ Dynamic: license-file
78
+
79
+ # MagSurveyPy v1.0.0
80
+
81
+ ![MagSurveyPy](src/magsurveypy/assets/magsurveypy_logo.png)
82
+
83
+ **Archaeological Magnetometry Prospection Suite**
84
+ Developed by **Alexandru Hegyi, PhD**
85
+ Website: https://alexandruhegyi.com · Email: alexandruhegyi@gmail.com · GitHub: https://github.com/alexandruhegyi
86
+
87
+ MagSurveyPy is a project-based Python package and command-line application for archaeological magnetometry processing, quality control, analysis, visualization, GIS integration, cartographic export and local Web GIS. The public survey interface is organized around scientific acquisition classes rather than instrument manufacturers.
88
+
89
+ ## Survey model
90
+
91
+ MagSurveyPy v1.0.0 uses two primary survey families:
92
+
93
+ ```text
94
+ mspy survey multichannel ...
95
+ mspy survey grid --protocol total-field ...
96
+ mspy survey grid --protocol fluxgate ...
97
+ ```
98
+
99
+ - **Multichannel**: multichannel magnetic acquisition, including supported native acquisition exports and normalized ASC/tabular data while retaining source, session, sensor and channel provenance where available.
100
+ - **Total field**: gridded scalar total magnetic field data in nT. A normal exported file may contain one final reading column and is processed directly.
101
+ - **Fluxgate**: gridded fluxgate magnetometry/gradiometry data, normally in nT/m.
102
+
103
+ File formats are adapters, not survey categories. Supported workflows include PRM as one multichannel input example, paired HDR/DAT as one grid-format example, and generic ASC/CSV/TXT/XYZ/DAT and quantitative GIS raster/vector formats where scientifically meaningful.
104
+
105
+ ### Optional gradients from split-sensor total-field data
106
+
107
+ If a total-field file retains two simultaneous sensor channels, MagSurveyPy can create an **additional** vertical or horizontal gradient product without replacing the original total-field result:
108
+
109
+ ```bash
110
+ mspy survey grid --project Site --protocol total-field \
111
+ --gradient vertical --sensor-separation 0.50
112
+
113
+ mspy survey grid --project Site --protocol total-field \
114
+ --gradient horizontal --sensor-separation 0.50
115
+ ```
116
+
117
+ For vertical geometry, the default paired-sensor convention is sensor 1/top and sensor 2/bottom, with `(top - bottom) / separation`. For horizontal geometry, sensor 1/left and sensor 2/right are used, with `(right - left) / separation`. Column names and sign convention can be specified explicitly. If a measured gradient column already exists, it can be used directly. **Sensor separation is never guessed.**
118
+
119
+ A file containing only one final reading column remains a standard total-field input; simply omit `--gradient`.
120
+
121
+ ## Installation
122
+
123
+ ### Recommended: pip
124
+
125
+ When MagSurveyPy is available from PyPI:
126
+
127
+ ```bash
128
+ python -m pip install magsurveypy
129
+ ```
130
+
131
+ For the current source checkout:
132
+
133
+ ```bash
134
+ python -m pip install .
135
+ ```
136
+
137
+ Installation creates the `mspy` command automatically through the package entry point:
138
+
139
+ ```bash
140
+ mspy --version
141
+ mspy --help
142
+ mspy tools doctor
143
+ ```
144
+
145
+ Upgrade later with:
146
+
147
+ ```bash
148
+ python -m pip install --upgrade magsurveypy
149
+ ```
150
+
151
+ Uninstall with:
152
+
153
+ ```bash
154
+ python -m pip uninstall magsurveypy
155
+ ```
156
+
157
+ This removes the installed Python package and the `mspy` entry point from the active environment. It does **not** remove MagSurveyPy projects, raw survey data, processed results, source folders or downloaded archives.
158
+
159
+ ### Alternative: Conda environment
160
+
161
+ From the repository root:
162
+
163
+ ```bash
164
+ conda env create -f environment.yml
165
+ conda activate magsurveypy
166
+ mspy --version
167
+ ```
168
+
169
+ The supplied Conda environment installs the MagSurveyPy package itself, so the same `mspy` command is available; no manual launcher or shell alias is required.
170
+
171
+ See [INSTALL.md](INSTALL.md) for details.
172
+
173
+ ## Project creation
174
+
175
+ Projects are stored by default under `~/MagSurveyPy_Projects/` and use generic acquisition folders:
176
+
177
+ ```text
178
+ Site/
179
+ ├── project.json
180
+ ├── RawData/
181
+ │ ├── Multichannel/
182
+ │ ├── TotalField/
183
+ │ ├── Fluxgate/
184
+ │ ├── Generic/
185
+ │ ├── GNSS/
186
+ │ └── BaseStation/
187
+ ├── Config/
188
+ ├── Layouts/
189
+ ├── Results/
190
+ ├── Reports/
191
+ ├── Exports/
192
+ ├── Logs/
193
+ └── Temp/
194
+ ```
195
+
196
+ Create a project according to its main acquisition class:
197
+
198
+ ```bash
199
+ mspy project init Rupea --category multichannel
200
+ mspy project init Foeni --category total-field
201
+ mspy project init GradSite --category fluxgate
202
+ mspy project init MixedSite --category mixed
203
+ ```
204
+
205
+ Import data into the corresponding generic branch:
206
+
207
+ ```bash
208
+ mspy project import Rupea /path/to/data --type multichannel
209
+ mspy project import Foeni /path/to/data --type total-field
210
+ mspy project import GradSite /path/to/data --type fluxgate
211
+ ```
212
+
213
+ `--mode link` can be used instead of copying files when appropriate.
214
+
215
+ ## Typical workflows
216
+
217
+ ### Multichannel magnetic acquisition
218
+
219
+ ```bash
220
+ mspy project init Rupea --category multichannel
221
+ mspy project import Rupea /path/to/multichannel_export --type multichannel
222
+ mspy survey multichannel --project Rupea --format auto --workflow standard
223
+ mspy analyze survey --project Rupea
224
+ mspy process interpolate --project Rupea
225
+ # Explicit source files may also be written as:
226
+ mspy process interpolate --project Rupea --input ./points.asc --method archaeology
227
+ mspy figure single --project Rupea --from INTERPOLATED --display-range 15
228
+ ```
229
+
230
+ Normalized ASC can be supplied directly where the existing multichannel importer supports it. Format-specific adapters can be selected explicitly when automatic detection is not suitable.
231
+
232
+ ### Total-field grid
233
+
234
+ ```bash
235
+ mspy project init Foeni --category total-field
236
+ mspy project import Foeni /path/to/total_field_data --type total-field
237
+ mspy survey grid --project Foeni --protocol total-field --workflow preservation
238
+ mspy analyze survey --project Foeni --from TOTAL_FIELD
239
+ ```
240
+
241
+ A more archaeology-oriented processing example is:
242
+
243
+ ```bash
244
+ mspy survey grid --project Foeni --protocol total-field \
245
+ --traverse-zero median \
246
+ --deslope robust \
247
+ --destripe protected \
248
+ --destripe-strength 1 \
249
+ --high-pass 5 \
250
+ --archaeology-center median \
251
+ --cell-size 0.25 \
252
+ --statistic mean
253
+ ```
254
+
255
+ The absolute/reference field is retained separately from derived archaeology-oriented products.
256
+
257
+ ### Fluxgate / gradiometer grid
258
+
259
+ ```bash
260
+ mspy project init GradSite --category fluxgate
261
+ mspy project import GradSite /path/to/grid_data --type fluxgate
262
+ mspy layout gui --project GradSite --protocol fluxgate
263
+ mspy layout validate --project GradSite --protocol fluxgate
264
+ mspy survey grid --project GradSite --protocol fluxgate --workflow archaeology
265
+ mspy analyze survey --project GradSite --from FLUXGATE
266
+ ```
267
+
268
+ ## Command groups
269
+
270
+ ```text
271
+ project create, import, configure and inspect projects
272
+ survey initial acquisition-aware processing
273
+ layout define and validate local-grid geometry
274
+ process interpolation, cleaning, enhancement and derived products
275
+ filter explicit observation/raster corrections
276
+ analyze survey, line, sensor, raster, spectrum and stage QC
277
+ figure scientific and publication figures
278
+ export GIS/cartographic outputs and reprojection
279
+ web interactive local Web GIS
280
+ gnss GNSS/RINEX/PPK utilities
281
+ tools diagnostics and generated help
282
+ guide scientific workflow guides
283
+ help detailed command help
284
+ ```
285
+
286
+ Use `mspy --help`, `mspy project --help`, `mspy survey --help`, and `mspy survey grid --help` for built-in documentation.
287
+
288
+ ## Reproducibility and data preservation
289
+
290
+ MagSurveyPy keeps original field files separate from derived products. Processing commands maintain project logs, and `--increment` can preserve an existing derived stage while creating a numbered output stage. Analysis commands create diagnostics without altering scientific data. Display-only controls such as brightness, contrast, gamma and saturation do not modify quantitative raster values.
291
+
292
+ ## License and warranty
293
+
294
+ MagSurveyPy is distributed under the **BSD 3-Clause License**. The full legal terms are in [LICENSE](LICENSE).
295
+
296
+ The software is provided **“AS IS”**, without warranties of any kind. Users remain responsible for validating processing choices, coordinate systems, sensor geometry, derived gradients, quantitative outputs and archaeological interpretation for their own data and purpose.
297
+
298
+ ## Citation
299
+
300
+ Citation metadata are supplied in [CITATION.cff](CITATION.cff). A persistent DOI will be added after the v1.0.0 release is archived.