cryoem / eman2

A scientific image processing software suite with a focus on CryoEM and CryoET
143 stars 50 forks source link

Not defined variable in e2spt_tempmatch.py #546

Open thorstenwagner opened 1 year ago

thorstenwagner commented 1 year ago

In this line the not defined variable 'sz' is called: https://github.com/cryoem/eman2/blob/master/programs/e2spt_tempmatch.py#L237

This leads to a crash of the program. Can someone point me to a fix?

sludtke42 commented 1 year ago

I'm not sure I entirely follow Muyuan's logic there about sizes. It seems like boxsz should already be set at that point in the program, but based on code further up, it seems like it's computed with 2 rather than nbin. My first inclination would be to remove the boxsize setting code in that part of the program based on what I see, but I'm not positive I follow what his intent is there...


Steven Ludtke, @.***

On Jul 22, 2022, at 3:44 AM, Thorsten Wagner @.***> wrote:

In this line the not defined variable 'sz' is called: https://github.com/cryoem/eman2/blob/master/programs/e2spt_tempmatch.py#L237 https://github.com/cryoem/eman2/blob/master/programs/e2spt_tempmatch.py#L237 This leads to a crash of the program. Can someone point me to a fix?

— Reply to this email directly, view it on GitHub https://github.com/cryoem/eman2/issues/546, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPKF2Q6TPVLBHQBTEFOJ5DVVJNNRANCNFSM54KRR7CQ. You are receiving this because you are subscribed to this thread.

thorstenwagner commented 1 year ago

A workaround is to provide a boxsize, But I don't think it should crash with the default settings.

thorstenwagner commented 1 year ago

I think simply change line 237 to

boxsz=int(ref["ny"]*mbin)

should do the trick?

sludtke42 commented 1 year ago

I think it should be removed as well. The initial version was finished by Michael before the main EMAN2 tomogram pipeline. After the pipeline is built, I just moved the old code into the else part without much testing. I never run into this parts either since I only deal with eman reconstructed tomograms. Overall, box size only changes display in e2boxer and is easily changeable. I don’t think it matter much.

On Jul 22, 2022, at 5:34 AM, Steve Ludtke @.***> wrote:

I'm not sure I entirely follow Muyuan's logic there about sizes. It seems like boxsz should already be set at that point in the program, but based on code further up, it seems like it's computed with 2 rather than nbin. My first inclination would be to remove the boxsize setting code in that part of the program based on what I see, but I'm not positive I follow what his intent is there...


Steven Ludtke, @. @.>

On Jul 22, 2022, at 3:44 AM, Thorsten Wagner @. @.>> wrote:

In this line the not defined variable 'sz' is called: https://github.com/cryoem/eman2/blob/master/programs/e2spt_tempmatch.py#L237 https://github.com/cryoem/eman2/blob/master/programs/e2spt_tempmatch.py#L237 This leads to a crash of the program. Can someone point me to a fix?

— Reply to this email directly, view it on GitHub https://github.com/cryoem/eman2/issues/546, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPKF2Q6TPVLBHQBTEFOJ5DVVJNNRANCNFSM54KRR7CQ. You are receiving this because you are subscribed to this thread.