{% from "_roughness_help.html" import roughness_help %} {% extends "base.html" %} {% from "_geometry_view.html" import geometry_view %} {% block title %}New grating{% endblock %} {% block body %}

New grating

Etched grating profiles with optional coating layers

Import AFM profile

Upload a two-column x/z scan and preprocess one period before using it as a profile grating.

The AFM analysis uses the period from the Profile section below.

{% if form_error %}{% endif %} {% for material in materials %} {% endfor %}
Profile
Laminar fields
Sinusoidal fields
Blazed fields
Roughness model

Each layer's parameters describe its upper interface. RMS σ controls height variation; correlation length ξ controls its lateral scale. Blank σ means 0 nm; blank ξ means period / 10.

Debye–Waller applies an effective damping correction to efficiencies; geometry remains smooth.

Interfaces have independent random shapes. More periods and realizations increase simulation cost. Preview shows realization 1.

{% include "_substrate_fields.html" %} {% set substrate_rendered = true %} {% include "_stack_fields.html" %}

Live preview

{% if preview and preview.ok %}Ready{% else %}{{ preview.error if preview else "Preview unavailable" }}{% endif %}

Idle
{{ geometry_view("grating", bind="[data-grating-preview-form]") }} {% if preview and preview.preview_url %} Live grating preview {% else %} {% endif %}

{{ (preview.warnings|default([]))|join(' ') if preview else '' }}

Random roughness interfaces and material map
{% endblock %}