Project

General

Profile

Actions

Feature #2997

open

create an Appion alternative to EMAN1 proc2d

Added by Scott Stagg almost 10 years ago. Updated over 8 years ago.

Status:
Assigned
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
12/15/2014
Due date:
% Done:

0%

Estimated time:

Description

proc2d will eventually not be supported, and EMAN2 proc2d (practically) requires that you use the python that is distributed with EMAN2, which breaks the rest of the pipeline.


Related issues 3 (3 open0 closed)

Related to Appion - Bug #3327: Remove proc2d from makestack2.pyIn Code ReviewSargis Dallakyan07/23/2015

Actions
Blocks Appion - Bug #2840: Remove EMAN1 functions from AppionAssignedScott Stagg07/15/2014

Actions
Blocked by Appion - Feature #4014: StackClass: a class for reading and writing stacks that is file type agnosticAssignedNeil Voss03/07/2016

Actions
Actions #1

Updated by Neil Voss about 9 years ago

  • Related to Bug #3327: Remove proc2d from makestack2.py added
Actions #2

Updated by Neil Voss about 9 years ago

  • Blocks Bug #2840: Remove EMAN1 functions from Appion added
Actions #3

Updated by Scott Stagg about 9 years ago

Neil, did you start from scratch or are you using what I started to make with approc2d.py? Have you checked in your version?

Actions #4

Updated by Neil Voss about 9 years ago

Hi Scott, I started with approc2d, but it was not quite ready and I decided not to use a system call. In many respects it is the same, but it is all handled in (small amounts of) memory.

I have made some changes to approc2d, but approc2d gets bogged down with file formats, when to append/when not to append. In makestack2, it is more controlled. Makestack2 only uses hed/img and we are always appending, so it was much easier and straight-forward to implement in-place, in my opinion.

I also removed the calls to Xmipp, because we can handle ramping and pixlimit within python.

Actions #5

Updated by Scott Stagg about 9 years ago

I see. I'll take a look at the code during the hackathon. I still think we should have an approc2d.py . Hopefully your imagic I/O code is modularized enough that I can use it for approc2d. My plan for the next step for it was to make a generalized stack class that handles reads and writes in a more generalized way. I'm hoping to work on that at the hackathon if I get the website stuff that I want to get done finished.

Actions #6

Updated by Neil Voss about 9 years ago

### Works
# read MRC image
# write to MRC image
# filter images
# implement binning

### needs more testing
# write pixelsize to new MRC file
# read MRC stack
# read IMAGIC stack
# write to HED/IMG
# write to MRC stack
# append to HED/IMG
# append to MRC
# get apix from MRC header

### TODO
# read SPIDER
# read EMAN/HDF
# get apix from HED/IMG header
# implement proc2d --list feature
# implement proc2d --clip
# implement normalization
Actions #7

Updated by Neil Voss about 9 years ago

  • Assignee changed from Scott Stagg to Neil Voss
from appionlib import proc2dLib

a = proc2dLib.RunProc2d()
a.setValue('infile', 'file.mrc')
a.setValue('outfile', 'outfile.mrc')
a.setValue('apix', 1.36)
a.setValue('lowpass', 10)
a.run()
Actions #8

Updated by Scott Stagg about 9 years ago

I think the mem map idea is not working. I am trying to use approc2d.py to change the format of a stack from imagic to mrc, and it appears to be loading the whole thing into memory before beginning to write the new stack. This was a major reason why in my original script, I was treating a stack one particle at a time. I'm not sure what the fix for this is. Neil, any ideas?

Actions #9

Updated by Neil Voss about 9 years ago

Hi Scott, I will have to test, but it should work. One problem could be the number of particles per cycle OR no properly cleaning up the particles in memory (supposedly automatically done via garbage collection in python).

Doing one particle at a time could make the program slow, because calling for too many disk writes can be a bottleneck, especially since how the headers are setup in stacks.

Actions #10

Updated by Neil Voss over 8 years ago

  • Status changed from New to Assigned
  • Priority changed from Normal to High
Actions #11

Updated by Neil Voss over 8 years ago

  • Blocked by Feature #4014: StackClass: a class for reading and writing stacks that is file type agnostic added
Actions

Also available in: Atom PDF