-
Notifications
You must be signed in to change notification settings - Fork 6
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
Unrealistic noise level when pixel value is other than 1 Angstrom #47
Comments
Hi Mohamad Sorry for the late reply. For the image with the pixel size of 0.5A can you try rebinning with a function like the following:
That should rebin summing the pixel values. When you have a smaller pixel size it is sometimes more difficult to see features because of the noise but if you bin the data to the same pixel size hopefully the features should be visible. Let me know if this works or not. Best wishes |
Hi James
Thanks for the reply. I can of course bin the data after creating it with
pixel size of 1 A. Generating data with pixel size of 0.5 A is fine, but
for 2 A is not. I have data of the same molecule in vitro that I am trying
to match with simulation, we'll discuss it at later moment, just keep it in
mind.
Cheers
Mohamad
…On Wed, Mar 1, 2023, 9:46 AM James Parkhurst ***@***.***> wrote:
Hi Mohamad
Sorry for the late reply.
For the image with the pixel size of 0.5A can you try rebinning with a
function like the following:
def rebin(data, shape):
shape = (shape[0], data.shape[0] // shape[0],
shape[1], data.shape[1] // shape[1])
return data.reshape(shape).sum(-1).sum(1)
That should rebin summing the pixel values. When you have a smaller pixel
size it is sometimes more difficult to see features because of the noise
but if you bin the data to the same pixel size hopefully the features
should be visible. Let me know if this works or not.
Best wishes
James
—
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK2I5FO5FWG44GXQ5ZKCRO3WZ4EHZANCNFSM6AAAAAAVIQVHP4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi Mohamad Ah, sorry I misunderstood. When simulating with a 2A pixel size, it may also be better to simulate with 1A or 0.5A and then rebin to the desired size. This is because the potential is only evaluated once per pixel so you get a better representation of the potential by oversampling and then rebinning to the desired output size. I have been meaning to add an option to make this more streamlined so that it is done during exit wave calculation and rebinning happens automatically but at the moment you have to do an extra export step at the end. Best wishes |
Thanks James, its clear now! I will be using pixel size of 1 A until what you planned is done. |
Hi Mohamad I've been considering learning how to use the towncrier (https://towncrier.readthedocs.io) utility for the purpose of creating more useful changelogs. For future updates I will try and make it clearer what has changed! Best wishes |
Hi Mohamad Just to let you know that I have started a file (https://github.com/rosalindfranklininstitute/parakeet/blob/master/CHANGES.rst) which can also be accessed from the README page to which I will add user friendly descriptions of changes in future. Best wishes |
Hi James Cheers |
This may be related to an issue I've been having which is that with pixel sizes larger than 1A, the ice model isn't generated. E.g.,
|
Hi @Nordicus I have had a look and there was a bug with a for loop going out of range in C++ which I have fixed. Hopefully this should allow the ice model for pixel sizes > 2A Best wishes James |
Hi James,
I noticed when setting the detector pixel size to 2 that the level of noise is too high. The image on the left is when the pixel size is 1 A, and on the right when it is 0.5 A (with half the detector size, so the two images should correspond to each other).
Cheers
Mohamad
The text was updated successfully, but these errors were encountered: