Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 55d10c72 authored by Martin Genet's avatar Martin Genet
Browse files

Adding equilibrated regularization

parent 81f949e2
No related branches found
No related tags found
No related merge requests found
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import dolfin
import glob
......@@ -17,7 +17,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def compute_displacement_error(
sol_folder,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import dolfin
import glob
......@@ -18,7 +18,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def compute_displacements(
sol_folder,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import dolfin
import numpy
......@@ -16,7 +16,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def compute_quadrature_degree_from_points_count(
image_filename,
......@@ -79,7 +79,7 @@ def compute_quadrature_degree_from_points_count(
return degree
########################################################################
################################################################################
def compute_quadrature_degree_from_integral(
image_filename,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import dolfin
import glob
......@@ -17,7 +17,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def compute_strains(
sol_folder,
......
#coding=utf8
########################################################################
### ###
################################################################################
### ###
### Created by Martin Genet, 2012-2016 ###
### ###
### ###
### University of California at San Francisco (UCSF), USA ###
### Swiss Federal Institute of Technology (ETH), Zurich, Switzerland ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import glob
import numpy
......@@ -19,7 +19,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def compute_unwarped_images(
images_folder,
......
#coding=utf8
########################################################################
### ###
################################################################################
### ###
### Created by Martin Genet, 2012-2016 ###
### ###
### ###
### University of California at San Francisco (UCSF), USA ###
### Swiss Federal Institute of Technology (ETH), Zurich, Switzerland ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import glob
import numpy
......@@ -19,7 +19,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def compute_warped_images(
ref_image_folder,
......
#coding=utf8
########################################################################
### ###
################################################################################
### ###
### Created by Martin Genet, 2012-2016 ###
### ###
### ###
### University of California at San Francisco (UCSF), USA ###
### Swiss Federal Institute of Technology (ETH), Zurich, Switzerland ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import numpy
import os
......@@ -19,7 +19,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def compute_warped_mesh(
mesh_folder,
......
This diff is collapsed.
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import glob
import math
......@@ -20,7 +20,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
#class ImagesInfo():
#def __init__(self, n_dim, L, n_voxels, n_integration, T, n_frames, data_type, images_folder, images_basename):
......@@ -94,7 +94,7 @@ import dolfin_dic as ddic
#def __init__(self, type, **kwargs):
#self["type"] = type
########################################################################
################################################################################
class Image():
def __init__(self, images, structure, texture, noise):
......@@ -262,7 +262,7 @@ class Image():
i[0] += random.normalvariate(self.avg, self.std)
#if (g is not None): g[k] += [2*random.normalvariate(self.avg, self.std) for k in xrange(len(g))]
########################################################################
################################################################################
class Mapping:
def __init__(self, images, structure, deformation, evolution):
......@@ -484,7 +484,7 @@ class Mapping:
#F[:] = numpy.dot(numpy.transpose(self.R), numpy.dot(F, self.R))
##print "F = "+str(F)
########################################################################
################################################################################
def generateImages(
images,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import numpy
import vtk
......@@ -16,7 +16,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def generateUndersampledImages(
images,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
################################################################################
def get_ExprIm_cpp(
im_dim,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import dolfin
import numpy
......@@ -16,7 +16,7 @@ import myVTKPythonLibrary as myvtk
import dolfin_dic as ddic
########################################################################
################################################################################
def getScalingFactor(scalar_type_as_string):
if (scalar_type_as_string == 'unsigned char' ): return float(2**8 -1)
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import math
import numpy
import os
import sys
########################################################################
################################################################################
def plot_binned_strains_vs_radius(
working_folder,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import math
import numpy
import os
import sys
########################################################################
################################################################################
def plot_displacement_error(
working_folder,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import os
########################################################################
################################################################################
def plot_strains(
working_folder,
......
#coding=utf8
########################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
########################################################################
################################################################################
### ###
### Created by Martin Genet, 2016-2017 ###
### ###
### École Polytechnique, Palaiseau, France ###
### ###
################################################################################
import math
import numpy
import os
import sys
########################################################################
################################################################################
def plot_strains_vs_radius(
working_folder,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment