Skip to content

Conversation

@FilipeFcp
Copy link
Contributor

Hi all,
I’m uploading the example for the hexagonal band diagram calculations.
There is one cell with some theory that was entirely generated by AI. I’m still debating whether we should keep it or remove it to make the example shorter.

@momchil-flex, feel free to take a look if you have time

@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

Spell Check Report

HexagonalLatticeBands.ipynb:

Cell 1, Line 19: 'K-points'
  > [1)](#1) Definition of the K-points for the hexagonal lattice
Cell 1, Line 20: 'Supercell'
  > [2)](#2) Supercell definition and base simulation setup
Cell 3, Line 3: 'real-space'
  > For a hexagonal lattice, we can define the two real-space lattice vectors as
Cell 4, Line 8: 'Real-space'
  > # Real-space lattice vectors
Cell 4, Line 12: 'Reciprocal-space'
  > # Reciprocal-space lattice vectors
Cell 4, Line 56: 'Real-space'
  > ax1.set_title("Real-space lattice and vectors")
Cell 4, Line 62: 'Supercell'
  > # Supercell corners in real space
Cell 4, Line 89: 'Reciprocal-space'
  > ax2.set_title("Reciprocal-space lattice, vectors and IBZ path")
Cell 7, Line 10: 'K-points'
  > # K-points of the Brillouin zone of hexagonal lattice
Cell 7, Line 35: 'supercell'
  > # Creating the supercell
Cell 17, Line 18: 'K-points'
  > # Visualizing the K-points
Cell 18, Line 3: 'hexagonalBandDiagram'
  > batch = web.Batch(simulations=sims, folder_name="hexagonalBandDiagram")
Cell 18, Line 4: 'bandDiagram'
  > batch_data = batch.run(path_dir="bandDiagram")
Cell 22, Line 20: 'K-point'
  > ax.set_xlabel("K-point index")

Checked 1 notebook(s). Found spelling errors in 1 file(s).
Generated by GitHub Action run: https://github.com/flexcompute/tidy3d-notebooks/actions/runs/20030746834

@momchil-flex
Copy link
Collaborator

Thanks @FilipeFcp !

Just a couple of things:

  • There seems to be a missing link
image
  • Maybe mention in one of the markdown cells around the simulation creation / plotting that 5 extra monitors are automatically added
  • The part of the code that computes the spectrum from the FFT, and e.g. the FTs variable is unused
  • My biggest question: MPB is pretty good and fast for modes below the light line. I think one of the main advantages of doing this in FDTD is to be able to also get the modes above it. Have you not been able to get nice results for the quasi-guided modes?

Copy link
Contributor

@alec-flexcompute alec-flexcompute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great example again @Filipe! A couple things:

  1. I think Callable is imported but not used

  2. In the second cell, you import numpy a second time

  3. the **args argument in the ftField function isn't used - maybe you can drop?

  4. When all is edited remember run all cells in order so the cells are ordered

  5. Momchil brings up a good point with modes above the light line. It could be interesting to see, but I'm not sure how much time it would take to get good results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants