Spaces:
Paused
Paused
Commit
·
4e14814
1
Parent(s):
ff1f7d0
delta function location using the (x, y) input field
Browse files- em/excitation.py +2 -2
- em/handlers.py +2 -2
em/excitation.py
CHANGED
|
@@ -60,8 +60,8 @@ def update_excitation_info_message():
|
|
| 60 |
denom = float(max(nx - 1, 1))
|
| 61 |
|
| 62 |
if state.dist_type == "Delta":
|
| 63 |
-
x_in = float(getattr(state, '
|
| 64 |
-
y_in = float(getattr(state, '
|
| 65 |
elif state.dist_type == "Gaussian":
|
| 66 |
x_in = float(getattr(state, 'mu_x', 0.5))
|
| 67 |
y_in = float(getattr(state, 'mu_y', 0.5))
|
|
|
|
| 60 |
denom = float(max(nx - 1, 1))
|
| 61 |
|
| 62 |
if state.dist_type == "Delta":
|
| 63 |
+
x_in = float(getattr(state, 'impulse_x', 0.5))
|
| 64 |
+
y_in = float(getattr(state, 'impulse_y', 0.5))
|
| 65 |
elif state.dist_type == "Gaussian":
|
| 66 |
x_in = float(getattr(state, 'mu_x', 0.5))
|
| 67 |
y_in = float(getattr(state, 'mu_y', 0.5))
|
em/handlers.py
CHANGED
|
@@ -295,8 +295,8 @@ def register_handlers():
|
|
| 295 |
if not (0.0 <= x <= 1.0) or not (0.0 <= y <= 1.0):
|
| 296 |
state.excitation_error_message = "Peak must be in [0,1]."
|
| 297 |
return
|
| 298 |
-
state.
|
| 299 |
-
state.
|
| 300 |
state.excitation_error_message = ""
|
| 301 |
update_initial_state_preview()
|
| 302 |
except Exception:
|
|
|
|
| 295 |
if not (0.0 <= x <= 1.0) or not (0.0 <= y <= 1.0):
|
| 296 |
state.excitation_error_message = "Peak must be in [0,1]."
|
| 297 |
return
|
| 298 |
+
state.impulse_x = x
|
| 299 |
+
state.impulse_y = y
|
| 300 |
state.excitation_error_message = ""
|
| 301 |
update_initial_state_preview()
|
| 302 |
except Exception:
|