Closed Phaips closed 4 months ago
Hi @Phaips, glad to see you are trying the new version and thanks for the bug report!
I notice that I did not specify the type of the argument, i.e. that it should be interpreted as an integer. It should be a very easy bug fix, but we should add a unit test for it to prevent something like this in the future.
Without explicitly setting a seed, a random seed will be generated based on system time and this one is correctly set as integer. So without supplying a seed, I suspect it works fine. The seed is always annotated in the job file, so once this is fixed you should be able to reproduce your results.
Cheers!
It has been fixed with version 0.7.1 👍
Hi, I am trying out the new version release with the phase randomization. I am running this command:
pytom_match_template.py -t tmpl.mrc --mask mask.mrc -v tomos/bin4_novactf/115.rec -d /scicore/home/engel0006/GROUP/pool-engel/Philippe/rbcPipeline/pytom/current/PyTOM/115/ -a temp/115.tlt --particle-diameter 70.0 -g 0 1 2 3 --voxel-size-angstrom 7.84 --non-spherical-mask --tomogram-ctf-model phase-flip --random-phase-correction --rng-seed 42 --per-tilt-weighting --amplitude-contrast 0.07 --dose-accumulation temp/115_exposure.txt --defocus temp/115_defocus.txt --voltage 300.0 --spherical-aberration 2.7
and it seems something is wrong with the
--random-phase-correction --rng-seed 42
because it runs fine when I leave out the two flags. Maybe I am parsing this wrong since the type error is between a str and a float (42.0 doesn't fix it). Thanks for the help!the error: Traceback (most recent call last): File "/scicore/projects/scicore-p-structsoft/ubuntu/software/Miniconda3/miniconda3_python3.12.1/envs/pytom-tm-ub/bin/pytom_match_template.py", line 8, in
sys.exit(match_template())
^^^^^^^^^^^^^^^^
File "/scicore/projects/scicore-p-structsoft/ubuntu/software/Miniconda3/miniconda3_python3.12.1/envs/pytom-tm-ub/lib/python3.12/site-packages/pytom_tm/entry_points.py", line 813, in match_template
args = parser.parse_args(argv)
^^^^^^^^^^^^^^^^^^^^^^^
File "/scicore/projects/scicore-p-structsoft/ubuntu/software/Miniconda3/miniconda3_python3.12.1/envs/pytom-tm-ub/lib/python3.12/argparse.py", line 1891, in parse_args
args, argv = self.parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scicore/projects/scicore-p-structsoft/ubuntu/software/Miniconda3/miniconda3_python3.12.1/envs/pytom-tm-ub/lib/python3.12/argparse.py", line 1924, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scicore/projects/scicore-p-structsoft/ubuntu/software/Miniconda3/miniconda3_python3.12.1/envs/pytom-tm-ub/lib/python3.12/argparse.py", line 2136, in _parse_known_args
start_index = consume_optional(start_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scicore/projects/scicore-p-structsoft/ubuntu/software/Miniconda3/miniconda3_python3.12.1/envs/pytom-tm-ub/lib/python3.12/argparse.py", line 2076, in consume_optional
take_action(action, args, option_string)
File "/scicore/projects/scicore-p-structsoft/ubuntu/software/Miniconda3/miniconda3_python3.12.1/envs/pytom-tm-ub/lib/python3.12/argparse.py", line 2000, in take_action
action(self, namespace, argument_values, option_string)
File "/scicore/projects/scicore-p-structsoft/ubuntu/software/Miniconda3/miniconda3_python3.12.1/envs/pytom-tm-ub/lib/python3.12/site-packages/pytom_tm/io.py", line 75, in call
if values <= 0.0:
^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'str' and 'float'