Description
This might be something to take up with the FastJet authors themselves, but anytime that fastjet.ClusterSequence
is called the FastJet banner gets printed to stdout.
For fastjet
v3.4.0.5
import awkward as ak
import fastjet
jetdef = fastjet.JetDefinition(fastjet.kt_algorithm, 0.6)
array = ak.Array(
[
{"px": 1.2, "py": 3.2, "pz": 5.4, "E": 2.5, "ex": 0.78},
{"px": 32.2, "py": 64.21, "pz": 543.34, "E": 24.12, "ex": 0.35},
{"px": 32.45, "py": 63.21, "pz": 543.14, "E": 24.56, "ex": 0.0},
],
)
cluster = fastjet.ClusterSequence(array, jetdef) # Banner print is here
inclusive_jets = cluster.inclusive_jets()
print(inclusive_jets)
produces
#--------------------------------------------------------------------------
# FastJet release 3.4.0
# M. Cacciari, G.P. Salam and G. Soyez
# A software package for jet finding and analysis at colliders
# http://fastjet.fr
#
# Please cite EPJC72(2012)1896 [arXiv:1111.6097] if you use this package
# for scientific work and optionally PLB641(2006)57 [hep-ph/0512210].
#
# FastJet is provided without warranty under the GNU GPL v2 or higher.
# It uses T. Chan's closest pair algorithm, S. Fortune's Voronoi code,
# CGAL and 3rd party plugin jet algorithms. See COPYING file for details.
#--------------------------------------------------------------------------
[{px: 64.7, py: 127, pz: 1.09e+03, E: 48.7}, {px: 1.2, py: 3.2, ...}]
To have additional output beyond what was asked for is pretty annoying. While the removal is ultimately something to discuss with the FastJet authors the banner isn't something that is required in the license to produce at runtime, so can it be caught and suppressed until it can be removed altogether?
edit: Well, depending on how you interpret "modified program" in
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)