jhuijts / numerical_monochromatization

Contains a number of Python scripts for the numerical monochromatization of broadband diffraction patterns.
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

How to use build_C? #1

Open jwhite510 opened 4 years ago

jwhite510 commented 4 years ago

Hello, I am trying to use your code to generate the matrix C based on a spectrum, so that I can invert this matrix and use it to monochromatize a diffraction pattern. In the repository, I see only a collection of functions with no runnable code. from reading through the functions, my best guess is the function I should be using is titled "build_C" in monochromatization_of_diffraction_pattern.py which calls the function called "parloop". I see that build_C takes arguments titled 'S' and 'a', along with Npixels, but I dont see any documentation explaining what these variables are supposed to be. I would expect this function to take something like an array of spacial frequencies, a distance and a wavelength, along with a measured spectrum? Can you explain what "s" and "a" are and what format they should be in to use this function? or better yet some example code of running this function? thank you

jhuijts commented 4 years ago

Hi Jonathon, Sorry I didn't reply to you earlier! Github didn't notify me of any message (or I missed it), and I don't spend so much time on here. Thank you for your interest in my work! As you've seen, I added an example notebook to explain how to use the code, and I cleaned up the code a bit here and there. I also included a reference to my PhD thesis and an article. Can you tell me what you are working on?

Best, Julius

jwhite510 commented 4 years ago

Thank you for the response Julius I see the python notebook you uploaded, looks very helpful. I'm now working applying machine learning to coherent diffractive imaging.