Skip to content

Commit

Permalink
Update documentation regarding LegendHDF5IO
Browse files Browse the repository at this point in the history
The package HDF5 is no longer required, and LegendHDF5IO should be loaded after loading SolidStateDetectors
  • Loading branch information
fhagemann committed Nov 3, 2024
1 parent 20de2dc commit 1188b48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/IO/IO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ with a given `filename` using [LegendHDF5IO.jl](https://github.com/legend-exp/Le
## Example
```julia
using LegendHDF5IO
using SolidStateDetectors
using LegendHDF5IO
sim = Simulation(SSD_examples[:InvertedCoax])
simulate!(sim)
ssd_write("example_sim.h5", sim)
Expand All @@ -32,7 +32,7 @@ ssd_write("example_sim.h5", sim)
!!! note
In order to use this method, the package [LegendHDF5IO.jl](https://github.com/legend-exp/LegendHDF5IO.jl)
has to be loaded before loading SolidStateDetectors.jl.
has to be loaded after loading SolidStateDetectors.jl.
See also [`ssd_read`](@ref).
"""
Expand All @@ -51,14 +51,14 @@ using [LegendHDF5IO.jl](https://github.com/legend-exp/LegendHDF5IO.jl).
## Example
```julia
using LegendHDF5IO
using SolidStateDetectors
using LegendHDF5IO
sim = ssd_read("example_sim.h5", Simulation)
```
!!! note
In order to use this method, the package [LegendHDF5IO.jl](https://github.com/legend-exp/LegendHDF5IO.jl)
has to be loaded before loading SolidStateDetectors.jl.
has to be loaded after loading SolidStateDetectors.jl.
See also [`ssd_write`](@ref).
"""
Expand Down
9 changes: 4 additions & 5 deletions src/MCEventsProcessing/MCEventsProcessing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ Simulates the waveforms for all events defined in `mcevents` for a given [`Simul
2. determining the signal (waveforms) for each [`Contact`](@ref),
for which a [`WeightingPotential`](@ref) is specified in `sim.weighting_potentials`.
## Arguments
* `mcevents::TypedTables.Table`: Table with information about events in the simulated setup.
* `sim::Simulation{T}`: [`Simulation`](@ref) which defines the setup in which the charges in `mcevents` should drift.
If [HDF5.jl](https://github.com/JuliaIO/HDF5.jl) is loaded, this function has additional arguments.
If [LegendHDF5IO.jl](https://github.com/legend-exp/LegendHDF5IO.jl) is loaded, this function has additional arguments.
## Additional Arguments (HDF5)
## Additional Arguments (`LegendHDF5IO`)
* `output_dir::AbstractString`: Directory where the HDF5 output file is saved.
* `output_base_name::AbstractString`: Basename of the HDF5 output file, default is `"generated_waveforms"`.
Expand All @@ -29,15 +28,15 @@ If [HDF5.jl](https://github.com/JuliaIO/HDF5.jl) is loaded, this function has ad
* `number_of_carriers::Int = 1`: Number of charge carriers to be used in the N-Body simulation of an energy deposition.
* `number_of_shells::Int = 1`: Number of shells around the `center` point of the energy deposition.
* `verbose = false`: Activate or deactivate additional info output.
* `chunk_n_physics_events::Int = 1000` (HDF5 only): Number of events that should be saved in a single HDF5 output file.
* `chunk_n_physics_events::Int = 1000` (`LegendHDF5IO` only): Number of events that should be saved in a single HDF5 output file.
## Examples
```julia
simulate_waveforms(mcevents, sim, Δt = 1u"ns", verbose = false)
# => returns the input table `mcevents` with an additional column `waveform` in which the generated waveforms are stored
```
```julia
import HDF5
using LegendHDF5IO
simulate_waveforms(mcevents, sim, "output_dir", "my_basename", Δt = 1u"ns", verbose = false)
# => simulates the charge drift and saves the output to "output_dir/my_basename_evts_xx.h5"
```
Expand Down

0 comments on commit 1188b48

Please sign in to comment.