Closed cschwan closed 1 year ago
Indeed, this is what I was thinking about. However, at the moment for a grid I obtain:
❯ pineappl obl --orders LHCB_DY_13TEV_DIELECTRON.pineappl.lz4
o order
-+----------------
0 O(a^2)
1 O(a^3)
2 O(a^3 lr^1)
3 O(a^3 lf^1)
4 O(as^1 a^2)
5 O(as^1 a^2 lr^1)
6 O(as^1 a^2 lf^1)
while for an FkTable I get:
❯ pineappl obl --orders LHCB_DY_13TEV_DIELECTRON.pineappl.lz4
o order
-+-----
0 O()
It is true that for grids the output can be quite different, but FkTables are always giving that output, and no actual grid will have no dependency on $\alpha$ / $\alpha_s$. So it is a clear signature.
However, a dedicated command might be more user friendly, since in the structure is even more unambiguously written (it is an FkTable
instance wrapping a Grid
).
However, a dedicated command might be more user friendly, [..].
That's the idea!
It is true that for grids the output can be quite different, but FkTables are always giving that output, and no actual grid will have no dependency on α / αs. So it is a clear signature.
That's unfortunately not true, if you convert a DY LO APPLgrid, for instance, without explicitly giving the coupling order it will look like an FK table by that definition (but it is not).
Candidates:
fkcheck
printing true
or false
and giving 0 error code for true, !=0 for false
isfk
/isfktable
, or fk
/fktable
(ambiguous)kind
, printing grid
or fktable
However, given that for the external user an FkTable has to look like a PineAPPL grid, we can also promote the extension .fk.pineappl.lz4
, in the same spirit of .pineappl.lz4
:
As far as it concerns PineAPPL you can name the FK tables (every grid in fact) as you like!
As far as it concerns PineAPPL you can name the FK tables (every grid in fact) as you like!
Also PineAPPL grids you can name as you wish, but you have been successful in promoting the .pineappl.lz4
. It is also nice to have them clearly recognizable from the file name, even though it is a disjoint thing from the checking command (since a name is directly there, but can lie)
A first implementation of this is now available with commit f7e3994dcc2835e591845563c456086ec924ae02. Let me know if/how the output can be improved (I'm sure it can).
I would rather exit with an error if it's false. Is not this the standard convention for Bash?
I thought about that and I'd prefer that approach, but I see at least two problems:
ExitCode
, which is only available since Rust 1.61.0 (larger than our current MSRV)I know it might not be elegant, but what about a simple exit
?
I believe we don't need any destructor for this command. We are always in time to improve when we'll drop support for older versions of Rust.
Commits 3c8892db5d556080513b3e1f0fd430115e29e917 and 9ff6440e7d9803c6a41c99af1a12b3216bf6c873 add support for exit codes. You can now use
pineappl obl --fktable <grid> >/dev/null && echo "This is an FK table"
Right now it's not possible to figure out if a grid is also an FK table.