Skip to content

Commit d842138

Browse files
authored
fix typos in comments and docstrings (#85)
1 parent 042db6d commit d842138

17 files changed

+35
-35
lines changed

examples/instrumented-jetreco.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ function profile_code(profile, jet_reconstruction, events, niters; R = 0.4, p =
5959
""")
6060
end
6161
"""
62-
Top level call funtion for demonstrating the use of jet reconstruction
62+
Top level call function for demonstrating the use of jet reconstruction
6363
6464
This uses the "jet_reconstruct" wrapper, so algorithm switching
6565
happens inside the JetReconstruction package itself.
6666
67-
Some other ustilities are also supported here, such as profiling and
67+
Some other utilities are also supported here, such as profiling and
6868
serialising the reconstructed jet outputs.
6969
"""
7070
function jet_process(events::Vector{Vector{T}};

examples/jetreco.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ using JetReconstruction
1616
include(joinpath(@__DIR__, "parse-options.jl"))
1717

1818
"""
19-
Top level call funtion for demonstrating the use of jet reconstruction
19+
Top level call function for demonstrating the use of jet reconstruction
2020
2121
This uses the "jet_reconstruct" wrapper, so algorithm switching
2222
happens inside the JetReconstruction package itself.

examples/parse-options.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Add `parse_item` code for interpeting `JetAlgorithm.Algorithm` and `RecoStrategy.Strategy` types
2+
Add `parse_item` code for interpreting `JetAlgorithm.Algorithm` and `RecoStrategy.Strategy` types
33
from the command line.
44
"""
55

ext/JetVisualisation.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ end
5252
jetsplot(objects, idx_arrays; barsize_phi=0.1, barsize_eta=0.1, colormap=:glasbey_hv_n256, Module=Main)
5353
5454
Plots a 3d bar chart that represents jets. Takes an `objects` array of objects
55-
to display and `idx_arrays`, an array of arrays with indeces, where
56-
`idx_arrays[i]` gives indeces of `objects` that form the jet number `i`. This
55+
to display and `idx_arrays`, an array of arrays with indices, where
56+
`idx_arrays[i]` gives indices of `objects` that form the jet number `i`. This
5757
function's signature might not be the most practical for the current version of
5858
the JetReconstruction.jl package, as it has been written during the early stage
5959
of development. There is now an overload of it that takes a `ClusterSequence`
@@ -225,7 +225,7 @@ function JetReconstruction.animatereco(cs::ClusterSequence, filename;
225225
merge_steps = JetReconstruction.merge_steps(cs)
226226
jet_ranks = JetReconstruction.jet_ranks(cs)
227227

228-
# End point of the catagorical color map
228+
# End point of the categorical color map
229229
# (How to get this programmatically from the CM Symbol?)
230230
colormap_end = 256
231231

src/ClusterSequence.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ add_step_to_history!(clusterseq::ClusterSequence, parent1, parent2, jetp_index,
187187
# retry the clustering with a different strategy.
188188
@assert parent1 >= 1
189189
if clusterseq.history[parent1].child != Invalid
190-
error("Internal error. Trying to recombine an object that has previsously been recombined. Parent " *
190+
error("Internal error. Trying to recombine an object that has previously been recombined. Parent " *
191191
string(parent1) * "'s child index " *
192192
string(clusterseq.history[parent1].child) * ". Parent jet index: " *
193193
string(clusterseq.history[parent1].jetp_index) * ".")
@@ -198,7 +198,7 @@ add_step_to_history!(clusterseq::ClusterSequence, parent1, parent2, jetp_index,
198198

199199
if parent2 >= 1
200200
clusterseq.history[parent2].child == Invalid ||
201-
error("Internal error. Trying to recombine an object that has previsously been recombined. Parent " *
201+
error("Internal error. Trying to recombine an object that has previously been recombined. Parent " *
202202
string(parent2) * "'s child index " *
203203
string(clusterseq.history[parent1].child) * ". Parent jet index: " *
204204
string(clusterseq.history[parent2].jetp_index) * ".")
@@ -363,7 +363,7 @@ Return the number of exclusive jets of a ClusterSequence that are above a certai
363363
364364
# Arguments
365365
- `clusterseq::ClusterSequence`: The `ClusterSequence` object containing the clustering history.
366-
- `dcut::AbstractFloat`: The maximum calue for the distance parameter in the reconstruction.
366+
- `dcut::AbstractFloat`: The maximum value for the distance parameter in the reconstruction.
367367
368368
# Returns
369369
The number of exclusive jets in the `ClusterSequence` object.

src/GenericAlgo.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ these methods are already predefined in the `JetReconstruction` namespace.
3333
The `recombine` argument is the function used to merge pairs of particles. The
3434
default is simply `+(jet1,jet2)`, i.e. 4-momenta addition or the *E*-scheme.
3535
36-
## Consitency of `p`, `algorithm` and `R` arguments
36+
## Consistency of `p`, `algorithm` and `R` arguments
3737
If an algorithm is explicitly specified the `p` value should be consistent with
3838
it or `nothing`. If the algorithm is one where `p` can vary, then it has to be
3939
given, along with the algorithm.``

src/HepMC3.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Particle{T}() where {T} = Particle(LorentzVector{T}(0.0, 0.0, 0.0, 0.0), 0, 0, 0
7171
""" Read a [HepMC3](https://doi.org/10.1016/j.cpc.2020.107310) ascii file.
7272
7373
Each event is passed to the provided function f as a vector of Particles. A
74-
maximum number of events to read (value -1 to read all availble events) and
74+
maximum number of events to read (value -1 to read all available events) and
7575
a number of events to skip at the beginning of the file can be provided.
7676
"""
7777

src/PlainAlgo.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Arguments:
136136
- `j`: Index of the second particle in the last merge step.
137137
- `k`: Index of the current particle for which the nearest neighbour will be
138138
updated.
139-
- `N`: Total number of particles (currently vaild array indexes are `[1:N]`).
139+
- `N`: Total number of particles (currently valid array indexes are `[1:N]`).
140140
- `Nn`: Number of nearest neighbors to consider.
141141
- `kt2_array`: Array of transverse momentum squared values.
142142
- `rapidity_array`: Array of rapidity values.

src/Pseudojet.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const _invalid_rap = -1.e200
2121
mutable struct PseudoJet <: FourMomentum
2222
2323
The `PseudoJet` struct represents a pseudojet, a four-momentum object used in
24-
jet reconstruction algorithms. Additonal information for the link back into the
24+
jet reconstruction algorithms. Additional information for the link back into the
2525
history of the clustering is stored in the `_cluster_hist_index` field. There is
2626
caching of the more expensive calculations for rapidity and azimuthal angle.
2727

src/TiledAlgoLL.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ tiledjet_set_jetinfo!(jet::TiledJet, clusterseq::ClusterSequence, tiling::Tiling
106106
jet.NN_dist = R2
107107
jet.NN = noTiledJet
108108

109-
# Find out which tile it belonds to
109+
# Find out which tile it belongs to
110110
jet.tile_index = tile_index(tiling.setup, jet.eta, jet.phi)
111111

112112
# Insert it into the tile's linked list of jets (at the beginning)
@@ -333,7 +333,7 @@ end
333333
tiled_jet_reconstruct(particles::Vector{T}; p = -1, R = 1.0, recombine = +) where {T}
334334
335335
Main jet reconstruction algorithm entry point for reconstructing jets using the
336-
tiled stragegy for generic jet type T.
336+
tiled strategy for generic jet type T.
337337
338338
**Note** - if a non-standard recombination is used, it must be defined for
339339
JetReconstruction.PseudoJet, as this struct is used internally.
@@ -349,7 +349,7 @@ If both are given they must be consistent or an exception is thrown.
349349
reconstruction. T must support methods px, py, pz and energy (defined in the
350350
JetReconstruction namespace)
351351
- `p::Union{Real, Nothing} = -1`: The power parameter for the jet reconstruction
352-
algorithm, thus swiching between different algorithms.
352+
algorithm, thus switching between different algorithms.
353353
- `algorithm::Union{JetAlgorithm, Nothing} = nothing`: The explicit jet
354354
algorithm to use.
355355
- `R::Float64 = 1.0`: The jet radius parameter for the jet reconstruction
@@ -407,7 +407,7 @@ of data types are done.
407407
- `particles::Vector{PseudoJet}`: A vector of `PseudoJet` particles used as input for jet
408408
reconstruction.
409409
- `p::Int = -1`: The power parameter for the jet reconstruction algorithm, thus
410-
swiching between different algorithms.
410+
switching between different algorithms.
411411
- `R::Float64 = 1.0`: The jet radius parameter for the jet reconstruction
412412
algorithm.
413413
- `recombine::Function = +`: The recombination function used for combining
@@ -473,7 +473,7 @@ function _tiled_jet_reconstruct(particles::Vector{PseudoJet}; p::Real = -1, R =
473473
tiledjet_set_jetinfo!(tiledjets[ijet], clusterseq, tiling, ijet, R2, p)
474474
end
475475

476-
# Now initalise all of the nearest neighbour tiles
476+
# Now initialise all of the nearest neighbour tiles
477477
NNs, dij = set_nearest_neighbours!(clusterseq, tiling, tiledjets)
478478

479479
# Main loop of the reconstruction

0 commit comments

Comments
 (0)