Small changes to tiny expression for improved usability#2463
Conversation
…and add documentation in Inhomogenous_incoherent_process.comp
|
Mcviewtest of the inhomogenous process component Mcdoc of the inhomogenous_process component. For some reason the latex seems to not be loading correctly. Did I mess something up, or have you seen this before, @willend ?:
|
|
@Lomholy OK. I think we should soonish have a discussion about “tinyexpr” - which I guess is by now already “something else based on tinyexpr” since there are local edits wrt. upstream https://codeplea.com/tinyexpr. Since upstream is zlib license != GPL3 normal practice is in fact not to “just dump” a modified file in McStas. A more correct approach would be to define/build a “derived package” from a fork of the original project ( could e.g. be the one I have already put in https://github.com/mccode-dev/tinyexpr ) and make a stand-alone package from that to be installed as a dependency. ( Having had another look at what is written upstream he sort of does hint at “just including in your own project” - but I think we could / should do something a little more streamlined that more easily allows updates from upstream developments… :-) ) |
|
@Lomholy I can look at the \TeX later - or you can check that you are wrapping in the correct html tags as shown in https://github.com/mccode-dev/McCode/wiki/mcdoc-component-header under point 8? |
|
@Lomholy wrt. the TeX, something seemingly broke in mcdoc itself. Should not prevent merging here. |
|
TeX fixed, problem with webserver certificate |







Free-form text area
This PR adds a heavyside and gauss function to tinyexpr.c and force tinyexpr to evaluate exponentials from right to left.
This PR then implements a test of the two new functions in the relevant test instrument
Finally documentation of these small additions have been added documentation to Inhomogenous_incoherent_process.comp
This adds the features requested by me in #2461.
Development OS / boundary conditions
MacOS Tahoe 26.4
PR Checklist for contributing to McStas/McXtrace
For a coherent and useful contribution to McStas/McXtrace, please fill in relevant parts of the checklist:
My contribution includes patches to an existing component file
mcdocutility and rendered a reasonable documentation page for the component (please attach as screenshot in comments!)My contribution includes patches to an existing instrument file
mcdocutility and rendered a reasonable documentation page for the instrument (please attach as screenshot in comments!)mctestutility to test the instrument (please attachmcviewtestreport as screenshot in comments)mcrun --c-lint"linter" and followed advice to remove most / all warnings that are raisedMy work touches / adds to the runtime lib code (.c,.h etc in multiple locations