XENONnT / fuse

XENON Framework for Unified Simulations of Events
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Add a dtypes manger #195

Closed dachengx closed 6 months ago

dachengx commented 6 months ago

Similar to https://github.com/XENONnT/fuse/pull/147, but I added a type manager for all plugins.

  1. please look at fuse/dtypes.py for all lists of fields
  2. remove ". Will be set later" from dtype of clustered_interactions
  3. add csv_input_fields indicating the needed fields for ChunkCsvInput

This PR will also remove the trouble of updating the same field distributed in different files later.

coveralls commented 6 months ago

Pull Request Test Coverage Report for Build 8751042245

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
fuse/plugins/detector_physics/csv_input.py 13 14 92.86%
fuse/plugins/micro_physics/wfsim_connection.py 0 4 0.0%
fuse/plugins/micro_physics/input.py 11 29 37.93%
<!-- Total: 59 82 71.95% -->
Totals Coverage Status
Change from base Build 8750740909: 0.05%
Covered Lines: 2105
Relevant Lines: 2936

💛 - Coveralls
dachengx commented 6 months ago

@HenningSE Should this be float64 or int64? https://github.com/XENONnT/fuse/blob/383aab0b4d5c4ff2f48fa60654a8460139945019/fuse/dtypes.py#L5

HenningSE commented 6 months ago

@HenningSE Should this be float64 or int64?

https://github.com/XENONnT/fuse/blob/383aab0b4d5c4ff2f48fa60654a8460139945019/fuse/dtypes.py#L5

Good catch! This should be an int64.

ramirezdiego commented 6 months ago

@dachengx Super nice :)