[
  {
    "id": "hand-worked-anxiety-index",
    "title": "A 5-minute session with a fifth of the time and a quarter of the entries in the open arms",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Hoffman JR, Ostfeld I, Stout JR, Harris RC, Kaplan Z, Cohen H. β-Alanine supplemented diets enhance behavioral resilience to stress exposure in an animal model of PTSD. Amino Acids. 2015;47(6):1247-1257.",
      "doi": "10.1007/s00726-015-1952-y",
      "locator": "Methods, elevated plus-maze: Anxiety Index = 1 − [(time in the open arms / total time on the maze) + (entries to the open arms / total exploration on the maze)] / 2, where total exploration is the number of entries into any arm",
      "arithmetic": "Open-arm time 60 s of 300 s = 0.20 (20%). Open-arm entries 5 of 5 + 15 = 20 = 0.25 (25%). Anxiety Index = 1 − (0.20 + 0.25) / 2 = 1 − 0.225 = 0.775. Zone times 60 + 200 + 40 = 300 s match the session, so there is no time flag."
    },
    "input": {
      "totalSessionTime": 300,
      "openTime": 60,
      "closedTime": 200,
      "centerTime": 40,
      "openEntries": 5,
      "closedEntries": 15
    },
    "expected": {
      "anxietyIndex": 0.775,
      "pctOpenTime": 20,
      "pctOpenEntries": 25,
      "timeFlag": false
    },
    "tolerance": {
      "anxietyIndex": 1e-12,
      "pctOpenTime": 1e-12,
      "pctOpenEntries": 1e-12
    }
  },
  {
    "id": "hand-worked-time-mismatch",
    "title": "Zone times that miss the session time by more than 10%",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Walf AA, Frye CA. The use of the elevated plus maze as an assay of anxiety-related behavior in rodents. Nat Protoc. 2007;2(2):322-328.",
      "doi": "10.1038/nprot.2007.44",
      "locator": "Time in the open arms, closed arms and center makes up the session; the 10% tolerance is this tool's convention for flagging a scoring error",
      "arithmetic": "Zone times 60 + 180 + 20 = 260 s against a 300 s session: |260 − 300| / 300 = 13.3%, above 10%, so the animal is flagged."
    },
    "input": {
      "totalSessionTime": 300,
      "openTime": 60,
      "closedTime": 180,
      "centerTime": 20,
      "openEntries": 5,
      "closedEntries": 15
    },
    "expected": {
      "timeFlag": true
    }
  },
  {
    "id": "edge-no-entries",
    "title": "No arm entries",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Hoffman JR, Ostfeld I, Stout JR, Harris RC, Kaplan Z, Cohen H. β-Alanine supplemented diets enhance behavioral resilience to stress exposure in an animal model of PTSD. Amino Acids. 2015;47(6):1247-1257.",
      "doi": "10.1007/s00726-015-1952-y",
      "locator": "Anxiety Index formula (entries term)",
      "arithmetic": "0 open and 0 closed entries: the share of open-arm entries is 0 / 0, so % open entries and the Anxiety Index are not computable. % open time is 0 / 300 = 0%, which is computable."
    },
    "input": {
      "totalSessionTime": 300,
      "openTime": 0,
      "closedTime": 300,
      "centerTime": 0,
      "openEntries": 0,
      "closedEntries": 0
    },
    "expected": {
      "anxietyIndex": null,
      "pctOpenEntries": null,
      "pctOpenTime": 0
    }
  }
]
