8000 Wi handle all zero signal by torbjornstoro · Pull Request #70 · esa/NIDN · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Wi handle all zero signal #70

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

Merged
merged 5 commits into from
Mar 29, 2022

Conversation

torbjornstoro
Copy link
Collaborator

Description

Summary of changes

Throws error when signal never reaches the detectors

Resolved Issues

…all zero at the detectors, with suggestions to what to do differently
…placing zeros with small constants to keep gradient flow
@torbjornstoro torbjornstoro requested a review from gomezzz March 28, 2022 13:59
@torbjornstoro torbjornstoro changed the base branch from waveregime-internship to WI_gradient_investigation March 28, 2022 14:02
Copy link
Collaborator
@gomezzz gomezzz left a comment

Choose a reason for hiding this comment

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

👍 minimal suggestions


if _mean_square(signals[0]) <= 1e-15:
raise ValueError(
"The freen space signal is all zero. Increase the number of FDTD_niter to ensure that the signal reaches the detctor."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"The freen space signal is all zero. Increase the number of FDTD_niter to ensure that the signal reaches the detctor."
"The free space signal is all zero. Increase the number of FDTD_niter to ensure that the signal reaches the detctor."

)
if _mean_square(signals[1]) <= 1e-15:
logger.warning(
"WARNING:The signal trough the material layer(s) never reaches the detector. Increase FDTD_niter to ensure that the signal reaches the detector. The signal usually travels slower in a material than in free space "
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"WARNING:The signal trough the material layer(s) never reaches the detector. Increase FDTD_niter to ensure that the signal reaches the detector. The signal usually travels slower in a material than in free space "
"WARNING:The signal trough the material layer(s) never reaches the detector. Increase FDTD_niter to ensure that the signal reaches the detector. The signal usually travels slower in a material than in free space."

@torbjornstoro torbjornstoro merged commit 48c11c6 into WI_gradient_investigation Mar 29, 2022
@torbjornstoro torbjornstoro deleted the WI_handle_all_zero_signal branch March 29, 2022 07:32
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.

2 participants
0