Closed jamesmkrieger closed 5 months ago
This doesn't work completely yet.
When I resize EMD 21457 (open spike) from 1.05 to 1.5 A, I get what I expect now:
** Running command: **
[32m xmipp_image_resize -i Runs/000056_XmippProtCropResizeVolumes/extra/output_volume.mrc --factor 0.700000[0m
Input File: Runs/000056_XmippProtCropResizeVolumes/extra/output_volume.mrc
Output File: Runs/000056_XmippProtCropResizeVolumes/extra/output_volume.mrc_tmp.mrc
[35mFINISHED[0m: resizeStep, step 3, time 2024-01-11 11:56:10.503805
[35mSTARTED[0m: createOutputStep, step 4, time 2024-01-11 11:56:11.931986
** Running command: **
[32m xmipp_image_header -i Runs/000056_XmippProtCropResizeVolumes/extra/output_volume.mrc --sampling_rate 1.500000[0m
Input File: Runs/000056_XmippProtCropResizeVolumes/extra/output_volume.mrc
New sampling rate (Angstrom) = 1.5
However, now I have a problem with the case for not resizing (crop with window operation). It gives 1.00 instead of 1.05:
** Running command: **
[32m xmipp_transform_window -i Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc -o Runs/000108_XmippProtCropResizeVolumes/extra/output_volume.mrc --size 100 [0m
Input File: Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc
Output File: Runs/000108_XmippProtCropResizeVolumes/extra/output_volume.mrc
[35mFINISHED[0m: windowStep, step 2, time 2024-01-11 11:56:24.592078
[35mSTARTED[0m: createOutputStep, step 3, time 2024-01-11 11:56:24.807895
** Running command: **
[32m xmipp_image_header -i Runs/000108_XmippProtCropResizeVolumes/extra/output_volume.mrc --sampling_rate 1.000000[0m
Input File: Runs/000108_XmippProtCropResizeVolumes/extra/output_volume.mrc
New sampling rate (Angstrom) = 1
This is in contrast to the not resizing case without the fix:
** Running command: **
[32m xmipp_transform_window -i Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc -o Runs/000160_XmippProtCropResizeVolumes/extra/output_volume.mrc --size 100 [0m
Input File: Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc
Output File: Runs/000160_XmippProtCropResizeVolumes/extra/output_volume.mrc
[35mFINISHED[0m: windowStep, step 2, time 2024-01-11 11:59:50.463991
[35mSTARTED[0m: createOutputStep, step 3, time 2024-01-11 11:59:51.290592
** Running command: **
[32m xmipp_image_header -i Runs/000160_XmippProtCropResizeVolumes/extra/output_volume.mrc --sampling_rate 1.050000[0m
Input File: Runs/000160_XmippProtCropResizeVolumes/extra/output_volume.mrc
New sampling rate (Angstrom) = 1.05
However, now I have a problem with the case for not resizing (crop with window operation). It gives 1.00 instead of 1.05:
** Running command: ** �[32m xmipp_transform_window -i Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc -o Runs/000108_XmippProtCropResizeVolumes/extra/output_volume.mrc --size 100 �[0m Input File: Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc Output File: Runs/000108_XmippProtCropResizeVolumes/extra/output_volume.mrc �[35mFINISHED�[0m: windowStep, step 2, time 2024-01-11 11:56:24.592078 �[35mSTARTED�[0m: createOutputStep, step 3, time 2024-01-11 11:56:24.807895 ** Running command: ** �[32m xmipp_image_header -i Runs/000108_XmippProtCropResizeVolumes/extra/output_volume.mrc --sampling_rate 1.000000�[0m Input File: Runs/000108_XmippProtCropResizeVolumes/extra/output_volume.mrc New sampling rate (Angstrom) = 1
This is because I have a bad if condition. Now I've changed it and it works as expected:
[32m xmipp_transform_window -i Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc -o Runs/000282_XmippProtCropResizeVolumes/extra/output_volume.mrc --size 100 [0m
Input File: Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc
Output File: Runs/000282_XmippProtCropResizeVolumes/extra/output_volume.mrc
[35mFINISHED[0m: windowStep, step 2, time 2024-01-11 12:06:23.344860
[35mSTARTED[0m: createOutputStep, step 3, time 2024-01-11 12:06:23.575840
** Running command: **
[32m xmipp_image_header -i Runs/000282_XmippProtCropResizeVolumes/extra/output_volume.mrc --sampling_rate 1.050000[0m
Input File: Runs/000282_XmippProtCropResizeVolumes/extra/output_volume.mrc
New sampling rate (Angstrom) = 1.05
I also confirmed that a preprocess job that isn't a crop/resize one (thresholding at 0) behaves as expected too:
** Running command: **
[32m xmipp_transform_threshold -i Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc -o Runs/000212_XmippProtPreprocessVolumes/extra/output_volume.mrc --select abs_below 0.000000 --substitute value 0.000000[0m
Input File: Runs/000002_ProtImportVolumes/extra/emd_21457.map:mrc
Output File: Runs/000212_XmippProtPreprocessVolumes/extra/output_volume.mrc
[35mFINISHED[0m: thresholdStep, step 2, time 2024-01-11 12:08:47.870757
[35mSTARTED[0m: createOutputStep, step 3, time 2024-01-11 12:08:48.168181
** Running command: **
[32m xmipp_image_header -i Runs/000212_XmippProtPreprocessVolumes/extra/output_volume.mrc --sampling_rate 1.050000[0m
Input File: Runs/000212_XmippProtPreprocessVolumes/extra/output_volume.mrc
New sampling rate (Angstrom) = 1.05
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
The behaviour before was that the header would get the input volume sampling rate.
This is the commands that are run when we resize voxels from 1.05 A to 1.5 A (applying a factor of 0.7 with default spline interpolation):