-
Notifications
You must be signed in to change notification settings - Fork 23
/
setup.py
42 lines (37 loc) · 2.29 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from distutils.core import setup, Extension
import sys
import os, os.path
import re
srcDir= 'src'
srcFiles= ['src/bovy_randvec.c','src/calc_splitnmerge.c',
'src/logsum.c','src/minmax.c','src/normalize_row.c','src/proj_EM.c',
'src/proj_EM_step.c','src/proj_gauss_mixtures.c',
'src/splitnmergegauss.c','src/bovy_det.c',
'src/proj_gauss_mixtures_IDL.c']
libraries=['m','gsl','gslcblas','gomp']
#Option to forego OpenMP
try:
openmp_pos = sys.argv.index('--no-openmp')
except ValueError:
extra_compile_args=["-fopenmp"]
else:
del sys.argv[openmp_pos]
extra_compile_args= ["-DNO_OMP"]
libraries.remove('gomp')
longDescription= "We present a general algorithm to infer a d-dimensional distribution function given a set of heterogeneous, noisy observations or samples. This algorithm reconstructs the error-deconvolved or 'underlying' distribution function common to all samples, even when the individual samples have unique error and missing-data properties. The underlying distribution is modeled as a mixture of Gaussians, which is completely general. Model parameters are chosen to optimize a justified, scalar objective function: the logarithm of the probability of the data under the error-convolved model, where the error convolution is different for each data point. Optimization is performed by an Expectation Maximization (EM) algorithm, extended by a regularization technique and 'split-and-merge' procedure. These extensions mitigate problems with singularities and local maxima, which are often encountered when using the EM algorithm to estimate Gaussian density mixtures."
setup(name='extreme-deconvolution',
version='1.3',
description='Density estimation using Gaussian mixtures in the presence of noisy, heterogeneous and incomplete data',
author='Jo Bovy',
author_email='[email protected]',
license='BSD',
long_description=longDescription,
url='http://code.google.com/p/extreme-deconvolution/',
package_dir = {'extreme_deconvolution': 'py'},
ext_modules=[Extension('extreme_deconvolution._extreme_deconvolution',
srcFiles,
libraries=libraries,
extra_compile_args=extra_compile_args)],
include_dirs=['src/'],
packages=['extreme_deconvolution']
)