Skip to content
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

Reducing the number of discs within the 4D output files #6

Closed
pc494 opened this issue Nov 8, 2017 · 3 comments
Closed

Reducing the number of discs within the 4D output files #6

pc494 opened this issue Nov 8, 2017 · 3 comments

Comments

@pc494
Copy link

pc494 commented Nov 8, 2017

Possibly related to #2

I'm keen to reduce the number of discs produced within the simulation (rather than just cropping images) - physically something like a meta parameter for "Camera Length" or "Max Scattering Angle".

Can this be done at present?

Below is an example image and reproducible code to illustrate what I mean.

image

PP_input .TXT
MWE example of the code:

import pyprismatic as pr
import numpy as np
from matplotlib import pyplot as plt

meta = pr.Metadata(filenameAtoms="PP_input.XYZ")
meta.save4DOutput = True
meta.save3DOutput = False
meta.scanWindowXMin = 0.495
meta.scanWindowXMax = 0.50
meta.scanWindowYMin = 0.495
meta.scanWindowYMax = 0.50
meta.alphaBeamMax = 0.024/3
meta.probeSemiangle = 0.02/5
meta.tileX=15*3
meta.tileY=15*3
meta.tileZ=105

meta.go()

output = pr.fileio.readMRC('output_X0_Y0_FP1.mrc')
output = output.reshape([output.shape[1],output.shape[2]])
output = np.fft.fftshift(output)
plt.figure()
plt.imshow(np.power(output,0.25),cmap='viridis')
plt.draw()
plt.savefig('image.png')
@apryor6
Copy link
Collaborator

apryor6 commented Nov 8, 2017

This cannot be done at present, but should be straightforward to implement.

@cophus
Copy link
Collaborator

cophus commented Dec 5, 2017

pc494,

One suggestion is that you could try is increasing the "pixel size" in both X and Y. The maximum outer scattering angle is set by this parameter. For example, using the default voltage of 80 keV and the default pixel size of 0.1 Angstroms, the max scattering angle is 104.4 millirads. By changing the pixel size to 0.2 Angstroms, this value will change to 52.2 millirads (half).

Also your simulation cell is thick enough to produce scattering to fairly high index disks. Your input file looks strange to me:

2.83   2.83   2.83

31 0.0000 0.0000 0.0000 1.000 0.000
31 0.0000 2.8250 2.8250 1.000 0.000
31 2.8250 0.0000 2.8250 1.000 0.000
31 2.8250 2.8250 0.0000 1.000 0.000
33 2.8250 2.8250 2.8250 1.000 0.000
33 2.8250 0.0000 0.0000 1.000 0.000
33 0.0000 2.8250 0.0000 1.000 0.000
33 0.0000 0.0000 2.8250 1.000 0.000

The 5th row atom is at (2.825, 2.825, 2.825), while the 1st row atom is at (0,0,0), while the 2nd row is at (0,2.825,2.825), etc. All eight atoms are practically on top of each other for cell dimensions of 2.83 A, due to periodicity. Did you mean for the cell dimensions to be larger?

ericpre pushed a commit to ericpre/prismatic that referenced this issue Jun 18, 2020
@lerandc
Copy link
Collaborator

lerandc commented Jun 16, 2021

Possible now with 4D Cropping options

@lerandc lerandc closed this as completed Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants