Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definition of multiref_polar_ali_2d_delta differs between util_sparx.cpp/h and libpyUtils2.cpp #312

Closed
akesandgren opened this issue Feb 21, 2019 · 10 comments

Comments

@akesandgren
Copy link

The definition in libEM/sparx/util_sparx.h says

        static vector<float> multiref_polar_ali_2d_delta(EMData* image, const vector< EMData* >& crefim,
                vector<float> xrng, vector<float> yrng, float step, string mode,
                vector< int >numr, float cnx, float cny, float delta_start, float delta);

while the one in libpyUtils2.cpp says

                .def("multiref_polar_ali_2d_delta", &EMAN::Util::multiref_polar_ali_2d_delta, args("image", "crefim", "xrng", "yrng", "step", "mode", "numr", "cnx", "cny"), "formerly known as apmq\nDetermine shift and rotation between image and many referenceimages (crefim, weights have to be applied) quadratic\ninterpolation")

Note the missing two arguments in the libpyUtils2 definition.

@ghost
Copy link

ghost commented Feb 21, 2019 via email

@akesandgren
Copy link
Author

Well, SPRING's usage of

Util.multiref_polar_ali_2d_delta(align_img, ringref, x_range,
            y_range, translation_step, full_circle_mode, polar_interpolation_parameters, center_x + shift_x,
            center_y + shift_y, each_image.inplane_angle, self.delta_psi)

fails with:

  File "/scratch/ake/easybuild/software/MPI/GCC-CUDA/7.3.0-2.30-9.2.88/OpenMPI/3.1.1/SPRING/0.86.1661-Python-2.7.15/lib/python2.7/site-packages/spring/segment2d/segmentalign2d.py", line 219, in perform_coarse_restrained_alignment
    center_y + shift_y, each_image.inplane_angle, self.delta_psi)
Boost.Python.ArgumentError: Python argument types in
    Util.multiref_polar_ali_2d_delta(EMData, list, numpy.float64, numpy.float64, int, str, list, numpy.float64, numpy.float64, int, float)
did not match C++ signature:
    multiref_polar_ali_2d_delta(EMAN::EMData*, std::vector<EMAN::EMData*, std::allocator<EMAN::EMData*> >, std::vector<float, std::allocator<float> > image, std::vector<float, std::allocator<float> > crefim, float xrng, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > yrng, std::vector<int, std::allocator<int> > step, float mode, float numr, float cnx, float cny)

so there is a problem somewhere. Is the actual problem somewhere else?

@akesandgren
Copy link
Author

Ah, there is one type that is wrong, didn't notice the first two times i looked at it.

@ghost
Copy link

ghost commented Feb 21, 2019 via email

@akesandgren
Copy link
Author

@ghost
Copy link

ghost commented Feb 21, 2019 via email

@akesandgren
Copy link
Author

Yeah, I'm looking into it.

@shadowwalkersb
Copy link
Member

@akesandgren , can we close this issue, if there is no more feedback?

@akesandgren
Copy link
Author

Sorry, forgot about this one. I'll close it until I have time to figure it out properly.

@ghost
Copy link

ghost commented May 27, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants