From cd0b60a6e9d1994329eb560a03e7dd88c34ee286 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Sat, 24 Jan 2026 09:02:17 +0100 Subject: [PATCH 1/7] Fix up LaTeX
envs in Source_custom.comp --- mcstas-comps/contrib/Source_custom.comp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mcstas-comps/contrib/Source_custom.comp b/mcstas-comps/contrib/Source_custom.comp index 32d632f3c6..83ac8c8464 100644 --- a/mcstas-comps/contrib/Source_custom.comp +++ b/mcstas-comps/contrib/Source_custom.comp @@ -40,15 +40,25 @@ * Model description: * * The normalised Maxwellian distribution for moderated neutrons is defined by [1] +*
* $M(\lambda)=\frac{2a^2}{T^2\lambda^5}\exp\left(-\frac{a}{T\lambda^{2}}\right)$ +*
* where +*
* $a=\left(\frac{h^2}{2m_{N}k_{B}}\right)$ +*
* and the joining function for the under-moderated neutrons is given by [1] +*
* $M(\lambda)_{um}=\frac{1}{\lambda(1+\exp(\lambda\chi-\kappa))}$ +*
* * The normalised time structure of the long pulse is defined by [2] +*
* $N_{t<=t_p}=1-\exp\left(-\frac{t}{\tau/n}\right)$ +*
+*
* $N_{t>t_p}=\exp\left(-\frac{t-t_p}{\tau}\right)-\exp\left(-\frac{t}{\tau/n}\right)$ +*
* where tp is the pulse period, tau is the pulse decay time constant, and n is the ratio of decay to ascend time constants. * * Parameters for some sources: From 687601bac2e0927e28c89dcaaca8a703551e5873 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Sat, 24 Jan 2026 09:14:23 +0100 Subject: [PATCH 2/7] Add use of
in Capillary.comp header --- mcxtrace-comps/optics/Capillary.comp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mcxtrace-comps/optics/Capillary.comp b/mcxtrace-comps/optics/Capillary.comp index bd51c0de52..d8d853267b 100644 --- a/mcxtrace-comps/optics/Capillary.comp +++ b/mcxtrace-comps/optics/Capillary.comp @@ -18,9 +18,11 @@ * A Capillary tube allowing for reflections along the tube. A material coating can be applied. Multilayer * coatings may be handled by generating a reflectivity file (e.g. by IMD) and setting rtable=1. * Waviness is implemented using the model described in -* Wang et.al., J. Appl. Phys., 1996 -* where the grazing incidence angle $\theta$ is altered as +* Wang et.al., J. Appl. Phys., 1996 where the grazing incidence angle $\theta$ is altered as +*
+*
* $\theta' = \theta + \delta \theta \in [-min(theta,\Delta\theta,\Delta\theta]$ +*
* This ensures that reflected rays will never be scattered into the capillary. * \Delta\theta is the value specified by the parameter waviness. * From a03f81c28010c81e60bf0ff6d66721bbd43511b3 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Sat, 24 Jan 2026 11:16:16 +0100 Subject: [PATCH 3/7] Split conda injection in two tasks, try python 3.13 on Ubuntu --- .github/workflows/mcxtrace-conda-basictest.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mcxtrace-conda-basictest.yml b/.github/workflows/mcxtrace-conda-basictest.yml index 09eda1dae1..e68ba2bcf4 100644 --- a/.github/workflows/mcxtrace-conda-basictest.yml +++ b/.github/workflows/mcxtrace-conda-basictest.yml @@ -18,8 +18,8 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-latest, python: '3.12', mpi: 'openmpi' } - - { os: ubuntu-latest, python: '3.12', mpi: 'mpich' } + - { os: ubuntu-latest, python: '3.13', mpi: 'openmpi' } + - { os: ubuntu-latest, python: '3.13', mpi: 'mpich' } - { os: macos-latest, python: '3.12', mpi: 'openmpi' } - { os: macos-latest, python: '3.12', mpi: 'mpich' } - { os: windows-latest, python: '3.12', mpi: 'msmpi' } @@ -52,10 +52,15 @@ jobs: channels: conda-forge python-version: ${{ matrix.python }} - - name: Setup conda - id: setup-conda + - name: Get conda dependency list + id: conda-deps run: | ./src/devel/bin/mccode-create-conda-yml -m mcxtrace -n mcxtrace -o dependencies.yml + echo DONE + + - name: Update conda + id: update-conda + run: | conda env update --file dependencies.yml echo DONE From 634333ce8eb4bd0d3c05f8b187b34f07118d0447 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Sat, 24 Jan 2026 11:35:47 +0100 Subject: [PATCH 4/7] Attempt remove / create in place of update --- .github/workflows/mcxtrace-conda-basictest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mcxtrace-conda-basictest.yml b/.github/workflows/mcxtrace-conda-basictest.yml index e68ba2bcf4..96dc814abf 100644 --- a/.github/workflows/mcxtrace-conda-basictest.yml +++ b/.github/workflows/mcxtrace-conda-basictest.yml @@ -61,7 +61,8 @@ jobs: - name: Update conda id: update-conda run: | - conda env update --file dependencies.yml + conda env remove -n mcxtrace -y + conda env create --file dependencies.yml -y echo DONE - name: Check versions From cf1b89f1b48b745d6d61441c4a33389d61c96a92 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Sat, 24 Jan 2026 11:42:47 +0100 Subject: [PATCH 5/7] Partial revert --- .github/workflows/mcxtrace-conda-basictest.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mcxtrace-conda-basictest.yml b/.github/workflows/mcxtrace-conda-basictest.yml index 96dc814abf..7d6d746038 100644 --- a/.github/workflows/mcxtrace-conda-basictest.yml +++ b/.github/workflows/mcxtrace-conda-basictest.yml @@ -18,8 +18,8 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-latest, python: '3.13', mpi: 'openmpi' } - - { os: ubuntu-latest, python: '3.13', mpi: 'mpich' } + - { os: ubuntu-latest, python: '3.12', mpi: 'openmpi' } + - { os: ubuntu-latest, python: '3.12', mpi: 'mpich' } - { os: macos-latest, python: '3.12', mpi: 'openmpi' } - { os: macos-latest, python: '3.12', mpi: 'mpich' } - { os: windows-latest, python: '3.12', mpi: 'msmpi' } @@ -56,13 +56,12 @@ jobs: id: conda-deps run: | ./src/devel/bin/mccode-create-conda-yml -m mcxtrace -n mcxtrace -o dependencies.yml - echo DONE + cat dependencies.yml - name: Update conda id: update-conda run: | - conda env remove -n mcxtrace -y - conda env create --file dependencies.yml -y + onda env update --file dependencies.yml -y echo DONE - name: Check versions From dd3a3111fddd87fc24b4e279029c97b75825abed Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Sat, 24 Jan 2026 11:45:52 +0100 Subject: [PATCH 6/7] Fix typo --- .github/workflows/mcxtrace-conda-basictest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mcxtrace-conda-basictest.yml b/.github/workflows/mcxtrace-conda-basictest.yml index 7d6d746038..cb98700737 100644 --- a/.github/workflows/mcxtrace-conda-basictest.yml +++ b/.github/workflows/mcxtrace-conda-basictest.yml @@ -61,7 +61,7 @@ jobs: - name: Update conda id: update-conda run: | - onda env update --file dependencies.yml -y + conda env update --file dependencies.yml -y echo DONE - name: Check versions From 967197439d0627536f166435bd33d8f256c82220 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Sat, 24 Jan 2026 11:55:28 +0100 Subject: [PATCH 7/7] Does mamba make any difference? --- .github/workflows/mcxtrace-conda-basictest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mcxtrace-conda-basictest.yml b/.github/workflows/mcxtrace-conda-basictest.yml index cb98700737..8032b7238b 100644 --- a/.github/workflows/mcxtrace-conda-basictest.yml +++ b/.github/workflows/mcxtrace-conda-basictest.yml @@ -61,8 +61,8 @@ jobs: - name: Update conda id: update-conda run: | - conda env update --file dependencies.yml -y - echo DONE + conda install mamba -y + mamba env update --file dependencies.yml - name: Check versions id: version-checks