Skip to content

Commit

Permalink
Fix: shape issues with drift field
Browse files Browse the repository at this point in the history
This is not a good fix
  • Loading branch information
josh0-jrg committed Jan 2, 2025
1 parent 843a6a3 commit 76f9463
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flamedisx/nest/lxe_blocks/quanta_splitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ def compute_single_energy(args, approx=False):

# Calculate the ion domain tensor for this energy
_ions_produced = ions_produced_add + ions_min

if self.is_ER:
nel_mean = self.gimme('mean_yield_electron', data_tensor=data_tensor, ptensor=ptensor,
bonus_arg=energy)
#a fix to retain back-compatibiliy, god help me.
nel_mean = nel_mean*tf.transpose(tf.ones_like(nq, fd.float_type()),perm=[1,2,3,0])
nel_mean = tf.transpose(nel_mean,perm=[3,0,1,2])
nq_mean = self.gimme('mean_yield_quanta', data_tensor=data_tensor, ptensor=ptensor,
bonus_arg=(energy, nel_mean))
fano = self.gimme('fano_factor', data_tensor=data_tensor, ptensor=ptensor,
Expand Down

0 comments on commit 76f9463

Please sign in to comment.