From 82f5718121076aa35aa77ad4dae05f4d99fa9052 Mon Sep 17 00:00:00 2001 From: mhliu Date: Sun, 29 Sep 2024 12:48:06 -0400 Subject: [PATCH] Fix test parameters; fix efield shape --- appletree/parameters/nestv2.json | 11 +++++++++++ appletree/parameters/nestv2_yield_only.json | 11 +++++++++++ appletree/plugins/detector.py | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/appletree/parameters/nestv2.json b/appletree/parameters/nestv2.json index 1fa52a86..77156565 100644 --- a/appletree/parameters/nestv2.json +++ b/appletree/parameters/nestv2.json @@ -10,6 +10,17 @@ "unit": "g/cm^3", "doc": "Density of the lXe" }, + "field": { + "prior_type": "fixed", + "prior_args": { + "val": 23.0 + }, + "allowed_range": null, + "init_mean": null, + "init_std": null, + "unit": "V/cm", + "doc": "Drift field" + }, "alpha": { "prior_type": "twohalfnorm", "prior_args": { diff --git a/appletree/parameters/nestv2_yield_only.json b/appletree/parameters/nestv2_yield_only.json index c8b6d420..7acec608 100644 --- a/appletree/parameters/nestv2_yield_only.json +++ b/appletree/parameters/nestv2_yield_only.json @@ -10,6 +10,17 @@ "unit": "g/cm^3", "doc": "Density of the lXe" }, + "field": { + "prior_type": "fixed", + "prior_args": { + "val": 23.0 + }, + "allowed_range": null, + "init_mean": null, + "init_std": null, + "unit": "V/cm", + "doc": "Drift field" + }, "alpha": { "prior_type": "twohalfnorm", "prior_args": { diff --git a/appletree/plugins/detector.py b/appletree/plugins/detector.py index 2f04438c..3f3767ac 100644 --- a/appletree/plugins/detector.py +++ b/appletree/plugins/detector.py @@ -71,7 +71,7 @@ class EField(Plugin): def simulate(self, key, parameters, x, y, z): # Safe to use "if" because we expect config to be fixed if not self.efield_position_dependence.value: - return key, parameters["field"] + return key, jnp.ones(x.shape) * parameters["field"] r = jnp.sqrt(x**2 + y**2) pos_true = jnp.stack([r, z]).T return key, self.efield_map.apply(pos_true)