[
  {
    "id": "hand-worked-rpm-at-fall",
    "title": "Rod speed at a fall halfway through a 4-40 RPM, 300 s ramp",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Deacon RM. Measuring motor coordination in mice. J Vis Exp. 2013;(75):e2609.",
      "doi": "10.3791/2609",
      "locator": "Accelerating rotarod: the rod starts at 4 rpm and speeds up at a constant rate (20 rpm/min in this protocol) to a maximum of 40 rpm; this tool applies the same linear ramp over the ramp duration you set (300 s here)",
      "arithmetic": "RPM at fall = 4 + (40 − 4) × 150 / 300 = 4 + 18 = 22 RPM."
    },
    "input": {
      "latency": 150,
      "startRPM": 4,
      "endRPM": 40,
      "rampDuration": 300
    },
    "expected": {
      "rpmAtFall": 22
    },
    "tolerance": {
      "rpmAtFall": 1e-12
    }
  },
  {
    "id": "hand-worked-mean-rpm",
    "title": "Daily RPM at fall from two trials, one past the end of the ramp",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Deacon RM. Measuring motor coordination in mice. J Vis Exp. 2013;(75):e2609.",
      "doi": "10.3791/2609",
      "locator": "Accelerating rotarod: once the ramp ends the rod turns at the maximum speed (40 rpm)",
      "arithmetic": "Trial 1 falls at 150 s: 22 RPM. Trial 2 falls at 360 s, after the 300 s ramp: 40 RPM. Mean = (22 + 40) / 2 = 31 RPM. Converting the mean latency instead, (150 + 360) / 2 = 255 s, gives 4 + 36 × 255 / 300 = 34.6 RPM, a speed the animal never fell at."
    },
    "input": {
      "latencies": [
        150,
        360
      ],
      "startRPM": 4,
      "endRPM": 40,
      "rampDuration": 300
    },
    "expected": {
      "meanRpmAtFall": 31
    },
    "tolerance": {
      "meanRpmAtFall": 1e-12
    }
  },
  {
    "id": "hand-worked-auc",
    "title": "Area under a three-day learning curve",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Deacon RM. Measuring motor coordination in mice. J Vis Exp. 2013;(75):e2609.",
      "doi": "10.3791/2609",
      "locator": "Latency to fall is recorded on each training day; summarising the daily means by the area under the curve (trapezoid rule) is this tool's convention",
      "arithmetic": "Daily means 60, 90 and 120 s on days 1, 2 and 3. Trapezoids: (60 + 90) / 2 × 1 = 75 and (90 + 120) / 2 × 1 = 105. AUC = 75 + 105 = 180 s × days."
    },
    "input": {
      "dailyMeans": [
        {
          "day": 1,
          "latency": 60
        },
        {
          "day": 2,
          "latency": 90
        },
        {
          "day": 3,
          "latency": 120
        }
      ]
    },
    "expected": {
      "auc": 180
    },
    "tolerance": {
      "auc": 1e-12
    }
  },
  {
    "id": "edge-single-day",
    "title": "An animal tested on one day",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Deacon RM. Measuring motor coordination in mice. J Vis Exp. 2013;(75):e2609.",
      "doi": "10.3791/2609",
      "locator": "Area under the learning curve, this tool's convention: it needs at least two days",
      "arithmetic": "One day (60 s) gives no interval to integrate over, so the AUC is not computable. The tool shows it as not computable and leaves the animal out of the AUC group comparison."
    },
    "input": {
      "dailyMeans": [
        {
          "day": 1,
          "latency": 60
        }
      ]
    },
    "expected": {
      "auc": null
    }
  },
  {
    "id": "edge-cutoff",
    "title": "An uploaded latency longer than the trial cutoff",
    "sourceType": "hand-worked",
    "source": {
      "citation": "Deacon RM. Measuring motor coordination in mice. J Vis Exp. 2013;(75):e2609.",
      "doi": "10.3791/2609",
      "locator": "Trials end at a maximum duration; recording a longer latency as the cutoff is this tool's convention",
      "arithmetic": "A 320 s latency with a 300 s cutoff is recorded as 300 s, the same as a latency typed into the form."
    },
    "input": {
      "csv": "animal_id,group,day,trial,latency\nM1,WT,1,1,320",
      "cutoff": 300
    },
    "expected": {
      "latency": 300
    }
  }
]
