Workspace · Readiness governance
996102e0
Readiness Policy Design Center
Use this center after structural QC has been inspected and before a readiness rule is allowed to change the analysis cohort.
The builder is local to this documentation page. It does not upload a dataset, inspect your outcomes, infer thresholds, or filter a GazeStudy.
No policy draft generated yet.
Python policy + preview
The generated code evaluates and previews only. It deliberately does not call filter_study_by_readiness().
# Choose a policy name and activate at least one justified criterion.
Descriptive JSON draft
This documentation-side draft mirrors the declared threshold values. It is not a runtime readiness manifest and is not proof that the thresholds are scientifically justified.
{
"schema": "gazeaudit-readiness-policy-draft-v1",
"policy_name": "",
"thresholds": {}
}
What the generated code does
The output follows this sequence:
from gazeaudit import (
ReadinessThresholds,
cohort_impact_preview,
evaluate_analysis_readiness,
)
policy = ReadinessThresholds(
# only your active, declared criteria appear here
)
readiness = evaluate_analysis_readiness(
study,
policy,
policy_name="your_policy_name",
)
print(readiness.status)
print(cohort_impact_preview(readiness))
This produces a policy-relative assessment and no-mutation cohort preview.
It does not remove rows, trials, or participants.
Understand the eight criteria before declaring them
| Criterion | Scope | Observed metric | Runtime rule | Scientific boundary |
|---|---|---|---|---|
max_coordinate_issue_fraction |
trial + participant | coordinate_issue_fraction |
A trial or participant unit fails when its coordinate-issue fraction is greater than the declared limit. | The package does not supply or recommend a universal acceptable fraction. |
max_timestamp_issue_fraction |
trial + participant | timestamp_issue_fraction |
A trial or participant unit fails when its timestamp-issue fraction is greater than the declared limit. | Missing or infinite timestamps are not equivalent to time zero, and the package does not choose a universal limit. |
max_identifier_issue_fraction |
trial + participant | identifier_issue_fraction |
A trial or participant unit fails when its identifier-issue fraction is greater than the declared limit. | The threshold does not authorize inventing missing participant or trial identifiers. |
max_duplicate_timestamp_fraction |
trial + participant | duplicate_timestamp_fraction |
A trial or participant unit fails when its duplicate-timestamp fraction is greater than the declared limit. | Equal timestamps are a representation condition, not automatic proof of duplicated scientific observations. |
max_flagged_trial_fraction |
participant | flagged_trial_fraction |
Participant evaluation uses the fraction of trial units that fail the currently declared trial-level rules. | This is downstream of the active trial policy; changing trial rules can change the flagged-trial fraction. |
min_rows_per_trial |
trial | n_rows |
A trial unit fails when its row count is below the declared minimum. | Row count is not a device-independent duration or sampling-quality measure. |
min_trials_per_participant |
participant | n_trials |
A participant unit fails when its trial count is below the declared minimum. | A minimum trial count must come from the study design or analysis rationale, not from this software. |
require_monotonic_time |
trial + participant | decreasing_time / decreasing_time_trials |
When active, a trial fails if finite time decreases; a participant fails if any of its trial units has decreasing finite time. | Activating this rule does not imply that sorting is the appropriate repair for a decreasing-time condition. |
Scope matters
Trial-level evaluation can fail:
- coordinate, timestamp, identifier, or duplicate-timestamp fractions;
min_rows_per_trial;require_monotonic_time=True.
Participant-level evaluation can fail:
- the four aggregate issue fractions;
max_flagged_trial_fraction;min_trials_per_participant;require_monotonic_time=Truewhen any trial unit has decreasing time.
max_flagged_trial_fraction is downstream of the active trial policy. Changing the trial rules can therefore change the participant-level flagged-trial fraction even when the source table is unchanged.
Read readiness status conservatively
| Status | Meaning | Do not interpret it as |
|---|---|---|
unassessed |
no active readiness rule participated in the policy | “all data passed” |
ready_under_policy |
all evaluated trial and participant units satisfy the declared active rules | universal data validity |
review_under_policy |
at least one evaluated unit fails one or more declared active rules | automatic exclusion |
The status is always relative to the declared policy.
Preview before applying
Inspect:
readiness.trial_summary
readiness.participant_summary
readiness.cohort_impact
The cohort preview preserves three denominators:
- rows;
- participant × trial units;
- participant units.
Do not report only a retained percentage without stating which denominator and filter scope produced it.
Only after the policy and its cohort consequence have been justified should filtering be considered:
from gazeaudit import filter_study_by_readiness
analysis_study = filter_study_by_readiness(
study,
readiness,
scope="trial", # or "participant"; this is a separate scientific decision
)
The scope above is intentionally not selected by this builder.
Methodological guidance
Before activating a threshold, record:
- criterion — which runtime rule is being used;
- rationale source — preregistration, protocol, device evidence, task demand, prior validation, or sensitivity plan;
- timing — whether the value was fixed before observing outcome results;
- scope — trial or participant consequence;
- cohort impact — rows/trials/participants retained under the policy;
- alternative policies — whether nearby defensible policies materially alter the cohort or endpoint;
- deviation — whether the final policy differs from the originally declared rule.
The Design and audit readiness policies guide develops each step.
Reporting examples
Methods
Analysis readiness was evaluated using a predeclared structural policy comprising [criteria and values]. GazeAudit first generated trial- and participant-level summaries and a no-mutation cohort-impact preview. Filtering was applied only after the declared policy and filter scope were fixed; omitted readiness criteria were not evaluated.
Results
Under the declared [policy name] policy, readiness status was [status]. Trial-level application retained [rows/trials/participants and denominators], whereas participant-level preview retained [corresponding denominators]. The analysis used the predeclared [trial/participant] scope.
Limitation
Readiness status is policy-relative and reflects the declared structural criteria only. It does not establish calibration accuracy, event-detector validity, AOI validity, missingness ignorability, or inferential robustness.
Replace every bracketed field with the actual project record.
API links
ReadinessThresholdsevaluate_analysis_readiness()cohort_impact_preview()readiness_policy_table()- Analysis-readiness method pathway
- Machine-readable threshold reference
Continue from here
- Design and audit readiness policies — methodological rationale, timing, sensitivity, denominator governance, and reporting.
- Readiness policy design worked example — fully synthetic primary/alternative policy exercise.
- Analysis-readiness governance — runtime workflow, repair comparison, artifact export, and specification-space integration.
- Structural-QC triage — understand the structural evidence before turning it into a policy.