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

Test for Disentangled Spatiotemporal SSM #2128

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 29 additions & 1 deletion Testing/OptimizeTests/OptimizeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,38 @@ TEST(OptimizeTests, vtk_output) {
for (int i = 0; i < values.size(); i++) {
std::cerr << "Eigenvalue " << i << " : " << values[i] << "\n";
}

// check the first mode of variation.
// If Procrustes scaling is working, this should be small.
// Otherwise it is quite large (>4000).
double value = values[values.size() - 1];
ASSERT_LT(value, 100);
}

//---------------------------------------------------------------------------
TEST(OptimizeTests, disentangled_spatiotemporal_test) {
prep_temp("/optimize/disentangled_spatiotemporal", "disentangled_spatiotemporal_test");

std::remove("test1_particles/ID01_TIME01_world.particles");

Optimize app;
ProjectHandle project = std::make_shared<Project>();
ASSERT_TRUE(project->load("test1.xlsx"));
OptimizeParameters params(project);
ASSERT_TRUE(params.set_up_optimize(&app));
bool runStatus = app.Run();

ASSERT_TRUE(runStatus);

// compute and test stats
ParticleShapeStatistics stats;
stats.ReadPointFiles("test1_analyze.xml");
stats.ComputeModes();
stats.PrincipalComponentProjections();

auto values = stats.Eigenvalues();
for (int i = 0; i < values.size(); i++) {
std::cerr << "Eigenvalue " << i << " : " << values[i] << "\n";
}
ASSERT_GT(values[values.size() - 1], 200000);
ASSERT_LT(values[values.size() - 2], 120000);
}
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<point_files>
test1_particles/ID01_TIME01_world.particles
test1_particles/ID01_TIME02_world.particles
test1_particles/ID01_TIME03_world.particles
test1_particles/ID01_TIME04_world.particles
test1_particles/ID01_TIME05_world.particles
test1_particles/ID01_TIME06_world.particles
test1_particles/ID01_TIME07_world.particles
test1_particles/ID01_TIME08_world.particles
test1_particles/ID02_TIME01_world.particles
test1_particles/ID02_TIME02_world.particles
test1_particles/ID02_TIME03_world.particles
test1_particles/ID02_TIME04_world.particles
test1_particles/ID02_TIME05_world.particles
test1_particles/ID02_TIME06_world.particles
test1_particles/ID02_TIME07_world.particles
test1_particles/ID02_TIME08_world.particles
test1_particles/ID03_TIME01_world.particles
test1_particles/ID03_TIME02_world.particles
test1_particles/ID03_TIME03_world.particles
test1_particles/ID03_TIME04_world.particles
test1_particles/ID03_TIME05_world.particles
test1_particles/ID03_TIME06_world.particles
test1_particles/ID03_TIME07_world.particles
test1_particles/ID03_TIME08_world.particles
test1_particles/ID04_TIME01_world.particles
test1_particles/ID04_TIME02_world.particles
test1_particles/ID04_TIME03_world.particles
test1_particles/ID04_TIME04_world.particles
test1_particles/ID04_TIME05_world.particles
test1_particles/ID04_TIME06_world.particles
test1_particles/ID04_TIME07_world.particles
test1_particles/ID04_TIME08_world.particles
test1_particles/ID05_TIME01_world.particles
test1_particles/ID05_TIME02_world.particles
test1_particles/ID05_TIME03_world.particles
test1_particles/ID05_TIME04_world.particles
test1_particles/ID05_TIME05_world.particles
test1_particles/ID05_TIME06_world.particles
test1_particles/ID05_TIME07_world.particles
test1_particles/ID05_TIME08_world.particles
test1_particles/ID06_TIME01_world.particles
test1_particles/ID06_TIME02_world.particles
test1_particles/ID06_TIME03_world.particles
test1_particles/ID06_TIME04_world.particles
test1_particles/ID06_TIME05_world.particles
test1_particles/ID06_TIME06_world.particles
test1_particles/ID06_TIME07_world.particles
test1_particles/ID06_TIME08_world.particles
test1_particles/ID07_TIME01_world.particles
test1_particles/ID07_TIME02_world.particles
test1_particles/ID07_TIME03_world.particles
test1_particles/ID07_TIME04_world.particles
test1_particles/ID07_TIME05_world.particles
test1_particles/ID07_TIME06_world.particles
test1_particles/ID07_TIME07_world.particles
test1_particles/ID07_TIME08_world.particles
test1_particles/ID08_TIME01_world.particles
test1_particles/ID08_TIME02_world.particles
test1_particles/ID08_TIME03_world.particles
test1_particles/ID08_TIME04_world.particles
test1_particles/ID08_TIME05_world.particles
test1_particles/ID08_TIME06_world.particles
test1_particles/ID08_TIME07_world.particles
test1_particles/ID08_TIME08_world.particles
</point_files>
Loading