Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

AttributeError: 'NoneType' object has no attribute 'copy'

938 views
Skip to first unread message

Andrew Kehr

unread,
Apr 21, 2017, 1:57:21 PM4/21/17
to emspring
Hello Carsten,

I'm running Emspring-0.84.1470, EMAN 2.1 alpha2 (CVS 2013/08/07 17:01:09), Centos 6.6

I'm having an issue as I work through the tutorial while running the first script MICEXAM, about 10% of the way through looking at the power spectrum from one image I get an AttributeError.  Here is the traceback:

Traceback (most recent call last):

File "/usr/programs/spring_v0-84-1470/bin/micexam_mpi", line 152, in <module>

sys.exit(spring.micprgs.micexam_mpi.main())

File "/usr/programs/spring_v0-84-1470/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/micprgs/micexam_mpi.py", line 25, in main

micrograph.exam_scans()

File "/usr/programs/spring_v0-84-1470/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/micprgs/micexam_mpi.py", line 15, in exam_scans

self.examine_scans_computing_total_and_local_powerspectra(self.micrograph_files, self.outfiles)

File "/usr/programs/spring_v0-84-1470/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/micprgs/micexam.py", line 419, in examine_scans_computing_total_and_local_powerspectra

self.tilesize, self.tile_overlap)

File "/usr/programs/spring_v0-84-1470/lib/python2.7/site-packages/emspring-0.84.1470-py2.7.egg/spring/micprgs/micexam.py", line 284, in compute_power_spectra

pw2 = welch_pw2(welchmic, tilesize, tile_overlap, tile_overlap, edge, edge)

File "/usr/programs/spring_v0-84-1470/parts/EMAN2/lib/fundamentals.py", line 1020, in welch_pw2

if (iz == 1): pw2 = periodogram(ramp(wi))

File "/usr/programs/spring_v0-84-1470/parts/EMAN2/lib/fundamentals.py", line 662, in ramp

e = inputimage.copy()

AttributeError: 'NoneType' object has no attribute 'copy'


Can you consult?


Thank you,

Andy


Postdoc

NIH, NIDDK, LCMB, Hinshaw Lab


Carsten Sachse

unread,
Apr 24, 2017, 2:39:35 AM4/24/17
to emspring
Dear Andrew,

Thank you for posting your error message on the board. Do you see the diagnostic plots produced for some micrographs or are none of them written out in the result directory? Could you also post the parameters used? Please copy them out of the header of the results.log

Thanks.

Best wishes,


Carsten

Andrew Kehr

unread,
Apr 24, 2017, 9:02:31 AM4/24/17
to emspring
Hi Carsten,

No plots are coming up or written out.  I'm using the default parameters as suggested in the tutorial manual.

INFO:CPU0:startlog:

INFO:CPU0:startlog:The following input parameters have been received:
INFO:CPU0:startlog:Micrographs                              = /home/kehrad/Documents/archive/10020/data/K2_02_stack.mrc
INFO:CPU0:startlog:Diagnostic plot pattern                  = micexam_diag.pdf
INFO:CPU0:startlog:Pixel size in Angstrom                   = 1.163
INFO:CPU0:startlog:Tile size power spectrum in Angstrom     = None
INFO:CPU0:startlog:Tile overlap in percent                  = None
INFO:CPU0:startlog:Complete tile array option               = None
INFO:CPU0:startlog:Binning option                           = None
INFO:CPU0:startlog:Binning factor                           = None
INFO:CPU0:startlog:MPI option                               = None
INFO:CPU0:startlog:Number of CPUs                           = None
INFO:CPU0:startlog:Temporary directory                      = None
INFO:CPU0:startlog:
----------------------------------------------------------------------------------------------------
The final set of parameters has been completed with the provided default parameters:
INFO:CPU0:startlog:Micrographs                              = /home/kehrad/Documents/archive/10020/data/K2_02_stack.mrc
INFO:CPU0:startlog:Diagnostic plot pattern                  = micexam_diag.pdf
INFO:CPU0:startlog:Pixel size in Angstrom                   = 1.163
INFO:CPU0:startlog:Tile size power spectrum in Angstrom     = 1800
INFO:CPU0:startlog:Tile overlap in percent                  = 50
INFO:CPU0:startlog:Complete tile array option               = False
INFO:CPU0:startlog:Binning option                           = True
INFO:CPU0:startlog:Binning factor                           = 3
INFO:CPU0:startlog:MPI option                               = True
INFO:CPU0:startlog:Number of CPUs                           = 2
INFO:CPU0:startlog:Temporary directory                      = /tmp
INFO:CPU0:startlog:


Thanks!

Carsten Sachse

unread,
Apr 24, 2017, 11:33:04 AM4/24/17
to emspring
Hi Andy,

Have you tried decreasing the tile size? In your case with a 4k image your tile spans half the micrograph. This is not really a lot of tiles to average go down to half or less, eg. 1000 or 600 Angstrom.

Best wishes,


Carsten

On Friday, 21 April 2017 19:57:21 UTC+2, Andrew Kehr wrote:

Andrew Kehr

unread,
Apr 26, 2017, 5:18:05 PM4/26/17
to emspring
Hi Carsten,

I think I figured out the problem.  I was assuming that the K2 files on the tutorial page were already motion-corrected, like the limited TMV particle dataset.

Thanks,
Andy

Carsten Sachse

unread,
Apr 27, 2017, 3:45:36 AM4/27/17
to emspring
Hi Andy,

Thanks for resolving the issue on the list.

Best wishes,


Carsten
Reply all
Reply to author
Forward
0 new messages