Files
ISSSTELEON/synthetic
alberto 0b63c19e53 Synthetic TEA hospital: fourteen children covering every case state, ADOS-2 reports in the hospital's layout, generated EDF studies
Default seed EEG verdicts by spec child index:
- 8: valid, complete.
- 9: valid, complete.
- 10: valid, complete.
- 11: invalid, not_analyzable. T3/T4 are dead and P3/P4/O1/O2
  have abnormal amplitudes and intermittent bursts.

After validation, children 8–10 each return a ValueError during
preprocessing. The model's 100 Hz bandpass cutoff exceeds the 64 Hz
Nyquist frequency of the specified 128 Hz studies (since raised to 256 Hz). The test uses the
validation verdict as specified.

Implementation choices:
- Group the fixed profiles, table definitions and report item labels in
  the generator. Insert child by child in a SQLite transaction. Use
  truth row counts to allocate table-local IDs and flatten truth by table.
- Reuse the synthetic package's fixed PDF creation date and fpdf2's
  default margins. Draw the score for the S/D item in print order, then
  replace it with None before totaling and rendering.
- Evaluate continuous EDF events on the sample grid with start-inclusive,
  end-exclusive bounds. Give awake the extra sample when the count is
  odd. Draw the gap after every slow-wave candidate, clip blinks at the
  awake boundary and evaluate beat Gaussians across the full recording.
  Apply awake rhythm and slow-wave scaling to the positioned channels,
  including ears, and give the auxiliary channels their specified events.
- Require positive whole-second durations and positive integer sample
  rates. Keep zero-variance noise at zero. Apply channel faults after
  adding mains. Write each study in a private temporary directory.
- Compare SQLite rows in primary-key order, and use case-insensitive
  fixture patterns to check PDF text. The slow test prints the validator
  checks and any analysis error when run with capture disabled.
- Updated the synthetic package entries in uv.lock against the existing
  locked versions after the registry lookup failed. uv lock validated
  the resulting lockfile.

The default sampling rate was raised to 256 Hz: at 128 Hz the analysis's 100 Hz band edge is above
Nyquist. At 256 Hz children 8-10 analyse fully (valid, complete, five metrics) and child 11 is not analysable.
2026-11-27 17:09:07 -06:00
..