Web interface for findhcB — data-depth CUSUM control-limit calibration with automatic Markov-order selection. Companion implementation for the cB-CUSUM chart (see Citation below).
Quick install:
brew tap mbperry/findhcb && brew trust mbperry/findhcb && brew install findhcb, then runfindhcb.
The MATLAB function findhcB_auto_order is compiled to a standalone C binary via
MATLAB Coder. A small Flask app wraps that binary so users can upload a T2
series, pick parameters, and read back the estimated control limit (h) and
realized ARL0 (arl0) from a browser.
Pick the path that matches how you want to launch the app.
If you don't already have Homebrew, install it first (one-time, ever):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Then tap, trust, install — pick one of the two flavors below (or both):
# (a) CLI / web-app launcher — type `findhcb` in Terminal to start
brew tap mbperry/findhcb
brew trust mbperry/findhcb
brew install findhcb
# (b) Mac-style .app — double-click findhcB in /Applications or Spotlight
brew tap mbperry/findhcb # skip if you already tapped above
brew trust mbperry/findhcb # skip if you already trusted above
brew install --cask mbperry/findhcb/findhcb-app
xattr -dr com.apple.quarantine /Applications/findhcB.appbrew trust is only needed once per tap, before the very first install.
After that, regular brew install / brew upgrade works without re-trusting.
The trailing xattr -dr com.apple.quarantine … strips the macOS quarantine
attribute that Homebrew preserves on unsigned .app bundles, which is what
otherwise causes the "Apple could not verify…" dialog. (Add sudo in front
if you get a permission error.) Once the .app is notarized (see below), this
extra step is not needed.
| Method | What you get | Gatekeeper warning? |
|---|---|---|
Download findhcB-macos.dmg, drag to Applications |
findhcB.app in /Applications | Yes¹ |
Download findhcB-macos.zip, double-click Start findhcB.command |
Portable folder | Yes¹ |
¹ Until the build is notarized (see Enable Apple notarization below).
Apple removed the old right-click → Open → Open shortcut in macOS Sequoia (15) and later. The warning dialog now only offers Move to Trash and Done — there's no Open button. You approve the app once via System Settings:
- Click Done to dismiss the warning.
- Open System Settings → Privacy & Security.
- Scroll down to the Security section. You'll see a line like "findhcB" was blocked to protect your Mac. Click Open Anyway.
- Confirm with your password / Touch ID.
- Launch the app again. This time the dialog shows an Open button — click it. Subsequent launches don't prompt.
If you'd rather skip the whole dance, use Homebrew above (formulas aren't
quarantined; for the cask, run xattr -dr com.apple.quarantine /Applications/findhcB.app
right after install), or wait for a notarized release.
brew tap mbperry/findhcb
brew trust mbperry/findhcb
brew install findhcb| Method | What you get |
|---|---|
Download findhcB-x86_64.AppImage, chmod +x, double-click |
Single self-contained file |
Download findhcB-linux-x86_64.zip, run ./run_app.sh |
Portable folder |
| Method | What you get | Python required? |
|---|---|---|
Download findhcB-Setup.exe, run it |
Start Menu + Desktop shortcut | No — bundled |
Download findhcB-windows-x86_64.zip, double-click Start findhcB.bat |
Portable folder | Yes (install from python.org first) |
SmartScreen will warn on first launch of the unsigned installer ("Windows protected your PC"). Click More info → Run anyway.
Whichever path you used, the app starts a local web server at http://127.0.0.1:5050 and opens it in your browser. First launch downloads Flask + Waitress (~5 MB) into a per-user cache.
brew uninstall findhcb # the CLI / web app formula
brew uninstall --cask findhcb-app 2>/dev/null # the .app cask (only if you installed it)
brew untap mbperry/findhcb # optional: forget the tap
rm -rf ~/.cache/findhcb \
~/Library/Application\ Support/findhcB# Eject any mounted disk image
hdiutil info | awk '/findhcB/ {print $1}' | xargs -I{} hdiutil detach {} 2>/dev/null
# Remove the app + per-user data
rm -rf /Applications/findhcB.app \
~/Library/Application\ Support/findhcB \
~/.cache/findhcbJust delete the file: rm findhcB-x86_64.AppImage. Optionally clean per-user
data: rm -rf ~/.cache/findhcb.
Same as macOS Homebrew section above.
Use Settings → Apps → Installed apps → findhcB → Uninstall, or run the
Uninstall.exe left inside C:\Program Files\findhcB. To also remove
per-user runtime data:
rmdir /S /Q "%LOCALAPPDATA%\findhcB"Delete the unzipped folder and %LOCALAPPDATA%\findhcB (cached venv).
Once you've enrolled in the Apple Developer Program ($99/yr), add these four secrets at Settings → Secrets and variables → Actions → New repository secret:
| Secret | Value |
|---|---|
APPLE_CERT_P12_BASE64 |
Your Developer ID Application cert exported as .p12, then base64 < cert.p12 | pbcopy |
APPLE_CERT_P12_PASSWORD |
The .p12 export password |
APPLE_CERT_IDENTITY |
e.g. Developer ID Application: Marcus Perry (TEAMID) — security find-identity -v -p codesigning will list it |
APPLE_ID |
Your Apple ID email |
APPLE_ID_PASSWORD |
An app-specific password generated at https://appleid.apple.com/account/manage |
APPLE_TEAM_ID |
10-character team ID from https://developer.apple.com/account#MembershipDetailsCard |
The next tag you push triggers a notarized build automatically. Until those
secrets exist, the workflow still produces an unsigned .dmg (Gatekeeper
warning present).
findhcB_auto_order.m # MATLAB source
build_and_zip.m # MATLAB Coder script — regenerates findhcB_standalone/
main.c # Custom CLI front-end for the generated lib
findhcB_standalone/ # MATLAB-Coder-generated C source (portable)
findhcB # Local macOS arm64 build (gitignored on CI builds)
server.py # Flask backend
index.html # Single-page UI
run_app.sh / run_app.bat # Launchers
scripts/build_binary.sh # Build the binary on macOS / Linux
scripts/build_binary.bat # Build the binary on Windows (MSVC)
.github/workflows/release.yml # CI: build all 3 platforms on tag push
# 1. Build the binary for your platform (one-time)
bash scripts/build_binary.sh # macOS / Linux
# or
scripts\build_binary.bat # Windows, from a "Developer Command Prompt"
# 2. Run the web app
./run_app.sh # macOS / Linux
run_app.bat # WindowsReleases are built and published automatically by GitHub Actions when you push a
v* tag:
git tag v0.1.0
git push origin v0.1.0The workflow at .github/workflows/release.yml builds the binary on
macOS / Linux / Windows runners, bundles each with server.py, index.html,
and the platform launcher, and attaches the three zips to a new GitHub Release.
You can also trigger the workflow manually from the Actions tab via "Run workflow" and supply a tag.
The backend invokes the binary as a subprocess and pipes the parameters into its
stdin in the exact order main.c expects:
Ntune
p1
targetARL0
lb ub
ind
max_order
<path to uploaded T2 file>
stdout is captured, and the final h: and arl0: lines are parsed back into
the results panel.
If you use findhcB in your research, please cite the underlying manuscript:
The cB-CUSUM Chart: A Simple Approach for Robust Multivariate Process Monitoring. Currently under review at Journal of Quality Technology (2025).
⚠️ This reference is intentionally blinded for peer review. Author names, journal volume/issue, and DOI will be added once the paper is accepted for publication.
See repo for license details.