docbrown1955 / marty-public

Calculation of tree-level and one-loop Feynman diagrams Beyond the Standard Model
https://marty.in2p3.fr
GNU General Public License v3.0
17 stars 4 forks source link

Possibility to view simplified readable output #60

Open amanmdesai opened 1 year ago

amanmdesai commented 1 year ago

Hello,

This is regarding the output of MARTY after computing the amplitudes.

In the final result, there are abbreviations (implemented automatically by Marty). While this maybe useful when viewing results on terminal, it would be useful to know if there exists is a way to export the output to a latex with all the abbreviations substituted back into the final result (just the way it is in LanHEP).

Thanks, Aman

docbrown1955 commented 1 year ago

Hello Aman, There is no built-in way to generate a LaTeX expression for now, although I am thinking to make it happen soon.

To expand abbreviations in a csl::Expr object, it is enough to call the following function:

    csl::Evaluate(expr, csl::eval::abbreviation);

Also, from a mty::Amplitude object it is possible to get the list of expressions (one for each diagram) using:

    std::vector<csl::Expr> diagramExpressions = amplitude.obtainExpression();

Combining these two techniques you should be able to at least get the expanded output for all diagrams, even thoug it will not be directly a LaTeX expression.

amanmdesai commented 1 year ago

Hello @docbrown1955

Thanks for your reply and suggestion. This should be helpful.

docbrown1955 commented 1 year ago

See the related PR to support nice latex output ;) https://github.com/docbrown1955/marty-public/pull/62

amanmdesai commented 1 year ago

Thanks very much @docbrown1955