A tutorial on electrogastrography using low-cost hardware and open-source software
Pith reviewed 2026-05-18 14:06 UTC · model grok-4.3
The pith
A new electrogastrography analysis pipeline using all channels after ICA reduces data rejection compared to manual selection.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The paper claims that applying independent component analysis after basic filtering allows reliable isolation of the gastric signal, enabling the recomposition of the electrogastrogram from all recorded channels following automatic rejection of nuisance components. This results in lower rates of data rejection than traditional methods that involve manual channel selection, along with retention of multi-channel information and decreased researcher bias in the analysis process.
What carries the argument
The recomposition of the electrogastrogram from all channels after automatic rejection of artifact-related independent components via ICA following filtering steps.
If this is right
- Data from all recorded channels can be retained rather than selecting a single channel for analysis.
- Overall data rejection is lower than with established manual selection approaches.
- Researcher bias from subjective channel choice is reduced.
- The pipeline works with low-cost amplifiers but applies to higher-end equipment as well.
- Implementation is supported by a freely available open-source Python package.
Where Pith is reading between the lines
- This method could enable larger sample sizes in studies of gastrointestinal function by minimizing participant data loss.
- It may integrate with other biosignal recordings for combined analysis of brain-gut interactions.
- Future work could test the pipeline on clinical populations with known gastric motility issues to validate signal fidelity.
Load-bearing premise
Independent component analysis applied after basic filtering can reliably isolate the gastric signal from movement and other artifacts across participants without requiring manual verification or discarding signal-bearing components.
What would settle it
A direct comparison on the same dataset showing no reduction in rejected data segments or loss of expected 3 cycles per minute gastric rhythm when using the ICA pipeline versus traditional methods.
Figures
read the original abstract
Electrogastrography is the recording of changes in electric potential caused by the stomach's pacemaker region, typically through several cutaneous sensors placed on the abdomen. It is a worthwhile technique in medical and psychological research, but also relatively niche. Here we present a tutorial on the acquisition and analysis of the human electrogastrogram. Because dedicated equipment and software can be prohibitively expensive, we demonstrate how data can be acquired using a low-cost OpenBCI Ganglion amplifier. We also present a processing pipeline that minimises attrition, which is particularly helpful for low-cost equipment but also applicable to top-of-the-line hardware. Our approach comprises outlier rejection, frequency filtering, movement filtering, and noise reduction using independent component analysis. Where traditional approaches include a subjective step in which only one channel is manually selected for further analysis, our pipeline recomposes the electrogastrogram from all recorded channels after automatic rejection of nuisance components. The main benefits of this approach are reduced attrition, retention of data from all recorded channels, and reduced influence of researcher bias. In addition to our tutorial on the method, we offer a proof-of-principle in which our approach leads to reduced data rejection compared to established methods. We aimed to describe each step in sufficient detail to be implemented in any programming language. In addition, we made an open-source Python package freely available for ease of use.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper is a tutorial on electrogastrography (EGG) acquisition and analysis using low-cost OpenBCI Ganglion hardware and an open-source Python package. It describes a pipeline that includes outlier rejection, frequency filtering, movement filtering, and independent component analysis (ICA) for noise reduction. The key innovation is recomposing the EGG from all recorded channels after automatic rejection of nuisance components, contrasting with traditional manual selection of a single channel. The authors provide a proof-of-principle showing reduced data rejection compared to established methods, with benefits including reduced attrition, retention of all channels, and decreased researcher bias.
Significance. If validated, this approach could make EGG more accessible and increase data retention in research, particularly for studies using affordable equipment. The open-source software and detailed tutorial are valuable contributions for reproducibility in this niche field.
major comments (1)
- [Processing Pipeline / ICA step] The manuscript does not provide explicit, reproducible criteria for the automatic rejection of ICA components (e.g., specific frequency thresholds around 3 cpm, spatial patterns, or kurtosis values). This is critical because the central claim of reduced data rejection and retention of all channels relies on the ICA step reliably separating gastric signals from movement and respiratory artifacts without manual intervention or signal loss. Overlapping spectra in EGG make this challenging, and without quantitative validation that the reconstructed signal retains expected gastric power, the benefit over traditional methods remains uncertain.
minor comments (2)
- [Abstract] Consider adding a brief mention of the sample size or number of participants in the proof-of-principle to give readers an immediate sense of the empirical support.
- [Software availability] Ensure the open-source Python package is linked with a DOI or GitHub repository in the main text for easy access.
Simulated Author's Rebuttal
We thank the referee for their constructive review and for recognizing the potential value of our open-source tutorial and processing pipeline for making EGG more accessible. We address the single major comment below and have revised the manuscript to improve reproducibility.
read point-by-point responses
-
Referee: The manuscript does not provide explicit, reproducible criteria for the automatic rejection of ICA components (e.g., specific frequency thresholds around 3 cpm, spatial patterns, or kurtosis values). This is critical because the central claim of reduced data rejection and retention of all channels relies on the ICA step reliably separating gastric signals from movement and respiratory artifacts without manual intervention or signal loss. Overlapping spectra in EGG make this challenging, and without quantitative validation that the reconstructed signal retains expected gastric power, the benefit over traditional methods remains uncertain.
Authors: We agree that explicit documentation of the ICA rejection criteria is necessary for full reproducibility and for substantiating the central claim. Although the open-source Python package implements the automated rejection step, the original manuscript text described the pipeline at a higher level without listing the precise decision rules. In the revised manuscript we have added a new subsection that details the criteria used: components are rejected if their dominant frequency falls outside the gastric band (2.4–3.6 cpm), if they exhibit high correlation with simultaneously recorded movement or respiration channels, or if they display elevated kurtosis indicative of artifact. We have also inserted a supplementary figure and accompanying text that compare the power spectrum of the recomposed multi-channel signal against the single-channel approach, confirming preservation of the expected 3 cpm gastric peak while attenuating artifactual power. These additions directly respond to the concern about overlapping spectra and provide the quantitative validation requested. revision: yes
Circularity Check
No significant circularity in methodological tutorial and empirical comparison
full rationale
The paper is a tutorial describing a practical EGG acquisition and analysis pipeline (outlier rejection, frequency filtering, movement filtering, ICA-based noise reduction) with a proof-of-principle empirical comparison to established methods. No mathematical derivations, predictions, or first-principles results are presented that reduce to fitted parameters, self-definitions, or self-citation chains by construction. The central benefit claim (reduced attrition and retention of all channels) is framed as an external check against traditional single-channel manual selection, not as a result forced by the pipeline's own inputs. The work is self-contained against external benchmarks and contains no load-bearing steps matching the enumerated circularity patterns.
Axiom & Free-Parameter Ledger
axioms (2)
- domain assumption Gastric electrical activity is concentrated in a narrow low-frequency band that can be isolated by filtering
- domain assumption Independent component analysis can separate the stomach signal from movement and other noise sources in multi-channel abdominal recordings
Lean theorems connected to this paper
-
IndisputableMonolith/Cost/FunctionalEquation.leanwashburn_uniqueness_aczel unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
Our approach comprises outlier rejection, frequency filtering, movement filtering, and noise reduction using independent component analysis... recomposes the electrogastrogram from all recorded channels after automatic rejection of nuisance components.
-
IndisputableMonolith/Foundation/DimensionForcing.leanalexander_duality_circle_linking unclear?
unclearRelation between the paper passage and the cited Recognition theorem.
the signature 3 cycles per minute (cpm) slow wave rhythm
What do these tags mean?
- matches
- The paper's claim is directly supported by a theorem in the formal canon.
- supports
- The theorem supports part of the paper's argument, but the paper may add assumptions or extra steps.
- extends
- The paper goes beyond the formal theorem; the theorem is a base layer rather than the whole result.
- uses
- The paper appears to rely on the theorem as machinery.
- contradicts
- The paper's claim conflicts with a theorem or certificate in the canon.
- unclear
- Pith found a possible connection, but the passage is too broad, indirect, or ambiguous to say the theorem truly supports the claim.
Reference graph
Works this paper leans on
-
[1]
Alladin, S. N. B., Berry, D., Anisimova, E., Judson, R., Whittaker, P., & Dalmaijer, E. S. (2024). Children aged 5-13 years show adult-like disgust avoidance, but not proto-nausea. Brain and Neuroscience Advances. https://doi.org/10.1177/23982128241279616 Alladin, S. N. B., Judson, R., Whittaker, P., Attwood, A. S., & Dalmaijer, E. S. (2024). Review of th...
-
[2]
Auda, J., Gruenefeld, U., Kosch, T., & Schneegaß, S. (2022). The Butterfly Effect: Novel Opportunities for Steady-State Visually-Evoked Potential Stimuli in Virtual Reality. https://doi.org/10.1145/3519391.3519397 Banellis, L., Rebollo, I., Nikolova, N., & Allen, M. (2025). Stomach–brain coupling indexes a dimensional signature of mental health. Nature Me...
-
[3]
https://doi.org/10.4236/jsea.2019.129023 Dalmaijer, E. S., Hirst, R. J., & Peirce, J. (2025). Python for experimental psychologists: A fun way of learning how to code your experiments and analyses (Second ed). Routledge. 22 ELECTROGASTROGRAPHY TUTORIAL Dalmaijer, E. S., Mathôt, S., & Van der Stigchel, S. (2014). PyGaze: An open-source, cross- platform too...
-
[4]
https://doi.org/10.1038/s41598-018-23302-9 Gumussoy, M., Anisimova, E., Lee, S., Velummylum, A., Cox, S., Bagley, E., Nord, C. L., & Dalmaijer, E. S. (2025). Orthorexia is associated with a paradoxical appetitive gastric response to unhealthy foods. Cold Spring Harbor Laboratory. https://doi.org/10.1101/2025.06.27.661259 Ha, J., Baek, S.-C., Lim, Y ., & C...
-
[5]
https://doi.org/10.3389/fmed.2024.1369753 Peterson, V ., Galván, C., Hernández, H., & Spies, R. (2020). A feasibility study of a complete low- cost consumer-grade brain-computer interface system. Heliyon, 6(3), e03425. https://doi.org/10.1016/j.heliyon.2020.e03425 Rebollo, I., Devauchelle, A.-D., Béranger, B., & Tallon-Baudry, C. (2018). Stomach-brain syn...
-
[6]
https://doi.org/10.1186/s12938-022-01010-w Thomson, L., Robinson, T. L., Lee, J. C. F., Farraway, L. A., Hughes, M. J. G., Andrews, D. W., & Huizinga, J. D. (1998). Interstitial cells of Cajal generate a rhythmic pacemaker current. Nature Medicine, 4(7), Article
-
[7]
https://doi.org/10.1038/nm0798-848 Vianna, E. P. M., & Tranel, D. (2006). Gastric myoelectrical activity as an index of emotional arousal. International Journal of Psychophysiology, 61(1), 70–76. https://doi.org/10.1016/j.ijpsycho.2005.10.019 Vujic, A., Tong, S., Picard, R., & Maes, P. (2020). Going with our Guts: Potentials of Wearable Electrogastrograph...
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.