Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IMAGINE
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
IMAGINE
Commits
dbbce52e
Commit
dbbce52e
authored
May 13, 2018
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
step 1/n; not working
parent
18ac8148
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
14 additions
and
353 deletions
+14
-353
__init__.py
imagine/__init__.py
+0
-18
__init__.py
imagine/likelihoods/__init__.py
+3
-21
ensemble_likelihood.py
imagine/likelihoods/ensemble_likelihood.py
+2
-4
__init__.py
imagine/likelihoods/ensemble_likelihood/__init__.py
+0
-19
likelihood.py
imagine/likelihoods/likelihood.py
+3
-6
__init__.py
imagine/likelihoods/likelihood/__init__.py
+0
-19
simple_likelihood.py
imagine/likelihoods/simple_likelihood.py
+0
-0
__init__.py
imagine/likelihoods/simple_likelihood/__init__.py
+0
-19
__init__.py
imagine/magnetic_fields/__init__.py
+0
-18
constant_magnetic_field.py
...fields/constant_magnetic_field/constant_magnetic_field.py
+1
-2
constant_magnetic_field_factory.py
...onstant_magnetic_field/constant_magnetic_field_factory.py
+1
-4
__init__.py
imagine/magnetic_fields/magnetic_field/__init__.py
+0
-18
__init__.py
imagine/magnetic_fields/wmap3yr_magnetic_field/__init__.py
+0
-18
__init__.py
imagine/observables/__init__.py
+0
-18
__init__.py
imagine/observers/__init__.py
+0
-18
__init__.py
imagine/observers/hammurapy/__init__.py
+0
-18
__init__.py
imagine/observers/hammurapy/model_mixins/__init__.py
+0
-18
__init__.py
imagine/observers/hammurapy/observable_mixins/__init__.py
+0
-18
observer.py
imagine/observers/observer.py
+0
-0
__init__.py
imagine/observers/observer/__init__.py
+0
-19
__init__.py
imagine/priors/__init__.py
+2
-20
flat_prior.py
imagine/priors/flat_prior.py
+0
-0
__init__.py
imagine/priors/flat_prior/__init__.py
+0
-19
prior.py
imagine/priors/prior.py
+0
-0
__init__.py
imagine/priors/prior/__init__.py
+0
-19
__init__.py
imagine/pymultinest_importer/__init__.py
+0
-18
setup.py
setup.py
+2
-2
No files found.
imagine/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
.version
import
__version__
from
likelihoods
import
*
...
...
imagine/likelihoods/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
likelihood
import
Likelihood
from
ensemble_likelihood
import
*
from
simple_likelihood
import
SimpleLikelihood
from
.likelihood
import
Likelihood
from
.ensemble_likelihood
import
EnsemleLikelihood
from
.simple_likelihood
import
SimpleLikelihood
imagine/likelihoods/ensemble_likelihood
/ensemble_likelihood
.py
→
imagine/likelihoods/ensemble_likelihood.py
View file @
dbbce52e
...
...
@@ -17,10 +17,8 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import
numpy
as
np
from
nifty
import
Field
from
imagine.likelihoods.likelihood
import
Likelihood
from
nifty4
import
Field
from
.likelihood
import
Likelihood
class
EnsembleLikelihood
(
Likelihood
):
...
...
imagine/likelihoods/ensemble_likelihood/__init__.py
deleted
100644 → 0
View file @
18ac8148
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
ensemble_likelihood
import
EnsembleLikelihood
imagine/likelihoods/likelihood
/likelihood
.py
→
imagine/likelihoods/likelihood.py
View file @
dbbce52e
...
...
@@ -17,10 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import
abc
from
keepers
import
Loggable
from
nifty
import
FieldArray
import
nifty4
as
ift
class
Likelihood
(
Loggable
,
object
):
...
...
@@ -29,12 +26,12 @@ class Likelihood(Loggable, object):
raise
NotImplementedError
def
_strip_data
(
self
,
data
):
# if the first element in the domain tuple is
a FieldArray
we must
# if the first element in the domain tuple is
unstructured,
we must
# extract the data
if
not
hasattr
(
data
,
'domain'
):
return
data
if
isinstance
(
data
.
domain
[
0
],
FieldArray
):
if
isinstance
(
data
.
domain
[
0
],
ift
.
UnstructuredDomain
):
data
=
data
.
val
.
get_full_data
()[
0
]
else
:
data
=
data
.
val
.
get_full_data
()
...
...
imagine/likelihoods/likelihood/__init__.py
deleted
100644 → 0
View file @
18ac8148
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
likelihood
import
Likelihood
imagine/likelihoods/simple_likelihood
/simple_likelihood
.py
→
imagine/likelihoods/simple_likelihood.py
View file @
dbbce52e
File moved
imagine/likelihoods/simple_likelihood/__init__.py
deleted
100644 → 0
View file @
18ac8148
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
simple_likelihood
import
SimpleLikelihood
imagine/magnetic_fields/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
magnetic_field
import
MagneticField
,
\
MagneticFieldFactory
...
...
imagine/magnetic_fields/constant_magnetic_field/constant_magnetic_field.py
View file @
dbbce52e
...
...
@@ -22,8 +22,7 @@ from imagine.magnetic_fields.magnetic_field import MagneticField
class
ConstantMagneticField
(
MagneticField
):
@
property
def
parameter_list
(
self
):
parameter_list
=
[
'b_x'
,
'b_y'
,
'b_z'
]
return
parameter_list
return
[
'b_x'
,
'b_y'
,
'b_z'
]
def
_create_field
(
self
):
val
=
self
.
cast
(
None
)
...
...
imagine/magnetic_fields/constant_magnetic_field/constant_magnetic_field_factory.py
View file @
dbbce52e
...
...
@@ -31,10 +31,7 @@ class ConstantMagneticFieldFactory(MagneticFieldFactory):
@
property
def
_initial_parameter_defaults
(
self
):
defaults
=
{
'b_x'
:
0
,
'b_y'
:
0
,
'b_z'
:
0
}
return
defaults
return
dict
(
b_x
=
0
,
b_y
=
0
,
b_z
=
0
)
@
property
def
_initial_variable_to_parameter_mappings
(
self
):
...
...
imagine/magnetic_fields/magnetic_field/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
magnetic_field
import
MagneticField
from
magnetic_field_factory
import
MagneticFieldFactory
imagine/magnetic_fields/wmap3yr_magnetic_field/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
wmap3yr_magnetic_field
import
WMAP3yrMagneticField
from
wmap3yr_magnetic_field_factory
import
WMAP3yrMagneticFieldFactory
imagine/observables/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
observable
import
Observable
imagine/observers/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
observer
import
Observer
from
hammurapy
import
*
imagine/observers/hammurapy/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
observable_mixins
import
*
from
model_mixins
import
*
from
hammurapy
import
Hammurapy
imagine/observers/hammurapy/model_mixins/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
magnetic_field_model
import
MagneticFieldModel
from
wmap3yr_mixin
import
WMAP3yrMixin
imagine/observers/hammurapy/observable_mixins/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
observable_mixin
import
ObservableMixin
from
dm_mixin
import
DMMixin
from
fd_mixin
import
FDMixin
...
...
imagine/observers/observer
/observer
.py
→
imagine/observers/observer.py
View file @
dbbce52e
File moved
imagine/observers/observer/__init__.py
deleted
100644 → 0
View file @
18ac8148
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
observer
import
Observer
imagine/priors/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
prior
import
Prior
from
flat_prior
import
FlatPrior
from
.prior
import
Prior
from
.flat_prior
import
FlatPrior
imagine/priors/flat_prior
/flat_prior
.py
→
imagine/priors/flat_prior.py
View file @
dbbce52e
File moved
imagine/priors/flat_prior/__init__.py
deleted
100644 → 0
View file @
18ac8148
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
flat_prior
import
FlatPrior
imagine/priors/prior
/prior
.py
→
imagine/priors/prior.py
View file @
dbbce52e
File moved
imagine/priors/prior/__init__.py
deleted
100644 → 0
View file @
18ac8148
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
prior
import
Prior
imagine/pymultinest_importer/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2017 Max-Planck-Society
#
# IMAGINE is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from
pymultinest_importer
import
pymultinest
setup.py
View file @
dbbce52e
...
...
@@ -41,8 +41,8 @@ setup(name = "imagine",
package_data
=
{
'imagine.observers.hammurapy'
:
[
'input/*'
],},
package_dir
=
{
"imagine"
:
"imagine"
},
dependency_links
=
[
'git+https://gitlab.mpcdf.mpg.de/ift/nifty.git/
@NIFTy_3#egg=ift_nifty-3.0.3
'
],
install_requires
=
[
'
ift_nifty>=3.0.3
'
,
'simplejson'
],
'git+https://gitlab.mpcdf.mpg.de/ift/nifty.git/
#egg=nifty4-4.2.0
'
],
install_requires
=
[
'
nifty4>=4.2.0
'
,
'simplejson'
],
zip_safe
=
False
,
classifiers
=
[
"Development Status :: 4 - Beta"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment