Local Refine Error: local variable 'map_r'

Hey Team,

I have been having this error when I am running the Local Refinement Job with some maps: UnboundLocalError: local variable ‘map_r’ referenced before assignment

I cannot pinpoint which maps cause this issue, but it occurs in Cryosparc v5.0.6
It happens even when I “clone” jobs in old project folders.

Update:
This occurs when “Re-Estimate Gray Scale of Input structure” is selected.

Please can you post the full traceback?

Does this mean that you did not observe the error when this option was disabled?

Yes, basically when I enable this option, I get this error.

Here’s the traceback:
Progress: [▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇] 56/56 (100%)
Transferred: subtracted_particles_B_9.mrcs (76.29 MiB)
Threads: 2
Avg speed: 490.65 MiB/s
Remaining: 0h 00m 00s (0.00 B)
Elapsed: 0h 00m 08s
Active jobs: P1-J444, P1-J443
SSD cache complete for 56 file(s)
──────────────────────────────────────────────────────────────

CPU: 563.9 MB

Done.

CPU: 563.9 MB

Windowing particles

CPU: 564.5 MB

Done.

CPU: 564.5 MB

====== Box sizes ======

CPU: 564.5 MB

Input particles have box size 200

CPU: 564.6 MB

Input particles have pixel size 3.4264

CPU: 564.6 MB

Particles will be zeropadded/truncated to size 200 during alignment

CPU: 564.6 MB

Volume refinement will be done with effective box size 200

CPU: 564.6 MB

Volume refinement will be done with pixel size 3.4264

CPU: 564.6 MB

Particles will be zeropadded/truncated to size 200 during backprojection

CPU: 564.6 MB

Particles will be backprojected with box size 200

CPU: 564.7 MB

Volume will be internally cropped and stored with box size 200

CPU: 564.7 MB

Volume will be interpolated with box size 200 (zeropadding factor 1.00)

CPU: 564.7 MB

====== Masking ======

CPU: 747.9 MB

A mask input was connected.

CPU: 747.9 MB

Resampling initial mask to specified volume representation size and pixel-size..

CPU: 778.5 MB

Static masking was enabled.

CPU: 778.5 MB

====== Local Refinement ======

CPU: 778.9 MB

Searching over rotation extent of 5.00 degrees.

CPU: 778.9 MB

Searching over shift extent of 5.00 Angstroms.

CPU: 778.9 MB

Using a rotation prior with stdev of 15.00 degrees.

CPU: 778.9 MB

Using a shift prior with stdev of 7.00 Angstroms.

CPU: 778.9 MB

Re-centering poses each iteration.

CPU: 778.9 MB

Re-centering shifts each iteration.

CPU: 778.9 MB

Running 7 branch and bound iterations to align particles to 0.020 degrees

CPU: 779.1 MB

====== Non-Uniform Refinement ======

CPU: 779.1 MB

Non-Uniform Refinement is enabled.

CPU: 779.1 MB

Using AWF of 3.00.

CPU: 779.1 MB

Using butterworth filter with order 2.

CPU: 779.1 MB

====== Gold Standard Split ======

CPU: 779.1 MB

Particles have input alignments3D connected, so reusing pre-existing split

CPU: 779.1 MB

Set A is smaller than set B by 125 particles (0.46 percent difference relative to the total dataset).

CPU: 779.1 MB

Split A has 13515 particles

CPU: 779.1 MB

Split B has 13640 particles

CPU: 779.1 MB

====== Refinement ======

CPU: 779.1 MB

DC components of images will be ignored and volume will be floated at each iteration.

CPU: 779.1 MB

Spherical windowing of maps is enabled

CPU: 833.9 MB

Refining with T symmetry enforced

CPU: 833.9 MB

Resetting input per-particle scale factors to 1.0

CPU: 834.0 MB

Starting at initial resolution 12.000A (radwn 57.107).

CPU: 834.2 MB

Initializing noise model… (1/2)

CPU: 1.03 GB
Done in 3.876s.

Noise Model Initialization (1/2)

[png][pdf]

J444_noise_model_initialization_12.png

CPU: 1.04 GB

====== Initial Model ======

Input Mask Real Space Slices

[png][pdf]

J444_input_mask_real_space_slices.png

CPU: 1.04 GB

Resampling initial model to specified volume representation size and pixel-size…

CPU: 1.08 GB

Estimating scale of initial reference.

CPU: 1.20 GB

Rescaling initial reference by a factor of 1.157

CPU: 942.0 MB

Traceback (most recent call last):
File “cli/run.py”, line 106, in cli.run.run_job
File “cli/run.py”, line 211, in cli.run.run_job_function
File “compute/jobs/local_refine/run_localrefine.py”, line 606, in compute.jobs.local_refine.run_localrefine.run_local_refine
UnboundLocalError: local variable ‘map_r’ referenced before assignment

Thanks @stavros for your report and the additional details. This is a bug; we made a note about it internally.

1 Like