Assigning module centers for 5 modules
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 249
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
> I'm having trouble generating the projection geometry using leapct.set_modularbeam() for m=5 modules positioned roughly in the same orientation as the cartoon model for this toolbox, e.g.

I can't tell from the demo file (d04_modularbeam.py, relevant section copied below) how to arrange the mth dimension of moduleCenters, colVectors and rowVectors for the number of modules, as the demo only seems to have a single detector?
If I have a single source, does the sourcePositions array remain as the default here or do I need to tile it m-times?
Can you provide a quick example of how to set up a modular geometry similar to the figure above?
I also cannot seem to set_normalizedHelicalPitch with the modularbeam geometry - is helical scanning compatible with modular geometries?
numCols = 512
numAngles = 2*2*int(360*numCols/1024)
pixelSize = 0.65*512/numCols
numRows = numCols
sod = 1100.0
sdd = 1400.0
sourcePositions = np.ascontiguousarray(np.zeros((numAngles,3)).astype(np.float32), dtype=np.float32)
moduleCenters = np.ascontiguousarray(np.zeros((numAngles,3)).astype(np.float32), dtype=np.float32)
colVectors = np.ascontiguousarray(np.zeros((numAngles,3)).astype(np.float32), dtype=np.float32)
rowVectors = np.ascontiguousarray(np.zeros((numAngles,3)).astype(np.float32), dtype=np.float32)
T_phi = 2.0*np.pi/float(numAngles)
for n in range(numAngles):
phi = n*T_phi-0.5*np.pi
sourcePositions[n,0] = sod*np.cos(phi)
sourcePositions[n,1] = sod*np.sin(phi)
moduleCenters[n,0] = (sod-sdd)*np.cos(phi)
moduleCenters[n,1] = (sod-sdd)*np.sin(phi)
rowVectors[n,2] = 1.0
colVectors[n,0] = -np.sin(phi)
colVectors[n,1] = np.cos(phi)
leapct.set_modularbeam(numAngles, numRows, numCols, pixelSize, pixelSize, sourcePositions, moduleCenters, rowVectors, colVectors)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with d04_modularbeam.py and the set_modularbeam call shown in the issue, then inspect the API documentation or implementation for the expected moduleCenters, colVectors, rowVectors, and sourcePositions shapes. Document a five-module example and clarify whether a single source is repeated, whether set_normalizedHelicalPitch supports modular geometry, and what successful setup looks like.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100