oasys-kit / ShadowOui

10 stars 8 forks source link

Laue Crystal settings #216

Closed maltissimo closed 4 years ago

maltissimo commented 4 years ago

Ciao Manuel,

I have something interesting for your attention. I am simulating a beamline, that will want to use a Double Laue Mono, on Si 111.

There are 2 separate issues, one should be simple, and the other I believe computational. Let me start with the first. When you plot the X,Z graph on the widget, the X FWHM is not calculated correctly. I think there is a factor of 2 missing somewhere. I am using a BM source, and taking 10 mrad, so at 13 mt from the source, the FWHM should be somewhere in the range of 13 cm. It's double, so there must be a factor of 2 missing somewhere in the calculations. If I PlotXY the same thing, the FWHM is displayed correctly. See attached images and .ows file.

Screen Shot 2020-09-15 at 11 55 35 Screen Shot 2020-09-15 at 11 57 06

The other issue revolves around the mosaicity of the crystal. When using a Si crystal, normally it's pretty much a single crystal, so one expects that, if the incoming beam has 0 divergence, the resulting passing band is the Si intrinsic band, i.e. somewhere around 1.4 10e-4. Well, if I put NO in the Mosaic Crystal section, Shadow does not simulate correctly: intensity is 0, Total good rays = total rays.

If I select YES in the Mosaic crystal option, I am seeing that the calculation is approximately correct if I set "Angle spread FWHM [deg]" around 1.1 10-4. But I have to play with that number, i.e. I have to manually calculate the Energy FWHM, then fiddle with that value until I get a reasonable answer. I would have expected that, if I set the "Angle spread..." to 0, then I would have obtained the correct Energy FWHM, i.e., the Darwin curve.

I hope I was able to explain myself clearly enough. By all means, please fire back questions if need be.

Cheers

Matteo

Laue issues - MA .ows.zip

srio commented 4 years ago

1) For the Laue (non mosaic) you should always use asymmetric. If your crystal is symmetric, the asymmetry angle is 90 deg, but there is a bug for this value, so you must put something close, like 89.999.

With this, and using a monochromatic source, you get the 13cm you expect:

image

The mosaic crystal result do not converge to perfect crystal for mosaicity zero. You should always use values that are much larger than the Darwin width.

Does it make sense?

Updated workspace: Laue issues - MA.zip

maltissimo commented 4 years ago

Thank you for the tips! I still get the 26cm FHWM though, see attached ( I used the .ows file you uploaded).

Screen Shot 2020-09-15 at 12 47 30

Everything else makes sense. Thank you

srio commented 4 years ago

That's very weird. Indeed in the plot, you see the width is ~13 cm (from -60000 um to +60000um). And in the plotxy widget attached is also correct. It looks it is a problem of computing or displaying the FWHM. But it works well in other cases... @lucarebuffi : could you have a look?

jureyherrera commented 4 years ago

Dear all, Regarding the display values of FWHM, that happens sometimes when the number of digits is large (including the decimals), but the number is still there, is just a matter of click on it and scroll left with the keyboard arrow, example:

image

After: image

I hope you find this helpful.

Kind regards, Juan

srio commented 4 years ago

Thanks a lot Juan. Indeed this is our problem which in fact is not a problem. Matteo, of you are satisfied please close the issue!

lucarebuffi commented 4 years ago

Just a reminder: if you use PlotXY you can not only leave the units in mm (useful when numbers are big in um), but you can increase the number of bins, in order to have a more precise calculation of FWHM

maltissimo commented 4 years ago

Thank you for your help, I'm closing the issue.