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

2D Classification PCA failing #955

Open
Ratolon opened this issue Dec 3, 2024 · 1 comment
Open

2D Classification PCA failing #955

Ratolon opened this issue Dec 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Ratolon
Copy link
Collaborator

Ratolon commented Dec 3, 2024

I have the following set of data:

  • 2.3M particles extracted with Xmipp
  • 4A/px 74x74px
  • 2D PCA "create_classes", 150 classes, max resolution 8.0 and 40k particles for training

I get the following error in step pcaTraining:

00001: Traceback (most recent call last):
00002: File "/home/miceta/software/scipion/software/em/xmipp/bin/xmipp_classify_pca_train", line 94, in
00003: freq_band = precalculateBands(nBand, dim, sampling, maxRes, minRes)
00004: File "/home/miceta/software/scipion/software/em/xmipp/bin/xmipp_classify_pca_train", line 39, in precalculateBands
00005: freq_band[y][x] = torch.floor(w*factor)
00006: IndexError: index 37 is out of bounds for dimension 0 with size 37
00007: Traceback (most recent call last):
00008: File "/home/miceta/software/miniforge3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/protocol/protocol.py", line 207, in run
00009: self._run()
00010: File "/home/miceta/software/miniforge3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/protocol/protocol.py", line 257, in _run
00011: resultFiles = self._runFunc()
00012: File "/home/miceta/software/miniforge3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/protocol/protocol.py", line 253, in _runFunc
00013: return self._func(*self._args)
00014: File "/home/miceta/software/xmipp/src/scipion-em-xmipp/xmipp3/protocols/protocol_classify_pca.py", line 236, in pcaTraining
00015: self.runJob("xmipp_classify_pca_train", args, numberOfMpi=1, env=env)
00016: File "/home/miceta/software/miniforge3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/protocol/protocol.py", line 1545, in runJob
00017: self._stepsExecutor.runJob(self._log, program, arguments, **kwargs)
00018: File "/home/miceta/software/miniforge3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/protocol/executor.py", line 68, in runJob
00019: process.runJob(log, programName, params,
00020: File "/home/miceta/software/miniforge3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/utils/process.py", line 56, in runJob
00021: return runCommand(command, env=env, cwd=cwd, executable=executable)
00022: File "/home/miceta/software/miniforge3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/utils/process.py", line 71, in runCommand
00023: check_call(command, shell=True, stdout=sys.stdout, stderr=sys.stderr,
00024: File "/home/miceta/software/miniforge3/envs/scipion3/lib/python3.8/subprocess.py", line 364, in check_call
00025: raise CalledProcessError(retcode, cmd)
00026: subprocess.CalledProcessError: Command ' xmipp_classify_pca_train -i Runs/006886_XmippProtClassifyPca/tmp/images.mrc -s 4.0 -hr 8.0 -lr 530 -p 0.75 -t 40000 -o Runs/006886_XmippProtClassifyPca/extra/train_pca --batchPCA' returned non-zero exit status 1.
00027: Protocol failed: Command ' xmipp_classify_pca_train -i Runs/006886_XmippProtClassifyPca/tmp/images.mrc -s 4.0 -hr 8.0 -lr 530 -p 0.75 -t 40000 -o Runs/006886_XmippProtClassifyPca/extra/train_pca --batchPCA' returned non-zero exit status 1.

@Ratolon Ratolon added the bug Something isn't working label Dec 3, 2024
@Ratolon
Copy link
Collaborator Author

Ratolon commented Dec 3, 2024

The problem is related to the sampling rate and the maximum resolution in the protocol form. For instance, 4A/px makes it fail if max resolution is equal or less than Nyquist.

Lo dejamos para el hunting o para ponerlo antes de la release. Thank you very much Erney!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants