{% from "_roughness_help.html" import roughness_help %} {% from "_afm_help.html" import afm_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.

Accepted formats: .csv, .tsv, .txt, and .dat. Use a text file with two numeric columns (x and z), separated by commas, tabs, semicolons, or spaces. A header row is optional.

{% if existing_afm_source_url %}

Stored AFM scan: {{ defaults.afm_source_filename or 'Download scan' }}. Choose a new file to replace it.

{% endif %}
{% if existing_afm_source_url %}{% endif %}

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

{{ afm_help('process', 'process AFM profile') }}
{% if return_to_run %}{% endif %} {% if form_error %}{% endif %} {% for material in materials %} {% endfor %} {% include "_grating_fields.html" %} {% 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-afm-process-form], [data-grating-preview-form]", nominal=defaults.grating_type) }} {% 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 %}