-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
It looks like ImageSource.downsample might be applying the updated offsets to original src prior to applying downsample. Looks like the downsampled particles have different offsets from the original.
Here is a minimal script to illustrate:
import numpy as np
from aspire.source import Simulation
L = 64
n = 10
offsets = np.random.choice([L//4, -L//4], size=(n, 2))
src = Simulation(L=L, n=n, offsets=offsets)
src2 = src.downsample(L//4)
print(f"src.offsets: {src.offsets}\n")
src.images[:10].show()
print(f"src2.offsets: {src2.offsets}")
src2.images[:10].show()with output:
src.offsets: [[-16. 16.]
[ 16. -16.]
[-16. -16.]
[ 16. 16.]
[ 16. 16.]
[ 16. 16.]
[-16. -16.]
[-16. 16.]
[-16. -16.]
[ 16. 16.]]
src2.offsets: [[-4. 4.]
[ 4. -4.]
[-4. -4.]
[ 4. 4.]
[ 4. 4.]
[ 4. 4.]
[-4. -4.]
[-4. 4.]
[-4. -4.]
[ 4. 4.]]

Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working