mantidproject / mantid

Main repository for Mantid code
https://www.mantidproject.org
GNU General Public License v3.0
207 stars 121 forks source link

Integrate direct beam generating script into Mantid #28986

Open smk78 opened 4 years ago

smk78 commented 4 years ago

Direct beam files for the ISIS SANS instruments contain the ratio of a detector banks efficiency to that of the monitor on a per pixel basis.

They are currently generated by an iterating Python script devised (and tested on SANS2D) by Richard Heenan/Najet Mahmoudi. Some additional testing will probably be necessary for LOQ, LARMOR & ZOOM.

It would be good to get this script integrated into Mantid, ideally as part of the ISIS SANS GUI in much the same way that there are outstanding tickets for integrating our scripts for generating the tube detector calibration files (cf. https://github.com/mantidproject/mantid/issues/10390, https://github.com/mantidproject/mantid/issues/10892, https://github.com/mantidproject/mantid/issues/27386)

smk78 commented 3 years ago

NB: Richard says this will be much easier than integrating the tube calibration script mentioned above!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you feel this is incorrect please comment to keep it alive, with a reason why.

To prevent closure, e.g. for long-term planning issues, add the "Never Stale" label.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in 6 months. It will be closed in 7 days if no further activity occurs. Allowing issues to close as stale helps us filter out issues which can wait for future development time. All issues closed by stale bot act like normal issues; they can be searched for, commented on or reopened at any point. If you'd like a closed stale issue to be considered, feel free to either re-open the issue directly or contact a developer. To extend the lifetime of an issue please comment below, it helps us see that this is still affecting you and you want it fixed in the near-future. Extending the lifetime of an issue may cause the development team to prioritise it over other issues, which may be closed as stale instead.

stale[bot] commented 2 years ago

This issue has been closed automatically. If this still affects you please re-open this issue with a comment or contact us so we can look into resolving it.

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had activity in 6 months. It will be closed in 7 days if no further activity occurs. Allowing issues to close as stale helps us filter out issues which can wait for future development time. All issues closed by stale bot act like normal issues; they can be searched for, commented on or reopened at any point. If you'd like a closed stale issue to be considered, feel free to either re-open the issue directly or contact a developer. To extend the lifetime of an issue please comment below, it helps us see that this is still affecting you and you want it fixed in the near-future. Extending the lifetime of an issue may cause the development team to prioritise it over other issues, which may be closed as stale instead.

stale[bot] commented 11 months ago

This issue has been closed automatically. If this still affects you please re-open this issue with a comment or contact us so we can look into resolving it.

smk78 commented 3 months ago

Current versions of the scripts (there is presently one for each ISIS SANS instrument!) are kept on the ISIS SANS Group Sharepoint site.

smk78 commented 3 months ago

In getting the script to run for the LOQ main detector I discovered a potential flaw. Which is that it has a tendency to prioritise wavelength overlap over the expected shape of the scattering curve. This may be because it is predicated on only using data from the polymer calibration standards, the scattering from which, whilst moderately intense, falls off in Q relatively quickly. Also, the script uses a fit to these data which is of increasingly dubious applicability at higher Q. I wonder therefore if, when the time comes to look at incorporating this procedure into Mantid in some way, it might be better to do away with fitting process and, instead, use a direct comparison against one or more validation datasets (eg, a carefully-computed polymer scattering, the NIST glassy carbon, and so on) chosen to ensure that the efficiency ratio across the wavelength range does not distort the form of the scattering. With LOQ, I found that even after 20 iterations, whilst the overlap for the RT2 polymer looked quite good (quell surprise maybe because that's what the fit is designed to fit!), NIST GC data corrected with that direct beam file overestimated the scattering at smaller Q (longer wavelengths) and underestimated the scattering at higher Q (shorter wavelengths) and I needed to do some tweaking to recover the correct form of the scattering.