Skip to content

Add utility function for real float conversion and update mode profile data handling#132

Merged
QuentinWach merged 1 commit into
mainfrom
fix_example
Jun 5, 2026
Merged

Add utility function for real float conversion and update mode profile data handling#132
QuentinWach merged 1 commit into
mainfrom
fix_example

Conversation

@QuentinWach

Copy link
Copy Markdown
Collaborator
  • Introduced _as_real_float function to safely convert values to real floats, handling None and empty arrays.
  • Updated mode_profile_data to use the new function for extracting the effective index (neff) from the mode source, ensuring proper handling of complex values.
  • Refactored the 3D waveguide example to improve structure and readability, encapsulating design creation and simulation setup in dedicated functions.
  • Added a test to verify that mode source profile data can accept complex neff values without warnings.

…e data handling

- Introduced `_as_real_float` function to safely convert values to real floats, handling None and empty arrays.
- Updated `mode_profile_data` to use the new function for extracting the effective index (`neff`) from the mode source, ensuring proper handling of complex values.
- Refactored the 3D waveguide example to improve structure and readability, encapsulating design creation and simulation setup in dedicated functions.
- Added a test to verify that mode source profile data can accept complex `neff` values without warnings.
@QuentinWach QuentinWach merged commit 74446ee into main Jun 5, 2026
1 check passed
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.

1 participant