Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
IMAGINE
Commits
f910e80b
Commit
f910e80b
authored
Feb 23, 2017
by
Theo Steininger
Browse files
Model-Mixin parameters in JF12Mixin can now be accessed via an attribute.
parent
4d143aa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
imagine/observers/hammurapy/model_mixins/jf12_mixin.py
View file @
f910e80b
...
...
@@ -4,20 +4,28 @@ from imagine.magnetic_fields.jf12_magnetic_field import JF12MagneticField
class
JF12Mixin
(
object
):
def
__init__
(
self
,
hammurabi_executable
,
conf_directory
=
'./confs'
,
working_directory_base
=
'.'
,
nside
=
128
):
self
.
__parameter_dict
=
{
'B_field_type'
:
'7'
,
'B_field_do_random'
:
'T'
,
'B_analytic_beta'
:
'1.36'
,
'B_field_RMS_uG'
:
'1'
,
'B_field_interp'
:
'T'
,
'use_B_analytic'
:
'F'
,
'B_ran_mem_lim'
:
'4'
,
'obs_freq_GHz'
:
'23'
}
super
(
JF12Mixin
,
self
).
__init__
(
hammurabi_executable
,
conf_directory
,
working_directory_base
,
nside
)
@
property
def
magnetic_field_class
(
self
):
return
JF12MagneticField
def
_build_parameter_dict
(
self
,
parameter_dict
,
magnetic_field
,
working_directory
,
local_ensemble_index
):
parameter_dict
.
update
({
'B_field_type'
:
'7'
,
'B_field_do_random'
:
'T'
,
'B_analytic_beta'
:
'1.36'
,
'B_field_RMS_uG'
:
'1'
,
'B_field_interp'
:
'T'
,
'use_B_analytic'
:
'F'
,
'B_ran_mem_lim'
:
'4'
,
'obs_freq_GHz'
:
'23'
})
parameter_dict
.
update
(
self
.
__parameter_dict
)
parameter_dict
.
update
(
magnetic_field
.
parameters
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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