LDDMM: how To Bring Deformations from Subject-Specific Atlases Into the Tangent Space at the Global Atlas#

  • Load meshes:

    • Use DenseMaternalMeshLoader to load left hippocampus structure for all three subjects

  • Create subject-specific pre-pregnancy atlases:

    • For each subject i:

      • Get pre-pregnancy meshes of left hippocampus

      • Compute subject-specific pre-pregnancy atlas \(X_{i, \text{pre-pregnancy}}\).

  • Create global pre-pregnancy atlas:

    • Compute global pre-pregnancy atlas from subject-specific pre-pregnancy atlases: \(X^{\text{pre-pregnancy}} = \text{mean}_i ~~X^{\text{pre-pregnancy}}_{i}\).

  • Extract pregnancy deformations as momenta:

    • For each subject i and pregnancy timepoint t:

      • Compute deformation from pre-pregnancy atlas to each pregnancy mesh, using control points of global atlas: \(\text{deformation}_{it} = X^{\text{pre-pregnancy}}_{i} \rightarrow X^{\text{pregnancy}}_{it}\) as momenta at control points

      • Parallel transport deformation into global deterministic atlas space to get Xit: this is assumed to be the identity

  • Build prediction model:

    • Use linear regression to predict gestational week (Yit=t) from transported deformations (Xit)

[1]:
import shutil
from pathlib import Path

import numpy as np
import pandas as pd
import pyvista as pv

import polpo.lddmm as plddmm
import polpo.preprocessing.dict as ppdict
import polpo.preprocessing.pd as ppd
import polpo.utils as putils
from polpo.plot.pyvista import RegisteredMeshesGifPlotter
from polpo.preprocessing.load.deformetrica import LoadMeshFlow
from polpo.preprocessing.load.pregnancy.jacobs import MeshLoader, TabularDataLoader
from polpo.preprocessing.mesh.decimation import PvDecimate
from polpo.preprocessing.mesh.io import DictMeshWriter, PvReader
from polpo.preprocessing.mesh.registration import RigidAlignment
from polpo.preprocessing.str import TryToInt
W1007 14:56:50.734000 29039 site-packages/torch/utils/cpp_extension.py:118] No CUDA runtime is found, using CUDA_HOME='/usr'
[2]:
DEBUG = False
RECOMPUTE = True
STATIC_VIZ = True

if STATIC_VIZ:
    pv.set_jupyter_backend("static")
[3]:
SUBJECT_IDS = ["01", "1001B", "1004B"]

RESULTS_DIR = Path("results") / "regression_example"
ATLAS_DIR = RESULTS_DIR / "atlases"
MESHES_DIR = RESULTS_DIR / "meshes"
REGISTRATIONS_DIR = RESULTS_DIR / "registrations"
TRANSPORTS_DIR = RESULTS_DIR / "transports"
PARALLEL_SHOOT_DIR = RESULTS_DIR / "parallel_shoot"

if RESULTS_DIR.exists() and RECOMPUTE:
    shutil.rmtree(RESULTS_DIR)

data_dir = "/home/data/maternal" if putils.in_frank() else "~/.herbrain/data/maternal"
[4]:
def _sub_id2name(sub_id):
    return f"sub_{sub_id}"

Load, write and filter meshes#

[5]:
path2meshes = MeshLoader(
    subject_subset=SUBJECT_IDS,
    struct_subset=["L_Hipp"],
    as_mesh=True,
    data_dir=data_dir,
) + ppdict.ExtractUniqueKey(nested=True)


if DEBUG:
    path2meshes += ppdict.DictMap(ppdict.TruncateDict(n_keys=8))


# subject_id, session_id
raw_meshes = path2meshes()

print("Number of meshes for:")
for subject_id, meshes in raw_meshes.items():
    print(f"  -subject {subject_id}: {len(meshes)}")
Number of meshes for:
  -subject 01: 27
  -subject 1001B: 13
  -subject 1004B: 21
[6]:
csvs = {}
for subject_id in SUBJECT_IDS:
    csvs[subject_id] = TabularDataLoader(data_dir=data_dir, subject_id=subject_id)()

for subject_id in SUBJECT_IDS:
    print(subject_id)
    display(csvs[subject_id])
01
estro prog lh gestWeek stage EndoStatus trimester
sessionID
1 NaN NaN NaN -3.0 pre pilot1 pre
2 3.42 0.840 NaN -0.5 pre pilot2 pre
3 386.00 NaN NaN 1.0 pre IVF pre
4 1238.00 NaN NaN 1.5 pre IVF pre
5 1350.00 2.940 NaN 2.0 pre IVF first
6 241.00 8.760 NaN 3.0 preg Pregnant first
7 NaN NaN NaN 9.0 preg Pregnant first
8 NaN NaN NaN 12.0 preg Pregnant first
9 NaN NaN NaN 14.0 preg Pregnant second
10 4700.00 53.900 1.45 15.0 preg Pregnant second
11 4100.00 56.800 0.87 17.0 preg Pregnant second
12 6190.00 70.600 0.93 19.0 preg Pregnant second
13 9640.00 54.700 0.62 22.0 preg Pregnant second
14 8800.00 64.100 0.73 24.0 preg Pregnant second
15 8970.00 61.400 0.73 27.0 preg Pregnant third
16 10200.00 74.200 0.69 29.0 preg Pregnant third
17 9920.00 83.000 0.77 31.0 preg Pregnant third
18 9860.00 95.300 0.83 33.0 preg Pregnant third
19 12400.00 103.000 0.59 36.0 preg Pregnant third
20 9.18 0.120 0.96 43.0 post Postpartum post
21 20.70 0.043 4.01 46.0 post Postpartum post
22 17.50 0.068 7.58 49.0 post Postpartum post
23 11.50 0.042 4.67 51.0 post Postpartum post
24 NaN NaN NaN 68.0 post Postpartum post
25 NaN NaN NaN 93.0 post Postpartum post
26 NaN NaN NaN 162.0 post Postpartum post
27 NaN NaN NaN 162.0 post Postpartum post
1001B
gestWeek stage trimester date
sessionID
base1 -18.0 pre pre 4/1/2023
base2 -13.0 pre pre 5/6/2023
gest1 8.0 preg first 9/30/2023
gest2 13.0 preg first 11/4/2023
gest3 17.0 preg second 12/2/2023
gest4 22.0 preg second 1/6/2024
gest5 26.0 preg second 2/3/2024
gest6 30.0 preg third 3/2/2024
gest7 35.0 preg third 4/6/2024
post1 43.0 post post 6/1/2024
post2 48.0 post post 7/6/2024
post3 56.0 post post 9/1/2024
post4 65.0 post post 11/2/2024
1004B
gestWeek stage trimester date
sessionID
base1 -2.5 pre pre 8/22/2023
base2 2.0 preg first 9/21/2023
gest1 5.0 preg first 10/11/2023
gest2 7.0 preg first 10/26/2023
gest3 8.5 preg first 11/7/2023
gest4 10.5 preg first 11/20/2023
gest5 12.5 preg first 12/4/2023
gest6 14.5 preg second 12/18/2023
gest7 16.5 preg second 1/3/2024
gest8 19.0 preg second 1/18/2024
gest9 21.0 preg second 2/1/2024
gest10 23.0 preg second 2/15/2024
gest11 24.5 preg second 2/27/2024
gest12 27.0 preg third 3/14/2024
gest13 30.0 preg third 4/5/2024
post1 43.0 post post 7/5/2024
post2 50.0 post post 8/21/2024
post3 52.0 post post 9/4/2024
post4 54.0 post post 9/23/2024
post5 57.0 post post 10/10/2024
post6 65.5 post post 12/11/2024
[7]:
# Rigid alignment of all meshes to the first mesh of subject 01
align_pipe = RigidAlignment(
    target=putils.get_first(raw_meshes["01"]),
    # TODO: update here
    max_iterations=10,
)

# Coarsen all meshes to reduce number of vertices
# NB: this steps kills any correspondence between meshes
# TODO: evaluate relevance of this step
decimate_pipe = PvDecimate(target_reduction=0.6)


# TODO: it is better to go the other way around
rigidly_aligned_meshes = ppdict.DictMap(align_pipe)(raw_meshes)

meshes = ppdict.NestedDictMap(decimate_pipe)(rigidly_aligned_meshes)
[8]:
pl = pv.Plotter(shape=(2, 3), border=False, window_size=[600, 300])

for i, subject_id in enumerate(SUBJECT_IDS):
    pl.subplot(0, i)
    pl.add_mesh(putils.get_first(rigidly_aligned_meshes[subject_id]), show_edges=True)
    pl.add_text(
        f"First mesh of subject {subject_id}", position="upper_edge", font_size=4
    )

    pl.subplot(1, i)
    pl.add_mesh(putils.get_first(meshes[subject_id]), show_edges=True, color="white")
    pl.add_text(
        f"Decimated First Mesh of subject {subject_id}",
        position="upper_edge",
        font_size=4,
    )

pl.show()
../../../_images/_notebooks_how_to_all_regression_across_subjects_9_0.png
[9]:
def _key2name(key):
    sub_id, session_id = key.split("/")
    return f"{_sub_id2name(sub_id)}/mesh_{session_id}"


meshes2files = (
    ppdict.UnnestDict(sep="/")
    + DictMeshWriter(dirname=MESHES_DIR, ext="vtk", key2name=_key2name)
    + ppdict.NestDict(sep="/")
    + ppdict.DictMap(ppdict.DictMap(key_step=TryToInt()))
)

# subject, session: filename
dataset = meshes2files(meshes)

Estimate deterministic atlas for subject and global#

Compute subject specific deterministic atlas by averaging pre-pregnancy meshes.

First, we select the pre-pregnancy meshes.

[10]:
# TODO: update here
pre_keys_selector = ppd.DfIsInFilter("stage", ["pre"]) + (lambda x: x.index)

pre_keys = ppdict.DictMap(pre_keys_selector)(csvs)
[11]:
pre_dataset = {
    subject_id: ppdict.SelectKeySubset(pre_keys[subject_id])(meshes)
    for subject_id, meshes in dataset.items()
}

Closely follows LDDMM: how to estimate a deterministic atlas?.

[12]:
kernel_width = 10.0  # NB: influences the number of cp

registration_kwargs = dict(
    kernel_width=kernel_width,
    regularisation=1,
    max_iter=2000,
    freeze_control_points=False,
    metric="varifold",
    attachment_kernel_width=2.0,
    tol=1e-10,
)
[13]:
templates = {}

for subject_id, dataset_ in pre_dataset.items():
    output_dir = ATLAS_DIR / _sub_id2name(subject_id)
    if output_dir.exists():
        templates[subject_id] = plddmm.io.load_template(output_dir, as_path=True)
        continue

    templates[subject_id] = plddmm.learning.estimate_deterministic_atlas(
        targets=dataset_,
        output_dir=output_dir,
        initial_step_size=1e-1,
        **registration_kwargs,
    )


output_dir = ATLAS_DIR / "global"
if not output_dir.exists():
    templates["global"] = plddmm.learning.estimate_deterministic_atlas(
        targets=templates,
        output_dir=output_dir,
        initial_step_size=1e-1,
        **registration_kwargs,
    )
else:
    templates["global"] = plddmm.io.load_template(output_dir, as_path=True)


templates = ppdict.DictMap(PvReader())(templates)
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 10.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/atlases/sub_01/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
{'max_iterations': 2000, 'freeze_template': False, 'freeze_control_points': False, 'freeze_momenta': False, 'use_sobolev_gradient': True, 'sobolev_kernel_width_ratio': 1, 'max_line_search_iterations': 50, 'initial_control_points': None, 'initial_cp_spacing': None, 'initial_momenta': None, 'dense_mode': False, 'number_of_threads': 1, 'print_every_n_iters': 20, 'downsampling_factor': 1, 'dimension': 3, 'optimization_method_type': 'ScipyLBFGS', 'convergence_tolerance': 1e-10, 'initial_step_size': 0.1, 'gpu_mode': <GpuMode.KERNEL: 4>, 'state_file': 'results/regression_example/atlases/sub_01/deformetrica-state.p', 'load_state_file': False, 'memory_length': 10}
instantiating kernel torch with kernel_width 10.0 and gpu_mode GpuMode.KERNEL. addr: 0x758560315460
instantiating kernel torch with kernel_width 2.0 and gpu_mode GpuMode.KERNEL. addr: 0x758560315850
>> Set of 24 control points defined.
>> Momenta initialized to zero, for 5 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -3.248E+03     [ attachment = -3.241E+03 ; regularity = -7.385E+00 ]
>> Gradient at Termination: 393752.36947430304
>> CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH
>> Estimation took: 10 seconds
Deformetrica.__del__()
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 10.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/atlases/sub_1001B/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
{'max_iterations': 2000, 'freeze_template': False, 'freeze_control_points': False, 'freeze_momenta': False, 'use_sobolev_gradient': True, 'sobolev_kernel_width_ratio': 1, 'max_line_search_iterations': 50, 'initial_control_points': None, 'initial_cp_spacing': None, 'initial_momenta': None, 'dense_mode': False, 'number_of_threads': 1, 'print_every_n_iters': 20, 'downsampling_factor': 1, 'dimension': 3, 'optimization_method_type': 'ScipyLBFGS', 'convergence_tolerance': 1e-10, 'initial_step_size': 0.1, 'gpu_mode': <GpuMode.KERNEL: 4>, 'state_file': 'results/regression_example/atlases/sub_1001B/deformetrica-state.p', 'load_state_file': False, 'memory_length': 10}
>> Set of 24 control points defined.
>> Momenta initialized to zero, for 2 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -7.362E+02     [ attachment = -7.328E+02 ; regularity = -3.317E+00 ]
>> Gradient at Termination: 30616.935054977213
>> CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH
>> Estimation took: 04 seconds
Deformetrica.__del__()
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 10.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/atlases/sub_1004B/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
{'max_iterations': 2000, 'freeze_template': False, 'freeze_control_points': False, 'freeze_momenta': False, 'use_sobolev_gradient': True, 'sobolev_kernel_width_ratio': 1, 'max_line_search_iterations': 50, 'initial_control_points': None, 'initial_cp_spacing': None, 'initial_momenta': None, 'dense_mode': False, 'number_of_threads': 1, 'print_every_n_iters': 20, 'downsampling_factor': 1, 'dimension': 3, 'optimization_method_type': 'ScipyLBFGS', 'convergence_tolerance': 1e-10, 'initial_step_size': 0.1, 'gpu_mode': <GpuMode.KERNEL: 4>, 'state_file': 'results/regression_example/atlases/sub_1004B/deformetrica-state.p', 'load_state_file': False, 'memory_length': 10}
>> Set of 20 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 34299.45904670179
>> CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH
>> Estimation took: 02 seconds
Deformetrica.__del__()
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 10.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/atlases/global/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
{'max_iterations': 2000, 'freeze_template': False, 'freeze_control_points': False, 'freeze_momenta': False, 'use_sobolev_gradient': True, 'sobolev_kernel_width_ratio': 1, 'max_line_search_iterations': 50, 'initial_control_points': None, 'initial_cp_spacing': None, 'initial_momenta': None, 'dense_mode': False, 'number_of_threads': 1, 'print_every_n_iters': 20, 'downsampling_factor': 1, 'dimension': 3, 'optimization_method_type': 'ScipyLBFGS', 'convergence_tolerance': 1e-10, 'initial_step_size': 0.1, 'gpu_mode': <GpuMode.KERNEL: 4>, 'state_file': 'results/regression_example/atlases/global/deformetrica-state.p', 'load_state_file': False, 'memory_length': 10}
>> Set of 24 control points defined.
>> Momenta initialized to zero, for 3 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -3.921E+03     [ attachment = -3.844E+03 ; regularity = -7.690E+01 ]
>> Gradient at Termination: 1520974.913669366
>> CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH
>> Estimation took: 06 seconds
Deformetrica.__del__()
[14]:
pl = pv.Plotter(shape=(1, 4), border=False, window_size=[800, 150])

for i, subject_id in enumerate(SUBJECT_IDS):
    pl.subplot(0, i)
    pl.add_mesh(templates[subject_id], show_edges=True)
    pl.add_text(
        f"pre-pregnancy template of {subject_id}", position="upper_edge", font_size=4
    )

pl.subplot(0, 3)
pl.add_mesh(templates["global"], show_edges=True)
pl.add_text("global template", position="upper_edge", font_size=4)

pl.show()
../../../_images/_notebooks_how_to_all_regression_across_subjects_18_0.png

Parallel transport to atlas#

Closely follows LDDMM: parallel transport?.

[15]:
global_template = plddmm.io.load_template(ATLAS_DIR / "global", as_path=True)

for subject_id, meshes in dataset.items():
    subject_template = plddmm.io.load_template(
        ATLAS_DIR / f"sub_{subject_id}", as_path=True
    )
    transport_dir = TRANSPORTS_DIR / _sub_id2name(subject_id)
    registrations_dir = REGISTRATIONS_DIR / _sub_id2name(subject_id)
    parallel_shoot_dir = PARALLEL_SHOOT_DIR / _sub_id2name(subject_id)

    for session_id, mesh in meshes.items():
        transport_dir_sess = transport_dir / plddmm.io.build_parallel_transport_name(
            subject_id, "global", session_id
        )
        if transport_dir_sess.exists():
            continue

        meshes = {
            "global": global_template,
            subject_id: subject_template,
            session_id: mesh,
        }
        plddmm.geometry.parallel_transport_ABC(
            meshes,
            output_dir=transport_dir,
            registration_dir=registrations_dir,
            compute_shoot=True,
            shoot_dir=parallel_shoot_dir,
            use_pole_ladder=True,
            **registration_kwargs,
        )
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->global/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
instantiating kernel torch with kernel_width 20.0 and gpu_mode GpuMode.KERNEL. addr: 0x758560317b30
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 2076.6978893306127
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->1/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 409.691571709972
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->2/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
/home/luisfpereira/miniconda3/envs/deformetrica/lib/python3.12/site-packages/in_out/dataset_functions.py:265: UserWarning: Watch out, I did not get a distance type for the object shape, Please make sure you are running shooting or a parallel transport, otherwise distances are required.
  warnings.warn(msg)
>> Gradient at Termination: 1739.4395109621248
>> ABNORMAL:
>> Estimation took: 00 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->3/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 457.4014482280067
>> ABNORMAL:
>> Estimation took: 00 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->4/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 688.5967234551742
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->5/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 92.71615746407014
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->6/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 152.1385305640774
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->7/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1757.1258860380285
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->8/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 3384.183368428571
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->9/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1388.9212485216735
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->10/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 3978.6830487726647
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->11/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1635.1460789930147
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->12/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 685.6532014168621
>> ABNORMAL:
>> Estimation took: 00 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->13/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1101.5877024262231
>> ABNORMAL:
>> Estimation took: 00 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->14/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 579.2028275418893
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->15/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1469.621156866755
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->16/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 144.31421561709726
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->17/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 264.1367399452377
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->18/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1188.7802624428198
>> CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->19/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 4904.561448410275
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->20/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 417.45722682985314
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->21/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 439.5702180436356
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->22/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 3930.697721797267
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->23/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 7190.264503332513
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->24/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 813.7921379461327
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->25/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1628.7307875161764
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->26/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Gradient at Termination: 830.4643551525734
>> CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_01/01->27/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.126E+00 ]
>> Log-likelihood = -1.167E+03     [ attachment = -1.164E+03 ; regularity = -2.144E+00 ]
>> Log-likelihood = -1.167E+03     [ attachment = -1.165E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -3.322E+04     [ attachment = -3.285E+04 ; regularity = -3.701E+02 ]
>> Log-likelihood = -1.168E+03     [ attachment = -1.166E+03 ; regularity = -2.143E+00 ]
>> Log-likelihood = -1.167E+03     [ attachment = -1.165E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.168E+03     [ attachment = -1.166E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Log-likelihood = -1.166E+03     [ attachment = -1.164E+03 ; regularity = -2.148E+00 ]
>> Gradient at Termination: 317.3147814181185
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->global/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -2.689E+03     [ attachment = -2.675E+03 ; regularity = -1.458E+01 ]

------------------------------------- Iteration: 40 -------------------------------------
>> Log-likelihood = -2.250E+03     [ attachment = -2.211E+03 ; regularity = -3.930E+01 ]

------------------------------------- Iteration: 60 -------------------------------------
>> Log-likelihood = -2.124E+03     [ attachment = -2.092E+03 ; regularity = -3.203E+01 ]
>> Gradient at Termination: 901.3190770704099
>> ABNORMAL:
>> Estimation took: 05 seconds
Deformetrica.__del__()
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->base1/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 4726.536849103331
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->base2/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -8.507E+02     [ attachment = -8.488E+02 ; regularity = -1.925E+00 ]
>> Gradient at Termination: 3195.7940340298233
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->gest1/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.029E+03     [ attachment = -1.026E+03 ; regularity = -2.638E+00 ]
>> Gradient at Termination: 1120.1715484036818
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->gest2/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 3044.9105112278667
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->gest3/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.154E+03     [ attachment = -1.152E+03 ; regularity = -2.263E+00 ]

------------------------------------- Iteration: 40 -------------------------------------
>> Log-likelihood = -1.070E+03     [ attachment = -1.068E+03 ; regularity = -2.228E+00 ]
>> Gradient at Termination: 818.6166352303965
>> ABNORMAL:
>> Estimation took: 04 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->gest4/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 441.06816413407546
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->gest5/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 903.4862542893511
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->gest6/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 924.2082044058429
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->gest7/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 7708.734458259769
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->post1/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.416E+03     [ attachment = -1.414E+03 ; regularity = -2.353E+00 ]
>> Gradient at Termination: 8052.354901812929
>> ABNORMAL:
>> Estimation took: 03 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->post2/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.183E+00 ]
>> Log-likelihood = -1.034E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -3.881E+04     [ attachment = -3.740E+04 ; regularity = -1.406E+03 ]
>> Log-likelihood = -1.150E+03     [ attachment = -1.148E+03 ; regularity = -2.228E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.034E+03     [ attachment = -1.032E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Log-likelihood = -1.033E+03     [ attachment = -1.031E+03 ; regularity = -2.184E+00 ]
>> Gradient at Termination: 1230.5794346376501
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->post3/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1909.8115530552022
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1001B/1001B->post4/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 4 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 1008.0990288404191
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->global/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -4.798E+03     [ attachment = -4.754E+03 ; regularity = -4.381E+01 ]

------------------------------------- Iteration: 40 -------------------------------------
>> Log-likelihood = -3.741E+03     [ attachment = -3.657E+03 ; regularity = -8.429E+01 ]

------------------------------------- Iteration: 60 -------------------------------------
>> Log-likelihood = -3.388E+03     [ attachment = -3.311E+03 ; regularity = -7.712E+01 ]

------------------------------------- Iteration: 80 -------------------------------------
>> Log-likelihood = -3.279E+03     [ attachment = -3.208E+03 ; regularity = -7.101E+01 ]

------------------------------------- Iteration: 100 -------------------------------------
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.860E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.805E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.149E+03 ; regularity = -6.785E+01 ]
>> Log-likelihood = -3.217E+03     [ attachment = -3.149E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.215E+03     [ attachment = -3.147E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -4.202E+04     [ attachment = -4.118E+04 ; regularity = -8.344E+02 ]
>> Log-likelihood = -3.225E+03     [ attachment = -3.157E+03 ; regularity = -6.806E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.785E+01 ]
>> Log-likelihood = -3.217E+03     [ attachment = -3.149E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Log-likelihood = -3.216E+03     [ attachment = -3.148E+03 ; regularity = -6.782E+01 ]
>> Gradient at Termination: 717.2825981120169
>> ABNORMAL:
>> Estimation took: 10 seconds
Deformetrica.__del__()
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->base1/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 2.439210948221298
>> ABNORMAL:
>> Estimation took: 00 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->base2/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 689.292167682434
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest1/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.131E+03     [ attachment = -1.128E+03 ; regularity = -3.527E+00 ]
>> Gradient at Termination: 160.0985341470868
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest2/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 144.49017508060354
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest3/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 169.24522925308756
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest4/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 311.9598103151875
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest5/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 81.53334789976563
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest6/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 951.1385230588965
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest7/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 2045.3637226053593
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest8/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 304.6945704716948
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest9/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 353.43109846013
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest10/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 156.539397881387
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest11/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 825.3278459855346
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest12/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.726E+03     [ attachment = -1.723E+03 ; regularity = -3.278E+00 ]
>> Gradient at Termination: 148.00620729165294
>> CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH
>> Estimation took: 03 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->gest13/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 279.86289962540195
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->post1/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -6.796E+02     [ attachment = -6.775E+02 ; regularity = -2.088E+00 ]
>> Gradient at Termination: 1031.4915544190653
>> ABNORMAL:
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->post2/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.456E+03     [ attachment = -1.454E+03 ; regularity = -2.012E+00 ]
>> Gradient at Termination: 155.29581141432877
>> ABNORMAL:
>> Estimation took: 04 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->post3/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 761.9562670752257
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->post4/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------
>> Gradient at Termination: 325.74419379103347
>> ABNORMAL:
>> Estimation took: 01 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->post5/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -8.396E+02     [ attachment = -8.386E+02 ; regularity = -9.706E-01 ]

------------------------------------- Iteration: 40 -------------------------------------
>> Log-likelihood = -7.562E+02     [ attachment = -7.510E+02 ; regularity = -5.142E+00 ]
>> Log-likelihood = -7.533E+02     [ attachment = -7.485E+02 ; regularity = -4.836E+00 ]
>> Gradient at Termination: 424.5594798679826
>> ABNORMAL:
>> Estimation took: 05 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.
Logger has been set to: DEBUG
>> No initial CP spacing given: using diffeo kernel width of 20.0
OMP_NUM_THREADS was not found in environment variables. An automatic value will be set.
OMP_NUM_THREADS will be set to 10
context has already been set
>> No specified state-file. By default, Deformetrica state will by saved in file: results/regression_example/registrations/sub_1004B/1004B->post6/deformetrica-state.p.
>> Using a Sobolev gradient for the template data with the ScipyLBFGS estimator memory length being larger than 1. Beware: that can be tricky.
>> Set of 3 control points defined.
>> Momenta initialized to zero, for 1 subjects.
dtype=float32
>> Started estimator: ScipyOptimize

>> Scipy optimization method: L-BFGS-B

------------------------------------- Iteration: 1 -------------------------------------

------------------------------------- Iteration: 20 -------------------------------------
>> Log-likelihood = -1.499E+03     [ attachment = -1.490E+03 ; regularity = -9.082E+00 ]
>> Gradient at Termination: 853.4368250066632
>> CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH
>> Estimation took: 02 seconds
Deformetrica.__del__()
source is ignored when pole ladder is used
In exponential update, I am not flowing because I don't have any template points to flow
In exponential update, I am not flowing because I don't have any template points to flow
[ compute_shooting function ]
Defaulting geodesic t0 to 1.
Defaulting geodesic tmax to 1.
Defaulting geodesic tmin to 0.

Visualize shooting from atlases to subject last mesh#

From subject template.

[16]:
meshes = {}

for subject_id, sessions in dataset.items():
    registrations_dir = (
        REGISTRATIONS_DIR
        / _sub_id2name(subject_id)
        / plddmm.io.build_registration_name(
            subject_id,
            list(sessions.keys())[-1],
        )
    )
    print(registrations_dir)
    meshes[subject_id] = plddmm.io.load_deterministic_atlas_flow(
        registrations_dir, as_pv=True
    )
results/regression_example/registrations/sub_01/01->27
results/regression_example/registrations/sub_1001B/1001B->post4
results/regression_example/registrations/sub_1004B/1004B->post6
[17]:
pl = RegisteredMeshesGifPlotter(
    subtitle=lambda time, subj: f"{subj}, {time}",
    shape=(2, 2),
    fps=5,
)

pl.add_meshes(ppdict.DictListSwapper()(meshes))
pl.close()

pl.show()
[17]:
../../../_images/_notebooks_how_to_all_regression_across_subjects_24_0.png

From global template.

[18]:
meshes = {}

for subject_id, sessions in dataset.items():
    parallel_shoot_dir = (
        PARALLEL_SHOOT_DIR
        / _sub_id2name(subject_id)
        / plddmm.io.build_parallel_shoot_name(
            subject_id,
            "global",
            list(sessions.keys())[-1],
        )
    )
    print(parallel_shoot_dir)
    # TODO: clean io
    meshes[subject_id] = LoadMeshFlow(as_path=False)(parallel_shoot_dir)
results/regression_example/parallel_shoot/sub_01/global(t01>27)
results/regression_example/parallel_shoot/sub_1001B/global(t1001B>post4)
results/regression_example/parallel_shoot/sub_1004B/global(t1004B>post6)
[19]:
pl = RegisteredMeshesGifPlotter(
    subtitle=lambda time, subj: f"{subj}, {time}",
    shape=(2, 2),
    fps=5,
)

pl.add_meshes(ppdict.NestedDictSwapper()(meshes))
pl.close()

pl.show()
[19]:
../../../_images/_notebooks_how_to_all_regression_across_subjects_27_0.png
[20]:
last_meshes = [list(meshes.values())[-1] for meshes in meshes.values()]

(
    np.amax(np.abs(last_meshes[0].points - last_meshes[1].points)),
    np.amax(np.abs(last_meshes[0].points - last_meshes[2].points)),
)
[20]:
(np.float64(1.1753921508789062), np.float64(1.1911087036132812))

Compute velocities#

[21]:
plddmm.io.load_cp(ATLAS_DIR / "global", as_path=True)
[21]:
PosixPath('results/regression_example/atlases/global/DeterministicAtlas__EstimatedParameters__ControlPoints.txt')
[22]:
cp = {}
momenta = {}
vel = {}

atlas_cp = plddmm.io.load_cp(ATLAS_DIR / "global", as_path=False)

for subject_id, meshes in dataset.items():
    transport_dir = TRANSPORTS_DIR / _sub_id2name(subject_id)
    cp_subj = cp[subject_id] = {}
    momenta_subj = momenta[subject_id] = {}
    vel_subj = vel[subject_id] = {}

    for session_id, mesh in meshes.items():
        transport_dir_sess = transport_dir / plddmm.io.build_parallel_transport_name(
            subject_id, "global", session_id
        )

        cp_ = cp_subj[session_id] = plddmm.io.load_transported_cp(
            transport_dir_sess, as_path=False
        )
        momenta_ = momenta_subj[session_id] = plddmm.io.load_transported_momenta(
            transport_dir_sess, as_path=False
        )

        vel_subj[session_id] = plddmm.geometry.velocity_at_x(
            atlas_cp, cp_, momenta_, kernel_width=kernel_width
        )

Velocities are comparable quantities.

[23]:
vel_week = {}

for subject_id, subj_dict in vel.items():
    session2week = csvs[subject_id]["gestWeek"]
    vel_week[subject_id] = ppdict.DictMap(
        key_step=lambda session: float(session2week[session])
    )(vel[subject_id])

vel_ls = []
for subj_id, subj_vel in vel_week.items():
    for week, vels in subj_vel.items():
        vel_ls.append(
            {
                "subject": subj_id,
                "week": float(week),
                "vel": vels,
            }
        )
[24]:
df = pd.DataFrame.from_dict(vel_ls)

df.to_csv(RESULTS_DIR / "velocities.csv", index=False)
[ ]:

[ ]:

[ ]:

[ ]:
# Check that control points are the same across subjects
pl = pv.Plotter(shape=(1, 3), border=False, window_size=[1200, 300])

for i, subject_id in enumerate(SUBJECT_IDS):
    pl.subplot(0, i)
    pl.add_mesh(templates["global"], show_edges=True)
    cps = pv.PolyData(control_points[subject_id][0].cpu().numpy())
    pl.add_mesh(cps)
    # Add arrows at control points showing momenta
    # cps["vectors"] = momenta[subject_id][0].cpu().numpy()
    # pl.add_mesh(cps.glyph(orient="vectors", scale=False, factor=2),
    #             color="red", opacity=0.8)
    pl.add_text(
        f"deformation of first mesh of {subject_id} on global template",
        position="upper_edge",
        font_size=4,
    )


pl.show()
# Check that momenta are the same across subjects
[ ]:
from sklearn.linear_model import LinearRegression

X = []
y = []

for subject_id in SUBJECT_IDS:
    # Get pregnancy indices from CSV files
    subject_csv = csvs[subject_id]
    subject_momenta = momenta[subject_id]
    assert len(subject_momenta) == len(subject_csv)
    pregnancy_indices = subject_csv.reset_index().index[subject_csv["stage"] == "preg"]
    # Select corresponding pre-pregnancy meshes
    pregnancy_momenta = [subject_momenta[i] for i in pregnancy_indices]
    pregnancy_gestweek = subject_csv["gestWeek"][
        subject_csv["stage"] == "preg"
    ].tolist()
    assert len(pregnancy_gestweek) == len(pregnancy_momenta)
    print(f"Found {len(pregnancy_momenta)} pregnancy momenta")
    y.extend(pregnancy_gestweek)
    X.extend(pregnancy_momenta)


X = np.array(X).reshape(len(y), -1)
y = np.array(y)

# Standardize y to have zero mean and unit variance
y = (y - np.mean(y)) / np.std(y)


print(X.shape)
print(y.shape)
[ ]:
# Train-test split and regression
from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42
)

regression = LinearRegression()
regression.fit(X_train, y_train)

train_r2 = regression.score(X_train, y_train)
test_r2 = regression.score(X_test, y_test)

print(f"Regression coefficients: {regression.coef_}")
print(f"Regression intercept: {regression.intercept_}")
print(f"Train R2 score: {train_r2:.3f}")
print(f"Test R2 score: {test_r2:.3f}")
[ ]: