Specifications
User stories and requirements, each labeled Definite, Perhaps, or Improbable.
User stories
US-1
As an optics researcher, I want to define a multi-element lens system without writing code so that I can explore a design idea in minutes instead of scripting it.
- I can add, remove, and reorder elements.
- Each element accepts a curvature radius, thickness, and glass index.
- Invalid values are flagged next to the field before anything runs.
US-2
As an optics student, I want to see aberration coefficients and a spot diagram for my design so that I can learn how each lens parameter changes image quality.
- Coefficients appear in a table labeled with the aberration name.
- The spot diagram shows three field angles on a common scale.
- Results refresh after I change a parameter and re-run.
US-3
As an optics researcher, I want to run an optimization over lens parameters and see the result so that I get a better design without manual trial and error.
- I choose which parameters vary and set their bounds.
- I see progress while it runs and can cancel it.
- The optimized system loads back into the builder for further edits.
US-4
As an optical engineer, I want to save a lens system and reopen it later so that I can continue work across sessions and share designs.
- Saving writes a single file I can copy or version-control.
- Reopening restores every element and analysis setting exactly.
US-5
As an client maintainer, I want to update the backend without changing the front end so that future LieOptics improvements reach users with little extra work.
- All backend calls pass through one documented API interface.
- The interface can be swapped between a mock and the real backend.
Functional requirements
| ID | Requirement | Priority |
|---|---|---|
| F-1 | Create, edit, reorder, and delete lens elements (curvature radius, thickness, glass index). | Definite |
| F-2 | Draw a to-scale layout sketch of the current lens system. | Definite |
| F-3 | Run analytical aberration analysis and show the coefficients in a table. | Definite |
| F-4 | Render a spot diagram at three field angles. | Definite |
| F-5 | Run differential-evolution optimization with user-set parameter bounds. | Definite |
| F-6 | Show optimization progress and allow cancellation. | Definite |
| F-7 | Save a lens system to a file and load it again. | Definite |
| F-8 | Show backend errors (invalid parameters, failed optimization) in the UI. | Definite |
| F-9 | Render phase-space plots. | Perhaps |
| F-10 | Add optimization constraints beyond simple bounds. | Perhaps |
| F-11 | Undo and redo edits in the builder. | Perhaps |
| F-12 | Export plots and tables as images or CSV. | Perhaps |
| F-13 | Import designs from commercial tools such as Zemax or CODE V. | Improbable |
| F-14 | Multi-user collaborative editing. | Improbable |
Non-functional requirements (URPS+)
| ID | Category | Requirement | Priority |
|---|---|---|---|
| N-1 | Usability | A user can build and analyze a lens system without writing code or reading source. | Definite |
| N-2 | Usability | Every input shows its unit and a valid range. | Definite |
| N-3 | Reliability | A failed backend call never crashes the app or discards the user's current design. | Definite |
| N-4 | Performance | Aberration analysis for a typical system returns fast enough to feel interactive, preserving the speed advantage of LieOptics over ray tracing. | Definite |
| N-5 | Supportability | The client can maintain and extend the front end after hand-off, with documented setup and a README. | Definite |
| N-6 | + Implementation | The Python backend is consumed as delivered and is not modified. | Definite |
| N-7 | + Interface | All backend access goes through a single typed API layer. | Definite |
| N-8 | + Physical | Runs on Windows, macOS, and Linux desktops. | Definite |
| N-9 | + Legal | Open-source licensing is compatible with the client's release plan. | Perhaps |
| N-10 | Performance | Results for large systems stay responsive via background computation. | Perhaps |
| N-11 | Usability | Full keyboard accessibility and screen-reader support. | Improbable |
Interface requirements
| ID | Requirement | Priority |
|---|---|---|
| I-1 | Builder interface: a form for element parameters beside a canvas showing the layout. | Definite |
| I-2 | Results interface: coefficient table and spot diagram shown together with the layout. | Definite |
| I-3 | Optimization interface: parameter bounds, run, progress, and cancel controls. | Definite |
| I-4 | Backend interface: typed request/response calls for defining a system, analyzing it, optimizing it, and producing a spot diagram. | Definite |
| I-5 | File interface: lens systems saved and loaded as a single JSON file. | Definite |
| I-6 | Phase-space plot view. | Perhaps |
| I-7 | Web-hosted build of the same interface. | Improbable |