Open chapmancw opened 2 years ago
Thanks @chapmancw for the request, I think I can cook up something. I'll ask some more pointed follow-up questions later, but for now a few initial thoughts:
I am adding @marquezj and @dddijulio as well, since in the past they also had a similar request. Guys, can you also review the request from @chapmancw discussed here, and provide any feedback. Then I can hopefully figure out what is needed to make everyone happy all in one go :-)
Hi @chapmancw: are there features of the S(Q,w) map not being represented by the grid? Otherwise, you can just interpolate the output of NCrystal to whatever grid you need.
@chapmancw , just a quick note concerning your reply to item 1: vdoslus=5 implies Emax=12eV by default, which certainly "wastes" points in the 1eV..12eV region. But you can already now easily override this to e.g. Emax=1eV, and thus get all of your grid points in this lower energy region. Just add the line egrid 1.0
inside the relevant @DYNINFO section of your NCMAT file (see https://github.com/mctools/ncrystal/wiki/NCMAT-format). That will btw. automatically reduce the number of orders needed so it should also speed up initialisation. And don't worry, only orders not contributing to scattering of a 1eV neutron will be left out (NCrystal knows what part of the kernel is populated by which expansion order, so will decide the required maximum order exactly based on Emax).
Hi Thomas, tanks for implementing this in v3.1.0 release. Where can we find some instructions on how to actually use the new feature? ;)
Thanks for implementing this!
Hi Kemal,
What?? :smiley: I didn't implement anything, as I was waiting to hear your response to the comments from me and @marquezj concerning possible workarounds (also, I had other work on my plate).
Cheers, Thomas
:D Did i read this wrong?
"Add internal utilities for evaluating S(alpha,beta) kernels at any (alpha,beta) point, and add utilities for what is essentially exact sampling or integration for cross sections. These utilities are useful as they allow us to validate scattering kernel models better, and are used directly in the new UCN-production models."
I think you did partially, but it is certainly related. That note talks about a C++-only helper class, which is not exposed to python. And it only deals with interpolating in an existing kernel, not adding points before constructing the kernel.
But of course, it all depends what exactly you guys need :-)
Is your feature request related to a problem? Please describe. When generating an S(alpha,beta) object using the loadKernel(vdoslux=5) command, an automated alpha,beta grid is generated. For the application I am interested in, this grid has an insufficient density of alpha,beta points.
Describe the solution you'd like I would like to be able to manually define the alpha,beta grid points to calculate the S(alpha,beta) object on. It could either be added onto the pre-defined grid or replace it all together. If possible, it would be preferable if this could be made accessible in the Python API.
Describe alternatives you've considered I am unfortunately not familiar enough with NCrystal to know of any other potential work arounds for this problem. We have previously used the LEAPR module of NJOY to generate an S(alpha,beta) object on a given alpha,beta grid, but NCrystal has additional functionalities not currently implemented in NJOY that we would like to use.