A browser-based tool for extracting and organizing raw Med-PC / MedAssociate behavioral data files into clean CSV outputs. No installation required — open the HTML file directly in any browser.
- Drag & drop raw Med-PC text files (one file per session day, multiple rats per file)
- Auto-detects session type from filename (FR, PR, Shock) — overridable manually
- Auto-detects session duration from Start/End Time fields
- Live reward chart with adjustable bin size, shown immediately after upload
- Two CSV outputs:
timestamps_matrix.csv— variables as rows, rats as columns (matches GEToperant Excel format)binned_data.csv— rats as rows, time-binned counts as columns
- Session type support:
- FR (fixed ratio) — SHA / LGA sessions
- PR (progressive ratio) — includes PR breakpoint (last ratio)
- Shock — includes total shocks and shock-at-reward timestamps
- Download
medassociate_parser.html - Double-click to open in your browser
- Drop your raw Med-PC file(s) onto the upload area
- Select session type (auto-detected from filename)
- Review the live reward chart
- Click Generate CSV files and download
| Variable | Array | Type |
|---|---|---|
| Reward timestamps | V | multi-value |
| Active timestamps | Y | multi-value |
| Inactive timestamps | U | multi-value |
| Total rewards | B[0] | scalar |
| Total active presses | G[0] | scalar |
| Total inactive presses | A[0] | scalar |
| PR breakpoint | S[0] | scalar (PR only) |
| Shock at reward # | M | multi-value (Shock only) |
| Total shocks | T[0] | scalar (Shock only) |
All array assignments are configurable in the interface.
| Pattern in filename | Session type |
|---|---|
SHA, LGA |
FR (fixed ratio) |
PR, COCPR |
Progressive ratio |
PRESHOCK, SHOCK |
Shock session |
Pull requests welcome. To suggest changes:
- Fork this repository
- Create a feature branch:
git checkout -b my-improvement - Commit your changes and open a pull request
For bugs or feature requests, open an issue.
If you use this tool in your research, please cite:
George Lab (2025). MedAssociate Parser. George-LabX/GEToperant. https://github.com/George-LabX/GEToperant
- GEToperant — original Python/Excel-based tool this replaces
- MedParse — Python/MATLAB parser
MIT