IQ trim - portapack-mayhem/mayhem-firmware GitHub Wiki
IQ Trim allows you to trim "radio silence" from the beginning and end of a C16 or C8 capture file.
UI Components
| Field | Description |
|---|---|
| Capture File | Tap to open a .C16 or .C8 file from the CAPTURES/ folder. |
| IQ Display | Shows the signal power across 240 buckets. The green line marks the Start position, the red line marks the End position. |
| Start | Starting sample of the trim region. Adjustable manually. Step size scales with file length. |
| End | Ending sample of the trim region. Adjustable manually. Step size scales with file length. |
| Samples | Total number of samples in the capture file. |
| Max Pwr | Power (complex magnitude) of the strongest sample in the capture file, after amplification. Shown in red if the amplification setting would cause clipping. |
| Cutoff | Signal-to-noise cutoff as a percentage of Max Pwr (1–100%). Default: 7%. Used to automatically determine the Start/End trim points. |
| Amplify | Amplification factor applied to the trimmed file (1–9×). Default: 1× (no amplification). Useful if the captured signal was weak. |
| Trim | Applies the trim (and amplification) to the file. Overwrites the file in place — no backup is made. |
Trimming Capture Files
- Open a capture file by tapping the file path field. You should see the signal power displayed in the IQ Display.
- If the display shows no visible block, the captured signal was too weak for the tool to detect automatically.
- Either adjust Cutoff % to automatically set Start/End, or set Start and End manually.
- Optionally increase Amplify if the signal was weak. Watch the Max Pwr field — it turns red if clipping would occur.
- Press Trim. The file will be edited in place.
[!WARNING] Trim overwrites the original file without making a backup. Use the File-manager to make a copy first if you want to preserve the original.
Splitting Capture Files
Capture files can be split into multiple files by combining File Manager and IQ Trim:
- Use File-manager to make copies of the original capture file.
- Open each copy in IQ Trim and trim to the desired Start/End range.
- The resulting files can be trimmed further if needed.