-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom ruling density definition possible? #180
Comments
You need to change shadow3 kernel libraries and it is not trivial and not immediate. You can't use the coefficients as shadow3 normally does, since they are no more a global property but a local property of the system. You can probably try something by adding a surface error profile, but maybe it not easy to fully reproduce what you need. It is a very nice suggestion, but I don't think it will be implemented soon. |
Hello, The reason is that I do not want to further develop the fortran kernel but slowly moving to python everything. Even though shadow3 has mechanism to do such interpolation from a vector array map (e/g/, for external spline profiles, or something implemented for multilayers), the use is not trivial and the code is extremely difficult as it calls pieces of undocumented libraries. What I suggest is to identify your user case, is the surface plane or other? do you use finite dimensions, etc? and then start creating a python program that can be implemented in a oasys script that accepts the shadow beam from the previous element, and compute intersections and scatter (we can make a template) and then we left to you to implement the scattering part. Then you can use it for your case and we will further use the code for implementing the functionality in oasys. What do you think? Best regards, Manuel |
Sounds nice, maybe sharing the effort it could be done in a short time. |
Hi, |
could you define the parameters of a simple example with a source and only a grating and share the workspace? I can first try to redo the grating with a script. Then we will see how to implement the external grating. |
Thank you.
Everything is implemented except iv). Instead, for this template I apply simple reflection, like a mirror or zeroth order. The routine apply_grating_vls_on_beam must be rewritten, to first reproduce shadow results with the VLS, and second to include the custom ruling density you need. Then it will be easy to couple in Oasys. Does it sound complicated? The code is in the github project: https://github.com/srio/extend_shadow_gratings/ I added you as collaborators, so you can push there. |
no it does not sound complicated. I will look to the code you have pushed already and come back with questions probably. |
I will try to implement the current shadow VLS in the new code. I need some time. I certainly can help in pointing to the old code and identifying the equations used. |
In the definition of a grating, the ruling density can be defined in several manners: costant on xy plane or on mirror surface, fan type, polynomial density, holographic.
To be able to estimate the impact of errors in the production process on the performances, it would be convenient to have the possibility to specify the ruling density as a vector of values: rather than passing a set of parameters (e.g. the polynomial factors), to give a set of numbers (e.g. as a file in a suitable format), that has the same size as the grid defining the distance from the grating pole along the outcoming ray direction. This set of number would define locally the grooving density. In this manner, gratings with arbitrary ruling laws, including discontinuous functions, could be simulated.
How difficult would it be to implement this?
Referring back to my question #172 and the relative answer by Manolo, I would naively assume it is enough to replace the building of the ruling density from the polynomial coefficients RUL_A by some external data input…
thanks!
The text was updated successfully, but these errors were encountered: