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
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
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