Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed CustomSourceTime to automatically modulate at freq0 #1051

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

caseyflex
Copy link
Contributor

Changed CustomSourceTime to accept a (real or complex) envelope, and automatically multiply it by e^{i \omega_0 t}. This particular complex modulation is needed for it to accept the phase shift from the different source types (e.g. e^{i k_0 \cdot r} for PlaneWave). Currently, one could put in cos(\omega_0 t) time dependence (or even something stranger), which leads to inaccuracies when attempting the phase shift. Having automatic complex modulation removes these inaccuracies.

Copy link
Collaborator

@tylerflex tylerflex left a comment

Choose a reason for hiding this comment

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

Looks fine to me, just a couple comments about clarifying in the docstrings what the source amplitude looks like.

tidy3d/components/source.py Outdated Show resolved Hide resolved
tidy3d/components/source.py Show resolved Hide resolved
Copy link
Collaborator

@momchil-flex momchil-flex left a comment

Choose a reason for hiding this comment

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

I think this makes a lot of sense now, the extra parameters like freq0 and offset are no longer decoupled from the actual signal. Only fwidth still kind of is right? But I guess that's fine.

@caseyflex
Copy link
Contributor Author

I think this makes a lot of sense now, the extra parameters like freq0 and offset are no longer decoupled from the actual signal. Only fwidth still kind of is right? But I guess that's fine.

yeah, that was my thinking. fwidth is still just an estimate of the bandwidth, which should be fine

@caseyflex caseyflex force-pushed the casey/changecustomsourcetime branch from 72468f1 to 3d7412d Compare August 4, 2023 12:27
@tylerflex
Copy link
Collaborator

feel free to rebase and merge when you are ready thanks!

@caseyflex caseyflex merged commit 3100c9a into pre/2.4 Aug 4, 2023
13 checks passed
@caseyflex caseyflex deleted the casey/changecustomsourcetime branch November 7, 2024 11:47
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.

3 participants