# Getting Started

Setup a virtual environment and install the requirements. For platforms without
pre-built wheels (such as OpenBSD), this step may take several minutes.

        $ python3 -m venv venv
        $ . venv/bin/activate
        $ pip install -r requirements.txt

Make sure you have your data ulimit value set to something high:

        $ ulimit -d 130036380

Now start the simulation:

        $ ./simulate_blasts.py  --blast-cube-center 0,0,0 \
                                --blast-cube-extents-meters 20 \
                                --blast-cube-segments 9 \
                                --blast-min-dist-meters 2.5 \
                                --initial-peak-pressure-kpa 50000 \
                                --ray-resolution-arcmin 5 \
                                --ray-max-bounces 5 \
                                --ray-max-length-meters 35 \
                                --sensor-diameter-meters 0.111 \
                                --helmet-geometry assets/MICH.obj \
                                --vest-geometry assets/SAPI.obj \
                                --max-workers 15

# Analysis

The `analysis.R` file contains various snippets that are used to support data
analysis. The top two lines should be uncommented and ran if the R workspace
does not already have those packages installed. Comments throughout the code
indicate the use of each region of the code. To summarize in broad strokes, an
ANOVA is performed followed by paired t-tests with a Holm adjustment.

To quickly get the relevant data:

        $ R -q -s --no-save < analysis.R

# Visualization

The `visualize.R` file contains visualization snippets for looking at the data.

# Project Notes

The geometry is oriented such that the helmet is facing the negative Y
direction. The environment is oriented Z-up, X-left, Y-rearward

        pkg_add     spatialindex

Set `_jupyter` memory limit to much larger

# License

Copyright (C) 2025 SWGY, Inc

This project — including source code, the geometry assets in `assets/`, the
simulation outputs in `data/`, and the `Exploration.ipynb` notebook — is
licensed under the GNU Affero General Public License, version 3 or (at your
option) any later version. See the [`LICENSE`](./LICENSE) file for the full
text, or <https://www.gnu.org/licenses/agpl-3.0.html>.

`SPDX-License-Identifier: AGPL-3.0-or-later`
