[mcxtrace-users] improved perfect crystal model
Erik B Knudsen
erkn at fysik.dtu.dk
Thu Oct 15 18:39:22 CEST 2015
Dear Marcus,
Again excellent news! I look forward to testing your components thoroughly.
On 15/10/15 14:38, Mendenhall, Marcus wrote:
> Erik:
>
> I now have a working doubly-bent crystal model, too, capable of creating
> a Johannson optic. I also have updated the Source_lab.comp into
> Source_lab_lorentzian.comp. The original Source_lab, although
> documented to produce Lorentzian lines, actually produces Gaussians, if
> one looks at the code. The Source_Lab_Lorentzian produces reasonable
> facsimilies of the spectra of some commonly-used anode materials.
Acknowledged, the lines were indeed coded to be Gaussian, which was not
quite what they should be.
>
> I have slightly updated the NIST_Perfect_crystal I provided before, so
> that I think it handles non-zero alpha angles (angle between crystal
> surface and lattice planes).
Good!
>
> I would like to start writing documentation for these. What format do
> you want text for your manual? (LaTeX would be my preferred format).
LateX for sure. We may be moving to XeTeX or XeLaTeX sometime soon, but
we can easily deal with whatever (minor) modifications are necessary
with respect to that.
>
> I am attaching an updated NIST_Perfect_crystal.comp,
> Source_Lab_Lorentzian.comp, and the new NIST_bent_crystal.comp, along
> with an instrument which uses these. The comments and math in the
> sample instrument show how to compute the correct curvatures for an
> asymmetric (different source and focal distance) Johannson optic for a
> given material and center wavelength. I am also attaching a PDF of the
> geometries of the two crystal types, just as a start on documentation
Excellent - thank you very much.
>
> Finally, I am attaching a modified version of PSD_Monitor.comp. The
> monitor, as provided in the distribution, results in invalid output if
> you make it a 1-dimensional monitor. This is because in the function
> which finalizes the output from a general n-dimensional detector in
> mcdetector_import() in mccode_r.c, the downconversion of the rank of the
> detector preserves the variables as X & Y (correct for a 2 detector),
> instead of converting them to X and (I, Ierr) which is correct for the
> 1D case. This probably should ultimately be fixed at this level, but
> for now the new PSD_Monitor checks to see if it is really 1D, and
> directly calls the appropriate output function.
>
> All of these should, of course, be considered very beta code for now,
> although I have tried to validate both crystals fairly thoroughly.
Beta or not - Let's berge ahead with some testing, and we might make it
into the next release perhaps. This is really cool!
>
> Marcus Mendenhall
>
> Materials Measurement Science Division
> National Institute of Standards and Technology
> 100 Bureau Dr. stop 8370 (217/B115)
> Gaithersburg MD 20899 USA
> phone: +1(301) 975-8631
Happy simulating!
Erik
--
Erik Bergbäck Knudsen, Research Engineer | DTU | morituri
NEXMAP, DTU Fysik, DK-2800 Kgs. Lyngby, Denmark |<>-<>| te
phone: (+45) 2132 6655 |<>-<>| salutant
More information about the mcxtrace-users
mailing list