diff --git a/Project.toml b/Project.toml index 05995a5..6bb3c62 100644 --- a/Project.toml +++ b/Project.toml @@ -6,6 +6,7 @@ version = "0.1.0" ArraysOfArrays = "65a8f2f4-9b39-5baf-92e2-a9cc46fdf018" BufferedStreams = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d" Sockets = "6462fe0b-24de-5631-8697-dd941f90decc" +Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [compat] julia = "1" diff --git a/src/H3DDetectorSystems.jl b/src/H3DDetectorSystems.jl index f5a19ce..2f9c5b5 100644 --- a/src/H3DDetectorSystems.jl +++ b/src/H3DDetectorSystems.jl @@ -8,6 +8,7 @@ using Sockets using ArraysOfArrays using BufferedStreams +using Unitful include("polaris_data.jl") include("datastream.jl") diff --git a/src/polaris_data.jl b/src/polaris_data.jl index 9c11169..92fcffe 100644 --- a/src/polaris_data.jl +++ b/src/polaris_data.jl @@ -25,15 +25,15 @@ PolarisEvents() = PolarisEvents( Base.NamedTuple(events::PolarisEvents) = ( evt_no = events.evt_no, - evt_t = events.evt_t, + evt_t = deepmap(x -> x * u"ns", events.evt_t), evt_nhits = events.evt_nhits, evt_issync = events.evt_issync, - hit_edep = events.hit_edep, - hit_t = events.hit_t, + hit_edep = deepmap(x -> x * u"eV", events.hit_edep), + hit_t = deepmap(x -> x * u"ns", events.hit_t), hit_detno = events.hit_detno, - hit_x = events.hit_x, - hit_y = events.hit_y, - hit_z = events.hit_z, + hit_x = deepmap(x -> x * u"μm", events.hit_x), + hit_y = deepmap(x -> x * u"μm", events.hit_y), + hit_z = deepmap(x -> x * u"μm", events.hit_z), )