Source: https://guthlabs.ai/docs/instruments/diffraction-grating-calculator/implementation/

instrument implementation / implementation-contract

# Diffraction Grating Calculator implementation

A source-bound implementation contract for Diffraction Grating Calculator; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t5-148

**Effect**: Computation or source lookup only

## Input and validation requirements

A zero grating spacing produces division by zero and must be rejected. The specification also requires an explicit branch for orders with |mλ/d|>1, which have no real diffraction angle, and an explicit sign convention for negative orders.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "grating_spacing": {
      "value": 1,
      "unit": "micrometres"
    },
    "wavelength": {
      "value": 500,
      "unit": "nanometres"
    },
    "order": 1
  },
  "expected_outputs": {
    "diffraction_angles_degrees": [
      -30,
      30
    ],
    "maximum_visible_order": 2
  },
  "working": "Convert d: 1.0 micrometre = 1000 nm. Compute sin(theta) = m lambda/d = (1 x 500 nm)/1000 nm = 0.5. Therefore theta = arcsin(0.5) = 30 degrees, giving symmetric angles -30 degrees and +30 degrees. Maximum order = floor(d/lambda) = floor(1000/500) = floor(2) = 2."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/diffraction-grating-calculator/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/diffraction-grating-calculator/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/diffraction-grating-calculator/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche5/tranche5-results.json`
