calzone 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. {calzone-1.2.0 → calzone-1.2.2}/Cargo.toml +1 -1
  2. {calzone-1.2.0/src/python/calzone.egg-info → calzone-1.2.2}/PKG-INFO +1 -1
  3. {calzone-1.2.0 → calzone-1.2.2}/pyproject.toml +1 -1
  4. {calzone-1.2.0 → calzone-1.2.2}/src/cxx.rs +4 -0
  5. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/materials.rs +3 -3
  6. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/volume.rs +1 -1
  7. {calzone-1.2.0 → calzone-1.2.2}/src/geometry.rs +8 -8
  8. {calzone-1.2.0 → calzone-1.2.2}/src/python/calzone/__init__.py +1 -1
  9. {calzone-1.2.0 → calzone-1.2.2/src/python/calzone.egg-info}/PKG-INFO +1 -1
  10. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/sampler.cc +5 -1
  11. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/sampler.rs +24 -11
  12. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/tracker.cc +2 -0
  13. {calzone-1.2.0 → calzone-1.2.2}/src/simulation.rs +4 -2
  14. {calzone-1.2.0 → calzone-1.2.2}/src/utils/error.rs +17 -13
  15. {calzone-1.2.0 → calzone-1.2.2}/src/utils/numpy.rs +5 -1
  16. {calzone-1.2.0 → calzone-1.2.2}/COPYING.LESSER +0 -0
  17. {calzone-1.2.0 → calzone-1.2.2}/LICENSE +0 -0
  18. {calzone-1.2.0 → calzone-1.2.2}/MANIFEST.in +0 -0
  19. {calzone-1.2.0 → calzone-1.2.2}/README.md +0 -0
  20. {calzone-1.2.0 → calzone-1.2.2}/setup.cfg +0 -0
  21. {calzone-1.2.0 → calzone-1.2.2}/src/calzone.h +0 -0
  22. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/bytes.rs +0 -0
  23. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/goupil.rs +0 -0
  24. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/map.rs +0 -0
  25. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/materials/gate.rs +0 -0
  26. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/materials/hash.rs +0 -0
  27. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/materials.cc +0 -0
  28. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/mesh.cc +0 -0
  29. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/mesh.h +0 -0
  30. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/mesh.rs +0 -0
  31. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/mulder.rs +0 -0
  32. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/solids.cc +0 -0
  33. {calzone-1.2.0 → calzone-1.2.2}/src/geometry/solids.h +0 -0
  34. {calzone-1.2.0 → calzone-1.2.2}/src/geometry.cc +0 -0
  35. {calzone-1.2.0 → calzone-1.2.2}/src/lib.rs +0 -0
  36. {calzone-1.2.0 → calzone-1.2.2}/src/python/calzone/__main__.py +0 -0
  37. {calzone-1.2.0 → calzone-1.2.2}/src/python/calzone.egg-info/SOURCES.txt +0 -0
  38. {calzone-1.2.0 → calzone-1.2.2}/src/python/calzone.egg-info/dependency_links.txt +0 -0
  39. {calzone-1.2.0 → calzone-1.2.2}/src/python/calzone.egg-info/entry_points.txt +0 -0
  40. {calzone-1.2.0 → calzone-1.2.2}/src/python/calzone.egg-info/requires.txt +0 -0
  41. {calzone-1.2.0 → calzone-1.2.2}/src/python/calzone.egg-info/top_level.txt +0 -0
  42. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/geometry.cc +0 -0
  43. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/geometry.h +0 -0
  44. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/physics.cc +0 -0
  45. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/physics.h +0 -0
  46. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/physics.rs +0 -0
  47. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/random.cc +0 -0
  48. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/random.h +0 -0
  49. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/random.rs +0 -0
  50. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/sampler.h +0 -0
  51. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/source.cc +0 -0
  52. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/source.h +0 -0
  53. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/source.rs +0 -0
  54. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/tracker.h +0 -0
  55. {calzone-1.2.0 → calzone-1.2.2}/src/simulation/tracker.rs +0 -0
  56. {calzone-1.2.0 → calzone-1.2.2}/src/simulation.cc +0 -0
  57. {calzone-1.2.0 → calzone-1.2.2}/src/utils/convert.cc +0 -0
  58. {calzone-1.2.0 → calzone-1.2.2}/src/utils/data.rs +0 -0
  59. {calzone-1.2.0 → calzone-1.2.2}/src/utils/error.cc +0 -0
  60. {calzone-1.2.0 → calzone-1.2.2}/src/utils/export.rs +0 -0
  61. {calzone-1.2.0 → calzone-1.2.2}/src/utils/extract.rs +0 -0
  62. {calzone-1.2.0 → calzone-1.2.2}/src/utils/float.rs +0 -0
  63. {calzone-1.2.0 → calzone-1.2.2}/src/utils/graph.rs +0 -0
  64. {calzone-1.2.0 → calzone-1.2.2}/src/utils/io.rs +0 -0
  65. {calzone-1.2.0 → calzone-1.2.2}/src/utils/namespace.rs +0 -0
  66. {calzone-1.2.0 → calzone-1.2.2}/src/utils/os.cc +0 -0
  67. {calzone-1.2.0 → calzone-1.2.2}/src/utils/units.cc +0 -0
  68. {calzone-1.2.0 → calzone-1.2.2}/src/utils/units.rs +0 -0
  69. {calzone-1.2.0 → calzone-1.2.2}/src/utils.rs +0 -0
  70. {calzone-1.2.0 → calzone-1.2.2}/tests/test_examples.py +0 -0
  71. {calzone-1.2.0 → calzone-1.2.2}/tests/test_geometry.py +0 -0
  72. {calzone-1.2.0 → calzone-1.2.2}/tests/test_materials.py +0 -0
  73. {calzone-1.2.0 → calzone-1.2.2}/tests/test_simulation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "calzone"
3
- version = "1.2.0"
3
+ version = "1.2.2"
4
4
  edition = "2021"
5
5
 
6
6
  [lib]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: calzone
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: A Geant4 Python wrapper.
5
5
  Author-email: Valentin Niess <valentin.niess@gmail.com>
6
6
  License: LGPLv3
@@ -15,7 +15,7 @@ classifiers = [
15
15
  "Intended Audience :: Science/Research",
16
16
  "Topic :: Scientific/Engineering :: Physics"
17
17
  ]
18
- version = "1.2.0"
18
+ version = "1.2.2"
19
19
  requires-python = ">=3.7.0"
20
20
  dependencies = [
21
21
  "numpy >= 1.6.0",
@@ -300,6 +300,7 @@ pub mod ffi {
300
300
  energy: f64,
301
301
  position: [f64; 3],
302
302
  direction: [f64; 3],
303
+ time: f64,
303
304
  volume: [u8; 16],
304
305
  process: [u8; 16],
305
306
  }
@@ -327,6 +328,7 @@ pub mod ffi {
327
328
  include!("calzone.h");
328
329
 
329
330
  // Errors interface.
331
+ fn clear_error();
330
332
  fn initialise_errors();
331
333
  fn get_error() -> SharedPtr<Error>;
332
334
 
@@ -510,6 +512,8 @@ pub mod ffi {
510
512
  point_deposit: f64,
511
513
  start: &G4ThreeVector,
512
514
  end: &G4ThreeVector,
515
+ t_start: f64,
516
+ t_end: f64,
513
517
  );
514
518
  unsafe fn push_particle(
515
519
  self: &mut RunAgent,
@@ -35,16 +35,16 @@ impl MaterialsDefinition {
35
35
  pub fn build(&self) -> PyResult<()> {
36
36
  for element in &self.elements {
37
37
  ffi::add_element(&element)
38
- .to_result()?;
38
+ .take_result()?;
39
39
  }
40
40
  for molecule in &self.molecules {
41
41
  ffi::add_molecule(&molecule)
42
- .to_result()?;
42
+ .take_result()?;
43
43
  }
44
44
  let mixtures = self.sorted_mixtures()?;
45
45
  for mixture in mixtures {
46
46
  ffi::add_mixture(mixture)
47
- .to_result()?;
47
+ .take_result()?;
48
48
  }
49
49
  Ok(())
50
50
  }
@@ -80,7 +80,7 @@ impl<'py> FromPyObject<'py> for Algorithm {
80
80
  fn extract_bound(algorithm: &Bound<'py, PyAny>) -> PyResult<Self> {
81
81
  let algorithm: String = algorithm.extract()?;
82
82
  let algorithm = Algorithm::from_str(&algorithm)
83
- .map_err(|options| variant_error("algorith", &algorithm, options))?;
83
+ .map_err(|options| variant_error("bad algorithm", &algorithm, options))?;
84
84
  Ok(algorithm)
85
85
  }
86
86
  }
@@ -99,7 +99,7 @@ impl Geometry {
99
99
  let resolution = resolution.unwrap_or(1000);
100
100
  self.0
101
101
  .check(resolution)
102
- .to_result()?;
102
+ .take_result()?;
103
103
  Ok(())
104
104
  }
105
105
 
@@ -208,7 +208,7 @@ impl GeometryBuilder {
208
208
  // Build volumes.
209
209
  let geometry = ffi::create_geometry(&self.definition.volume);
210
210
  if geometry.is_null() {
211
- ffi::get_error().to_result()?;
211
+ ffi::get_error().take_result()?;
212
212
  unreachable!()
213
213
  }
214
214
  let geometry = Geometry (geometry);
@@ -658,8 +658,8 @@ impl Volume {
658
658
  ) -> PyResult<PyObject> {
659
659
  let frame = frame.unwrap_or("");
660
660
  let bbox = self.volume.compute_box(frame);
661
- if let Some(why) = ffi::get_error().value() {
662
- let err = Error::new(ValueError).what("box operation").why(why);
661
+ if let Some(why) = ffi::get_error().take_opt() {
662
+ let err = Error::new(ValueError).what("box operation").why(&why);
663
663
  return Err(err.into());
664
664
  }
665
665
 
@@ -679,8 +679,8 @@ impl Volume {
679
679
  fn compute_origin(&self, frame: Option<&str>) -> PyResult<f64x3> {
680
680
  let frame = frame.unwrap_or("");
681
681
  let origin = self.volume.compute_origin(frame);
682
- if let Some(why) = ffi::get_error().value() {
683
- let err = Error::new(ValueError).what("origin operation").why(why);
682
+ if let Some(why) = ffi::get_error().take_opt() {
683
+ let err = Error::new(ValueError).what("origin operation").why(&why);
684
684
  return Err(err.into());
685
685
  }
686
686
  Ok((&origin).into())
@@ -967,8 +967,8 @@ impl Volume {
967
967
  VolumeKey::Root => geometry.root_volume(),
968
968
  VolumeKey::Stem(stem) => geometry.find_volume(stem),
969
969
  };
970
- if let Some(msg) = ffi::get_error().value() {
971
- let err = Error::new(IndexError).what("volume").why(msg);
970
+ if let Some(msg) = ffi::get_error().take_opt() {
971
+ let err = Error::new(IndexError).what("volume").why(&msg);
972
972
  return Err(err.into())
973
973
  }
974
974
  let ffi::VolumeInfo { path, material, solid, mother, mut daughters } =
@@ -11,4 +11,4 @@ def init():
11
11
  init()
12
12
  del init
13
13
 
14
- VERSION = "1.2.0"
14
+ VERSION = "1.2.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: calzone
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: A Geant4 Python wrapper.
5
5
  Author-email: Valentin Niess <valentin.niess@gmail.com>
6
6
  License: LGPLv3
@@ -26,9 +26,12 @@ G4bool SamplerImpl::ProcessHits(G4Step * step, G4TouchableHistory *) {
26
26
  double energy = pre->GetKineticEnergy();
27
27
  auto start = pre->GetPosition() / CLHEP::cm;
28
28
  auto end = post->GetPosition() / CLHEP::cm;
29
+ auto t_start = pre->GetGlobalTime() / CLHEP::s;
30
+ auto t_end = post->GetGlobalTime() / CLHEP::s;
29
31
 
30
32
  RUN_AGENT->push_deposit(
31
- volume, tid, pid, energy, deposit, point_deposit, start, end
33
+ volume, tid, pid, energy, deposit, point_deposit, start, end,
34
+ t_start, t_end
32
35
  );
33
36
  }
34
37
  }
@@ -82,6 +85,7 @@ G4bool SamplerImpl::ProcessHits(G4Step * step, G4TouchableHistory *) {
82
85
  point->GetKineticEnergy() / CLHEP::MeV,
83
86
  { r.x(), r.y(), r.z() },
84
87
  { u.x(), u.y(), u.z() },
88
+ 0.0,
85
89
  { 0x0 },
86
90
  { 0x0 }
87
91
  };
@@ -212,19 +212,21 @@ impl Deposits {
212
212
  point_deposit: f64,
213
213
  start: &ffi::G4ThreeVector,
214
214
  end: &ffi::G4ThreeVector,
215
+ t_start: f64,
216
+ t_end: f64,
215
217
  weight: f64,
216
218
  random_index: &[u64; 2],
217
219
  ) {
218
220
  self.values.entry(volume)
219
221
  .and_modify(|e| e.push(
220
- event, tid, pid, energy, total_deposit, point_deposit, start, end, weight,
221
- random_index
222
+ event, tid, pid, energy, total_deposit, point_deposit, start, end, t_start, t_end,
223
+ weight, random_index
222
224
  ))
223
225
  .or_insert_with(|| {
224
226
  let mut cell = DepositsCell::new(self.mode);
225
227
  cell.push(
226
- event, tid, pid, energy, total_deposit, point_deposit, start, end, weight,
227
- random_index
228
+ event, tid, pid, energy, total_deposit, point_deposit, start, end, t_start,
229
+ t_end, weight, random_index
228
230
  );
229
231
  cell
230
232
  });
@@ -245,7 +247,7 @@ enum DepositsCell {
245
247
 
246
248
  #[derive(Default)]
247
249
  struct BriefDeposits {
248
- total: IndexMap<usize, (f64, f64, [u64; 2])>,
250
+ total: IndexMap<usize, (f64, f64, f64, [u64; 2])>,
249
251
  }
250
252
 
251
253
  #[derive(Default)]
@@ -266,10 +268,10 @@ impl DepositsCell {
266
268
  let deposits = match self {
267
269
  Self::Brief(mut deposits) => {
268
270
  let array = PyArray::<TotalDeposit>::empty(py, &[deposits.total.len()])?;
269
- for (i, (event, (value, weight, random_index))) in deposits.total
271
+ for (i, (event, (value, time, weight, random_index))) in deposits.total
270
272
  .drain(..)
271
273
  .enumerate() {
272
- let deposit = TotalDeposit { event, value, weight, random_index };
274
+ let deposit = TotalDeposit { event, value, time, weight, random_index };
273
275
  array.set(i, deposit)?;
274
276
  }
275
277
  array.into_any().unbind()
@@ -296,31 +298,39 @@ impl DepositsCell {
296
298
  point_deposit: f64,
297
299
  start: &ffi::G4ThreeVector,
298
300
  end: &ffi::G4ThreeVector,
301
+ t_start: f64,
302
+ t_end: f64,
299
303
  weight: f64,
300
304
  random_index: &[u64; 2],
301
305
  ) {
302
306
  match self {
303
307
  Self::Brief(ref mut deposits) => {
304
308
  deposits.total.entry(event)
305
- .and_modify(|e| { e.0 += total_deposit })
306
- .or_insert((total_deposit, weight, *random_index));
309
+ .and_modify(|e| {
310
+ e.0 += total_deposit;
311
+ if t_start < e.1 {
312
+ e.1 = t_start;
313
+ }
314
+ })
315
+ .or_insert((total_deposit, t_start, weight, *random_index));
307
316
  },
308
317
  Self::Detailed(ref mut deposits) => {
309
318
  let start = ffi::to_vec(start);
310
319
  let end = ffi::to_vec(end);
311
320
  let line_deposit = total_deposit - point_deposit;
321
+ let time = [ t_start, t_end ];
312
322
  let random_index = *random_index;
313
323
  if line_deposit > 0.0 {
314
324
  let deposit = LineDeposit {
315
325
  event, tid, pid, energy, start, end, value: line_deposit, weight,
316
- random_index
326
+ time, random_index
317
327
  };
318
328
  deposits.line.push(deposit);
319
329
  }
320
330
  if point_deposit > 0.0 {
321
331
  let deposit = PointDeposit {
322
332
  event, tid, pid, energy, position: end, value: point_deposit, weight,
323
- random_index
333
+ time: t_start, random_index
324
334
  };
325
335
  deposits.point.push(deposit);
326
336
  }
@@ -346,6 +356,7 @@ pub struct LineDeposit {
346
356
  value: f64,
347
357
  start: [f64; 3],
348
358
  end: [f64; 3],
359
+ time: [f64; 2],
349
360
  weight: f64,
350
361
  random_index: [u64; 2],
351
362
  }
@@ -359,6 +370,7 @@ pub struct PointDeposit {
359
370
  energy: f64,
360
371
  value: f64,
361
372
  position: [f64; 3],
373
+ time: f64,
362
374
  weight: f64,
363
375
  random_index: [u64; 2],
364
376
  }
@@ -368,6 +380,7 @@ pub struct PointDeposit {
368
380
  pub struct TotalDeposit {
369
381
  event: usize,
370
382
  value: f64,
383
+ time: f64,
371
384
  weight: f64,
372
385
  random_index: [u64; 2],
373
386
  }
@@ -175,12 +175,14 @@ void SteppingImpl::UserSteppingAction(const G4Step * step) {
175
175
  auto push_vertex = [&](const G4StepPoint * p, bool pre=false) {
176
176
  auto && r = p->GetPosition() / CLHEP::cm;
177
177
  auto && u = p->GetMomentumDirection();
178
+ auto && t = p->GetGlobalTime() / CLHEP::s;
178
179
  Vertex vertex = {
179
180
  0,
180
181
  tid,
181
182
  p->GetKineticEnergy() / CLHEP::MeV,
182
183
  { r.x(), r.y(), r.z() },
183
184
  { u.x(), u.y(), u.z() },
185
+ t,
184
186
  { 0x0 },
185
187
  { 0x0 }
186
188
  };
@@ -160,7 +160,7 @@ impl Simulation {
160
160
  let mut binding = self.random.bind(py).borrow_mut();
161
161
  let mut random = RandomContext::new(&mut binding);
162
162
  let result = ffi::run_simulation(&mut agent, &mut random, verbose)
163
- .to_result();
163
+ .take_result();
164
164
 
165
165
  let agent = Pin::into_inner(agent);
166
166
  result.and_then(|_| agent.export(py))
@@ -423,11 +423,13 @@ impl<'a> RunAgent<'a> {
423
423
  point_deposit: f64,
424
424
  start: &ffi::G4ThreeVector,
425
425
  end: &ffi::G4ThreeVector,
426
+ t_start: f64,
427
+ t_end: f64,
426
428
  ) {
427
429
  if let Some(deposits) = self.deposits.as_mut() {
428
430
  deposits.push(
429
431
  volume, self.index - 1, tid, pid, energy, total_deposit, point_deposit, start, end,
430
- self.weight, &self.random_index
432
+ t_start, t_end, self.weight, &self.random_index
431
433
  )
432
434
  }
433
435
  }
@@ -176,8 +176,8 @@ impl ffi::Error {
176
176
  const KEYBOARD_INTERUPT: &'static str = "Ctrl+C catched";
177
177
  const MEMORY_ERROR: &'static str = "could not allocate memory";
178
178
 
179
- pub fn to_result(&self) -> PyResult<()> {
180
- match self.tp {
179
+ pub fn take_result(&self) -> PyResult<()> {
180
+ let result = match self.tp {
181
181
  ffi::ErrorType::None => Ok(()),
182
182
  ffi::ErrorType::FileNotFoundError => {
183
183
  Err(PyFileNotFoundError::new_err(self.message.clone()))
@@ -201,21 +201,25 @@ impl ffi::Error {
201
201
  Err(PyValueError::new_err(self.message.clone()))
202
202
  },
203
203
  _ => unreachable!(),
204
- }
204
+ };
205
+ ffi::clear_error();
206
+ result
205
207
  }
206
208
 
207
- pub fn value(&self) -> Option<&str> {
208
- match self.tp {
209
+ pub fn take_opt(&self) -> Option<String> {
210
+ let opt = match self.tp {
209
211
  ffi::ErrorType::None => None,
210
- ffi::ErrorType::FileNotFoundError => Some(self.message.as_str()),
211
- ffi::ErrorType::Geant4Exception => Some(self.message.as_str()),
212
- ffi::ErrorType::IndexError => Some(self.message.as_str()),
213
- ffi::ErrorType::IOError => Some(self.message.as_str()),
214
- ffi::ErrorType::KeyboardInterrupt => Some(Self::KEYBOARD_INTERUPT),
215
- ffi::ErrorType::MemoryError => Some(Self::MEMORY_ERROR),
216
- ffi::ErrorType::ValueError => Some(self.message.as_str()),
212
+ ffi::ErrorType::FileNotFoundError => Some(self.message.clone()),
213
+ ffi::ErrorType::Geant4Exception => Some(self.message.clone()),
214
+ ffi::ErrorType::IndexError => Some(self.message.clone()),
215
+ ffi::ErrorType::IOError => Some(self.message.clone()),
216
+ ffi::ErrorType::KeyboardInterrupt => Some(Self::KEYBOARD_INTERUPT.to_string()),
217
+ ffi::ErrorType::MemoryError => Some(Self::MEMORY_ERROR.to_string()),
218
+ ffi::ErrorType::ValueError => Some(self.message.clone()),
217
219
  _ => unreachable!(),
218
- }
220
+ };
221
+ ffi::clear_error();
222
+ opt
219
223
  }
220
224
  }
221
225
 
@@ -137,6 +137,7 @@ pub fn initialise(py: Python) -> PyResult<()> {
137
137
  ("value", "f8"),
138
138
  ("start", "3f8"),
139
139
  ("end", "3f8"),
140
+ ("time", "2f8"),
140
141
  ("weight", "f8"),
141
142
  ("random_index", "2u8"),
142
143
  ];
@@ -165,6 +166,7 @@ pub fn initialise(py: Python) -> PyResult<()> {
165
166
  ("energy", "f8"),
166
167
  ("value", "f8"),
167
168
  ("position", "3f8"),
169
+ ("time", "f8"),
168
170
  ("weight", "f8"),
169
171
  ("random_index", "2u8"),
170
172
  ];
@@ -193,6 +195,7 @@ pub fn initialise(py: Python) -> PyResult<()> {
193
195
  let arg = [
194
196
  ("event", "u8"),
195
197
  ("value", "f8"),
198
+ ("time", "f8"),
196
199
  ("weight", "f8"),
197
200
  ("random_index", "2u8"),
198
201
  ];
@@ -219,12 +222,13 @@ pub fn initialise(py: Python) -> PyResult<()> {
219
222
  .into_py(py);
220
223
 
221
224
  let dtype_vertex: PyObject = {
222
- let arg: [PyObject; 7] = [
225
+ let arg: [PyObject; 8] = [
223
226
  ("event", "u8").into_py(py),
224
227
  ("tid", "i4").into_py(py),
225
228
  ("energy", "f8").into_py(py),
226
229
  ("position", "f8", 3).into_py(py),
227
230
  ("direction", "f8", 3).into_py(py),
231
+ ("time", "f8").into_py(py),
228
232
  ("volume", "S16").into_py(py),
229
233
  ("process", "S16").into_py(py),
230
234
  ];
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes