Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7afcc26
remove unused variable
fede-pe Aug 6, 2024
c3f1755
refactor + comment code
fede-pe Aug 8, 2024
53e8e66
commit to checkout
fede-pe Aug 28, 2024
1fc17ae
Merge branch 'devel' into fi_LigFit
fede-pe Aug 29, 2024
fd603a0
uncomment code
fede-pe Sep 5, 2024
f2976f5
save statistics of subtracted particles (in progress...) commit to ch…
fede-pe Sep 16, 2024
1712c38
Merge branch 'devel' into fi_LigFit
fede-pe Sep 16, 2024
99ea12f
add statistic of kept region in output log
fede-pe Sep 16, 2024
336f0bb
commit to checkout
fede-pe Sep 17, 2024
4f34057
calculate avg and std weighted by mask + improve comments
fede-pe Oct 4, 2024
36e2640
debug output files flag!
fede-pe Oct 4, 2024
f5e3e65
remove --fmask_width unused option
fede-pe Oct 4, 2024
f5cc407
remove limit freq substraction
fede-pe Oct 8, 2024
c2f6012
fix
fede-pe Oct 8, 2024
348d56e
update default values
fede-pe Oct 8, 2024
3781151
varaible reaming
fede-pe Oct 8, 2024
73031dd
improve help and add debug code
fede-pe Oct 15, 2024
edd50aa
fix max resol normalization + add debug code + prepare program to acc…
fede-pe Oct 15, 2024
d75a92e
add input mask as possible input (instead of circular mask)
fede-pe Oct 15, 2024
c5ef554
add code to debug input mask + fix freq map + conditional initializat…
fede-pe Oct 16, 2024
48b9e14
apply (also) volume mask to input volume in provided
fede-pe Oct 16, 2024
bec6c0b
set default maxRes=-1 to Nyquist/sqrt(2)
fede-pe Oct 16, 2024
7534a54
define independtly projection resolution and subtraction resolution +…
fede-pe Oct 18, 2024
3f5dead
Merge branch 'devel' into fi_LigFit
fede-pe Oct 18, 2024
941e734
optmize code + comment unused methods
fede-pe Oct 21, 2024
58eb9f1
refactor + add debug files + logic under PFourier0(0,0) = IiMFourier…
fede-pe Oct 23, 2024
2888d46
Merge branch 'devel' into fi_LigFit
fede-pe Oct 24, 2024
1486320
fix uninitialization of mask projector when mask is not provided in m…
fede-pe Oct 29, 2024
584bf49
fixes, fixes everywhere + project mask in real space
fede-pe Oct 30, 2024
3db0894
project mask in real space in MPI version
fede-pe Oct 30, 2024
984ec1c
add ifdef to pararell version for debug
fede-pe Nov 5, 2024
5cd6a71
add ifdef to pararell version for debug
fede-pe Nov 5, 2024
deccaa0
fix background estimation + metadata handling + mask handling
fede-pe Nov 5, 2024
9764929
option from fourier/real space projector
fede-pe Nov 5, 2024
5c273bc
option from fourier/real space projector in parallelized version
fede-pe Nov 5, 2024
a43a311
fix realspace projecto for MPI
fede-pe Nov 6, 2024
87d16ed
add second mask logic
fede-pe Nov 6, 2024
40ebb6e
fixes when using protein mask
fede-pe Nov 7, 2024
2984849
add debug flags to parallel version
fede-pe Nov 11, 2024
7788ac0
calculate zScore and add to metadata
fede-pe Nov 11, 2024
69bf67b
Merge branch 'devel' into fi_LigFit
fede-pe Nov 11, 2024
ff711cb
commit to checout
fede-pe Nov 13, 2024
84fc3db
Merge branch 'devel' into fi_LigFit
fede-pe Nov 13, 2024
53ef2a5
remove particle stats method
fede-pe Nov 13, 2024
501dba2
remove mispalced code
fede-pe Nov 13, 2024
04451df
trigger sonarcloud
fede-pe Nov 13, 2024
a32c16c
trigger sonarcloud
fede-pe Nov 13, 2024
f60ced8
Merge branch 'devel' into fi_proySubstractionFixes
fede-pe Nov 19, 2024
ff0e149
Merge branch 'devel' into fi_proySubstractionFixes
fede-pe Nov 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 28 additions & 35 deletions src/xmipp/libraries/parallel/mpi_subtract_projection.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/***************************************************************************
*
* Authors: Estrella Fernandez Gimenez ([email protected])
* Authors: Estrella Fernandez Gimenez ([email protected])
* Federico P. de Isidro-Gomez ([email protected])
*
* Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
*
Expand Down Expand Up @@ -48,46 +49,38 @@ void MpiProgSubtractProjection::preProcess()
int origin;
int realSizeMask;
int originMask;
if (node->rank == 0)
{
realSize = (int)XSIZE(projector->VfourierRealCoefs);
origin = STARTINGX(projector->VfourierRealCoefs);
realSizeMask = (int)XSIZE(projectorMask->VfourierRealCoefs);
originMask = STARTINGX(projectorMask->VfourierRealCoefs);
}

MPI_Bcast(&realSize, 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&origin, 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&(projector->volumePaddedSize), 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&projector->volumeSize, 1, MPI_INT, 0, MPI_COMM_WORLD);
if (!realSpaceProjector)
{
if (node->rank == 0)
{
realSize = (int)XSIZE(projector->VfourierRealCoefs);
origin = STARTINGX(projector->VfourierRealCoefs);
}

MPI_Bcast(&realSizeMask, 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&originMask, 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&(projectorMask->volumePaddedSize), 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&projectorMask->volumeSize, 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&realSize, 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&origin, 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&(projector->volumePaddedSize), 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&projector->volumeSize, 1, MPI_INT, 0, MPI_COMM_WORLD);

if (rank != 0)
{
projector->VfourierRealCoefs.resizeNoCopy(realSize,realSize,realSize);
projector->VfourierImagCoefs.resizeNoCopy(realSize,realSize,realSize);
STARTINGX(projector->VfourierRealCoefs)=STARTINGY(projector->VfourierRealCoefs)=STARTINGZ(projector->VfourierRealCoefs)=origin;
STARTINGX(projector->VfourierImagCoefs)=STARTINGY(projector->VfourierImagCoefs)=STARTINGZ(projector->VfourierImagCoefs)=origin;
MPI_Bcast(&realSizeMask, 1, MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(&originMask, 1, MPI_INT, 0, MPI_COMM_WORLD);

projectorMask->VfourierRealCoefs.resizeNoCopy(realSizeMask,realSizeMask,realSizeMask);
projectorMask->VfourierImagCoefs.resizeNoCopy(realSizeMask,realSizeMask,realSizeMask);
STARTINGX(projectorMask->VfourierRealCoefs)=STARTINGY(projectorMask->VfourierRealCoefs)=STARTINGZ(projectorMask->VfourierRealCoefs)=originMask;
STARTINGX(projectorMask->VfourierImagCoefs)=STARTINGY(projectorMask->VfourierImagCoefs)=STARTINGZ(projectorMask->VfourierImagCoefs)=originMask;
}
if (rank != 0)
{
projector->VfourierRealCoefs.resizeNoCopy(realSize,realSize,realSize);
projector->VfourierImagCoefs.resizeNoCopy(realSize,realSize,realSize);
STARTINGX(projector->VfourierRealCoefs)=STARTINGY(projector->VfourierRealCoefs)=STARTINGZ(projector->VfourierRealCoefs)=origin;
STARTINGX(projector->VfourierImagCoefs)=STARTINGY(projector->VfourierImagCoefs)=STARTINGZ(projector->VfourierImagCoefs)=origin;
}

MPI_Bcast(MULTIDIM_ARRAY(projector->VfourierRealCoefs), (int)MULTIDIM_SIZE(projector->VfourierRealCoefs), MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(MULTIDIM_ARRAY(projector->VfourierImagCoefs), (int)MULTIDIM_SIZE(projector->VfourierImagCoefs), MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(MULTIDIM_ARRAY(projectorMask->VfourierRealCoefs), (int)MULTIDIM_SIZE(projectorMask->VfourierRealCoefs), MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(MULTIDIM_ARRAY(projectorMask->VfourierImagCoefs), (int)MULTIDIM_SIZE(projectorMask->VfourierImagCoefs), MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(MULTIDIM_ARRAY(projector->VfourierRealCoefs), (int)MULTIDIM_SIZE(projector->VfourierRealCoefs), MPI_DOUBLE, 0, MPI_COMM_WORLD);
MPI_Bcast(MULTIDIM_ARRAY(projector->VfourierImagCoefs), (int)MULTIDIM_SIZE(projector->VfourierImagCoefs), MPI_DOUBLE, 0, MPI_COMM_WORLD);

if (rank != 0)
{
projector->produceSideInfoProjection();
projectorMask->produceSideInfoProjection();
if (rank != 0)
{
projector->produceSideInfoProjection();
}
}

MetaData &mdIn = *getInputMd();
Expand Down
4 changes: 3 additions & 1 deletion src/xmipp/libraries/parallel/mpi_subtract_projection.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/***************************************************************************
*
* Authors: Estrella Fernandez Gimenez ([email protected])
* Authors: Estrella Fernandez Gimenez ([email protected])
* Federico P. de Isidro-Gomez ([email protected])
*
* Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
*
Expand All @@ -27,6 +28,7 @@
#include <parallel/xmipp_mpi.h>
#include <reconstruction/subtract_projection.h>

#define DEBUG

class MpiProgSubtractProjection: public ProgSubtractProjection, public MpiMetadataProgram
{
Expand Down
9 changes: 6 additions & 3 deletions src/xmipp/libraries/reconstruction/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ void ProgProject::defineParams()
addParamsLine(" :+++ %BR% ");
addParamsLine(" : pad: controls the padding factor.");
addParamsLine(" :+++ %BR% ");
addParamsLine(" : maxfreq: is the maximum frequency for the pixels and by default ");
addParamsLine(" : pixels with frequency more than 0.25 are not considered.");
addParamsLine(" : maxfreq: is the maximum frequency for the projected pixels normalized to Nyquist=0.5");
addParamsLine(" : and by default pixels with frequency more than 0.25 are not considered.");
addParamsLine(" :+++ %BR% ");
addParamsLine(" : interp: is the method for interpolation and the values can be: ");
addParamsLine(" :+++ %BR% ");
Expand Down Expand Up @@ -988,8 +988,11 @@ int PROJECT_Effectively_project(const FileName &fnOut,
FourierProjector *Vfourier=nullptr;
if (projType == SHEARS && side.phantomMode==PROJECT_Side_Info::VOXEL)
Vshears=new RealShearsInfo(side.phantomVol());
if (projType == FOURIER && side.phantomMode==PROJECT_Side_Info::VOXEL)//////////////////////
if (projType == FOURIER && side.phantomMode==PROJECT_Side_Info::VOXEL)
Vfourier=new FourierProjector(side.phantomVol(),side.paddFactor,side.maxFrequency,side.BSplineDeg);
#ifdef DEBUG
std::cout << "FourierProjector(side.phantomVol(),"<<side.paddFactor<<","<<side.maxFrequency<<","<<side.BSplineDeg<<");"<< std::endl;
#endif
/// 1 .5 NEAREST
fn_proj=fnOut;
if (side.doCrystal)
Expand Down
Loading