Skip to content

Commit

Permalink
Fix test parameters; fix efield shape
Browse files Browse the repository at this point in the history
  • Loading branch information
mhliu0001 committed Sep 29, 2024
1 parent 1ad7e3d commit 82f5718
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
11 changes: 11 additions & 0 deletions appletree/parameters/nestv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
11 changes: 11 additions & 0 deletions appletree/parameters/nestv2_yield_only.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion appletree/plugins/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 82f5718

Please sign in to comment.