Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
IMAGINE
Commits
dbbce52e
Commit
dbbce52e
authored
May 13, 2018
by
Martin Reinecke
Browse files
step 1/n; not working
parent
18ac8148
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
10 additions
and
275 deletions
+10
-275
imagine/__init__.py
imagine/__init__.py
+0
-18
imagine/likelihoods/__init__.py
imagine/likelihoods/__init__.py
+3
-21
imagine/likelihoods/ensemble_likelihood.py
imagine/likelihoods/ensemble_likelihood.py
+2
-4
imagine/likelihoods/ensemble_likelihood/__init__.py
imagine/likelihoods/ensemble_likelihood/__init__.py
+0
-19
imagine/likelihoods/likelihood.py
imagine/likelihoods/likelihood.py
+3
-6
imagine/likelihoods/likelihood/__init__.py
imagine/likelihoods/likelihood/__init__.py
+0
-19
imagine/likelihoods/simple_likelihood.py
imagine/likelihoods/simple_likelihood.py
+0
-0
imagine/likelihoods/simple_likelihood/__init__.py
imagine/likelihoods/simple_likelihood/__init__.py
+0
-19
imagine/magnetic_fields/__init__.py
imagine/magnetic_fields/__init__.py
+0
-18
imagine/magnetic_fields/constant_magnetic_field/constant_magnetic_field.py
...fields/constant_magnetic_field/constant_magnetic_field.py
+1
-2
imagine/magnetic_fields/constant_magnetic_field/constant_magnetic_field_factory.py
...onstant_magnetic_field/constant_magnetic_field_factory.py
+1
-4
imagine/magnetic_fields/magnetic_field/__init__.py
imagine/magnetic_fields/magnetic_field/__init__.py
+0
-18
imagine/magnetic_fields/wmap3yr_magnetic_field/__init__.py
imagine/magnetic_fields/wmap3yr_magnetic_field/__init__.py
+0
-18
imagine/observables/__init__.py
imagine/observables/__init__.py
+0
-18
imagine/observers/__init__.py
imagine/observers/__init__.py
+0
-18
imagine/observers/hammurapy/__init__.py
imagine/observers/hammurapy/__init__.py
+0
-18
imagine/observers/hammurapy/model_mixins/__init__.py
imagine/observers/hammurapy/model_mixins/__init__.py
+0
-18
imagine/observers/hammurapy/observable_mixins/__init__.py
imagine/observers/hammurapy/observable_mixins/__init__.py
+0
-18
imagine/observers/observer.py
imagine/observers/observer.py
+0
-0
imagine/observers/observer/__init__.py
imagine/observers/observer/__init__.py
+0
-19
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
.version
import
__version__
from
likelihoods
import
*
from
likelihoods
import
*
...
...
imagine/likelihoods/__init__.py
View file @
dbbce52e
# This program is free software: you can redistribute it and/or modify
from
.likelihood
import
Likelihood
# it under the terms of the GNU General Public License as published by
from
.ensemble_likelihood
import
EnsemleLikelihood
# the Free Software Foundation, either version 3 of the License, or
from
.simple_likelihood
import
SimpleLikelihood
# (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
imagine/likelihoods/ensemble_likelihood
/ensemble_likelihood
.py
→
imagine/likelihoods/ensemble_likelihood.py
View file @
dbbce52e
...
@@ -17,10 +17,8 @@
...
@@ -17,10 +17,8 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
# and financially supported by the Studienstiftung des deutschen Volkes.
import
numpy
as
np
import
numpy
as
np
from
nifty4
import
Field
from
nifty
import
Field
from
.likelihood
import
Likelihood
from
imagine.likelihoods.likelihood
import
Likelihood
class
EnsembleLikelihood
(
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 @@
...
@@ -17,10 +17,7 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
# and financially supported by the Studienstiftung des deutschen Volkes.
import
abc
import
abc
import
nifty4
as
ift
from
keepers
import
Loggable
from
nifty
import
FieldArray
class
Likelihood
(
Loggable
,
object
):
class
Likelihood
(
Loggable
,
object
):
...
@@ -29,12 +26,12 @@ class Likelihood(Loggable, object):
...
@@ -29,12 +26,12 @@ class Likelihood(Loggable, object):
raise
NotImplementedError
raise
NotImplementedError
def
_strip_data
(
self
,
data
):
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
# extract the data
if
not
hasattr
(
data
,
'domain'
):
if
not
hasattr
(
data
,
'domain'
):
return
data
return
data
if
isinstance
(
data
.
domain
[
0
],
FieldArray
):
if
isinstance
(
data
.
domain
[
0
],
ift
.
UnstructuredDomain
):
data
=
data
.
val
.
get_full_data
()[
0
]
data
=
data
.
val
.
get_full_data
()[
0
]
else
:
else
:
data
=
data
.
val
.
get_full_data
()
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
,
\
from
magnetic_field
import
MagneticField
,
\
MagneticFieldFactory
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
...
@@ -22,8 +22,7 @@ from imagine.magnetic_fields.magnetic_field import MagneticField
class
ConstantMagneticField
(
MagneticField
):
class
ConstantMagneticField
(
MagneticField
):
@
property
@
property
def
parameter_list
(
self
):
def
parameter_list
(
self
):
parameter_list
=
[
'b_x'
,
'b_y'
,
'b_z'
]
return
[
'b_x'
,
'b_y'
,
'b_z'
]
return
parameter_list
def
_create_field
(
self
):
def
_create_field
(
self
):
val
=
self
.
cast
(
None
)
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):
...
@@ -31,10 +31,7 @@ class ConstantMagneticFieldFactory(MagneticFieldFactory):
@
property
@
property
def
_initial_parameter_defaults
(
self
):
def
_initial_parameter_defaults
(
self
):
defaults
=
{
'b_x'
:
0
,
return
dict
(
b_x
=
0
,
b_y
=
0
,
b_z
=
0
)
'b_y'
:
0
,
'b_z'
:
0
}
return
defaults
@
property
@
property
def
_initial_variable_to_parameter_mappings
(
self
):
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
import
MagneticField
from
magnetic_field_factory
import
MagneticFieldFactory
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
import
WMAP3yrMagneticField
from
wmap3yr_magnetic_field_factory
import
WMAP3yrMagneticFieldFactory
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
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
observer
import
Observer
from
hammurapy
import
*
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
observable_mixins
import
*
from
model_mixins
import
*
from
model_mixins
import
*
from
hammurapy
import
Hammurapy
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
magnetic_field_model
import
MagneticFieldModel
from
wmap3yr_mixin
import
WMAP3yrMixin
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
observable_mixin
import
ObservableMixin
from
dm_mixin
import
DMMixin
from
dm_mixin
import
DMMixin
from
fd_mixin
import
FDMixin
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
Prev
1
2
Next
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