When using Downsample to only crop particles (no binning), I get the attached error if Fourier crop is set to none.
I can get around it by setting the Fourier crop value to the same size as the box I am cropping to, but this shouldn’t be necessary I think (and I hope it isn’t performing some additional operation when I do this - I just want to crop the RBMC generated particles around a local center).
Cheers
Oli
Error:
Traceback (most recent call last):
File "cryosparc_master/cryosparc_compute/run.py", line 95, in cryosparc_master.cryosparc_compute.run.main
File "/home/user/software/cryosparc/cryosparc2_worker/cryosparc_compute/jobs/extract/run.py", line 894, in run_downsample_particles
assert N_out <= N_crop, "Fourier crop size must be smaller than cropping box size"
AssertionError: Fourier crop size must be smaller than cropping box size
I saw the same thing. When entering a Fourier crop value the same as the real space crop it gave me the output I expected so thought nothing of it. I don’t usually downsample particles after extraction so don’t remember how previous CryoSPARC releases did it (I usually Fourier crop during initial extraction, do early processing and re-extract - I rarely decide my box size is too large, usually I decide it’s too small! - and if too small I prefer to re-extract rather than pad out.
Generally I do the same thing - but if I want to refine subparticles after RBMC, just cropping around the local center from the RBMC corrected particle image is convenient
Happy New Year! I’m just replying to clarify that when the Fourier crop parameter is set to the same as the Crop/pad to box size, the effect is to only crop in real-space – this is the workaround mentioned in your original post. We have made a note to correct the behaviour when Fourier crop parameter is not set, so that if just the Crop/pad to box size parameter is set, only real-space cropping will be done.
Just a brief update to let you know that as of CryoSPARC v4.5, the behaviour of downsample particles is such that:
If only the realspace crop size is provided, the particles will be cropped to that size (and not Fourier-cropped)
If only the Fourier-crop size is provided, the particles will be directly downsampled to this box in Fourier space.
If both are provided, realspace cropping will proceed before Fourier-cropping.
This should eliminate the need to specify both box sizes unless the behaviour in 3 is desired.
In addition, we have added a new parameter “Desired approximate pixel size”, which can be specified instead of the Fourier-crop size; this will automatically calculate an appropriate box size such that the final pixel size is as specified.