Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
IMAGINE
Commits
141d2f2a
Commit
141d2f2a
authored
Nov 30, 2017
by
Theo Steininger
Browse files
updated default_parameters.xml to newest version.
parent
2b7650af
Changes
6
Hide whitespace changes
Inline
Side-by-side
imagine/likelihoods/__init__.py
View file @
141d2f2a
...
...
@@ -2,3 +2,4 @@
from
likelihood
import
Likelihood
from
ensemble_likelihood
import
*
from
simple_likelihood
import
SimpleLikelihood
imagine/likelihoods/simple_likelihood/__init__.py
View file @
141d2f2a
# -*- coding: utf-8 -*-
from
simple_likelihood
import
SimpleLikelihood
imagine/observers/hammurapy/input/default_parameters.xml
View file @
141d2f2a
...
...
@@ -4,15 +4,14 @@
<!-- email, jiwang@sissa.it -->
<!-- "cue", switches for usage -->
<root>
<O
utp
ut>
<!-- observable output -->
<O
bso
ut>
</Output>
</Obsout>
<!-- physical field grid in/out -->
<!-- resolution defined in './Grid/Box' -->
<!-- CRE field resolution defined in './CRE/Numeric' -->
<
Interface
>
<
Fieldout
>
<!-- regular magnetic field -->
<breg_grid
read=
"0"
write=
"0"
filename=
"breg.bin"
/>
<!-- turbulent magnetic field -->
...
...
@@ -23,21 +22,21 @@
<fernd_grid
read=
"0"
write=
"0"
filename=
"fernd.bin"
/>
<!-- cosmic ray electron field -->
<cre_grid
read=
"0"
write=
"0"
filename=
"cre.bin"
/>
</
Interface
>
</
Fieldout
>
<!--
main
field grid -->
<Grid
type=
"3D"
>
<!-- field
& observable
grid -->
<Grid>
<SunPosition>
<x
value=
"-8.3"
/>
<!-- kpc -->
<y
value=
"0"
/>
<!-- kpc -->
<z
value=
"6"
/>
<!-- pc -->
</SunPosition>
<!-- field grid -->
<Box>
<!-- grid vertex number -->
<nx
value=
"
4
00"
/>
<ny
value=
"
4
00"
/>
<nz
value=
"
8
0"
/>
<nx
value=
"
8
00"
/>
<ny
value=
"
8
00"
/>
<nz
value=
"
16
0"
/>
<!-- box limit, in Galactic-centric frame -->
<x_min
value=
"-20.0"
/>
<!-- kpc -->
<x_max
value=
"20.0"
/>
<!-- kpc -->
...
...
@@ -49,214 +48,219 @@
<!-- LOS integration setting -->
<Integration>
<shell
type=
"auto"
>
<!-- default setting of shells -->
<auto>
<shell_num
value=
"1"
/>
<!-- total shell number -->
<nside_min
value=
"
64
"
/>
<!-- inner most shell resolution -->
<nside_min
value=
"
32
"
/>
<!-- inner most shell resolution -->
</auto>
<!-- set shell resolution from inside out -->
<!-- total shell number calculated automatically -->
<manual>
<manual>
<!-- total shell number calculated automatically -->
<nside
value=
"32"
/>
<!-- inner most shell Nside -->
<nside
value=
"16"
/>
</manual>
</shell>
<nside_sim
value=
"
64
"
/>
<!-- output map resolution -->
<nside_sim
value=
"
32
"
/>
<!-- output map resolution -->
<!-- maximum radius in earth/Galactic centric frame -->
<ec_r_max
value=
"30.0"
/>
<!-- kpc -->
<gc_r_max
value=
"20.0"
/>
<!-- kpc -->
<!-- maximum height in galactic centric frame -->
<gc_z_max
value=
"10.0"
/>
<!-- kpc -->
<!-- radial resolution -->
<ec_r_res
value=
"0.
1
"
/>
<!-- kpc -->
<ec_r_res
value=
"0.
5
"
/>
<!-- kpc -->
<!-- galactic latitude lower limit -->
<lat_lim
value=
"0."
/>
<!-- [0,90] -->
</Integration>
</Grid>
<!-- galaxy settings -->
<Galaxy>
<!-- magnetic fields -->
<MagneticField>
<!-- regular fields -->
<Regular
type=
"WMAP"
>
<!-- WMAP3yr -->
<WMAP>
<b0
value=
"2.0"
/>
<psi0
value=
"27.0"
/>
<psi1
value=
"0.9"
/>
<chi0
value=
"25.0"
/>
</WMAP>
<!-- verification -->
<Verify>
<b0
value=
"2.0"
/>
<l0
value=
"70"
/>
<r
value=
"0.3"
/>
</Verify>
</Regular>
<!-- turbulent fields -->
<!-- seed works for IMAGINE -->
<Random
cue=
"0"
type=
"Anisolocal"
seed=
"0"
>
<!-- isotropic -->
<Iso>
<rms
value=
"0.1"
/>
<!-- norm at k0 -->
<k0
value=
"0.5"
/>
<!-- cutoff, 1/(Lambda in kpc) -->
<a0
value=
"1.7"
/>
<!-- 5/3, Kolmogorov -->
</Iso>
<!-- global anisotropy -->
<Anisoglob>
<rho
value=
"0.5"
/>
</Anisoglob>
<!-- local turbulent -->
<Anisolocal>
<rms
value=
"1"
/>
<!-- Alfven RMS -->
<rf
value=
"1.0"
/>
<!-- fast to Alfven ratio -->
<rs
value=
"1.0"
/>
<!-- slow to Alfven ratio -->
<aa0
value=
"1.7"
/>
<!-- Kolmogorov -->
<af0
value=
"1.5"
/>
<as0
value=
"1.7"
/>
<k0
value=
"0.5"
/>
<!-- cutoff, 1/(Lambda in kpc) -->
<beta
value=
"0.1"
/>
<!-- plasma beta -->
<ma
value=
"0.5"
/>
<!-- Alfven Mach number -->
</Anisolocal>
<!-- magnetic fields -->
<MagneticField>
<!-- regular fields -->
<Regular
type=
"WMAP"
>
<!-- WMAP LSA -->
<WMAP>
<b0
value=
"1.2"
/>
<!-- microG -->
<psi0
value=
"27.0"
/>
<!-- deg -->
<psi1
value=
"0.9"
/>
<!-- deg -->
<chi0
value=
"25.0"
/>
<!-- deg -->
</WMAP>
<!-- Jaffe -->
<Jaffe>
<quadruple
cue=
"0"
/>
<!-- quadruple pattern in halo -->
<bss
cue=
"0"
/>
<!-- bi-symmetric -->
<disk_amp
value=
"0.167"
/>
<!-- disk amplitude, microG -->
<disk_z0
value=
"0.1"
/>
<!-- disk height scale, kpc -->
<halo_amp
value=
"1.38"
/>
<!-- halo amplitude, microG -->
<halo_z0
value=
"3.0"
/>
<!-- halo height scale, kpc -->
<r_inner
value=
"0.5"
/>
<!-- inner R scale, kpc -->
<r_scale
value=
"20"
/>
<!-- R scale, kpc -->
<r_peak
value=
"0"
/>
<!-- R peak, kpc -->
<ring
cue=
"0"
/>
<!-- molecular ring -->
<bar
cue=
"1"
/>
<!-- elliptical bar -->
<!-- either ring or bar -->
<ring_amp
value=
"0.023"
/>
<!-- ring field amplitude, microG -->
<ring_r
value=
"5.0"
/>
<!-- ring radius, kpc -->
<bar_amp
value=
"0.023"
/>
<!-- bar field amplitude, microG -->
<bar_a
value=
"5.0"
/>
<!-- major scale, kpc -->
<bar_b
value=
"3.0"
/>
<!-- minor scale, kpc -->
<bar_phi0
value=
"45.0"
/>
<!-- bar major direction -->
<arm_num
value=
"4"
/>
<!-- spiral arms -->
<arm_r0
value=
"7.1"
/>
<!-- arm ref radius -->
<arm_z0
value=
"0.1"
/>
<!-- arm heigth scale, kpc -->
<arm_phi1
value=
"70"
/>
<!-- arm ref angles, deg -->
<arm_phi2
value=
"160"
/>
<arm_phi3
value=
"250"
/>
<arm_phi4
value=
"340"
/>
<arm_amp1
value=
"2"
/>
<!-- arm field amplitudes, microG -->
<arm_amp2
value=
"0.133"
/>
<arm_amp3
value=
"-3.78"
/>
<arm_amp4
value=
"0.32"
/>
<arm_pitch
value=
"11.5"
/>
<!-- pitch angle, deg -->
<comp_c
value=
"0.5"
/>
<!-- compress factor -->
<comp_d
value=
"0.3"
/>
<!-- arm cross-sec scale, kpc -->
<comp_r
value=
"12"
/>
<!-- radial cutoff scale, kpc -->
<comp_p
value=
"3"
/>
<!-- cutoff power -->
</Jaffe>
<!-- verification -->
<Verify>
<b0
value=
"2.0"
/>
<!-- microG -->
<l0
value=
"70"
/>
<!-- deg -->
<r
value=
"0.3"
/>
</Verify>
</Regular>
<!-- turbulent fields -->
<Random
cue=
"0"
type=
"Local"
seed=
"0"
>
<!-- global anisotropy -->
<Global>
<rms
value=
"0.8"
/>
<!-- RMS at k0 -->
<k0
value=
"0.5"
/>
<!-- cutoff, 1/(Lambda in kpc) -->
<a0
value=
"1.7"
/>
<!-- 5/3, Kolmogorov -->
<rho
value=
"0.5"
/>
<!-- [0,1] -->
<!-- energy density rescaling -->
<Rescal>
<r0
value=
"8.0"
/>
<!-- in kpc -->
<z0
value=
"1.0"
/>
<!-- in kpc -->
</Rescal>
</Random>
</MagneticField>
<!-- free electron field -->
<FreeElectron>
<Regular
type=
"YMW16"
>
<!-- YMW16 -->
<YMW16>
<Warp>
<R_warp
value=
"8.4"
/>
<Gamma_w
value=
"0.14"
/>
<R0
value=
"8.3"
/>
</Warp>
<ThickDisk>
<Ad
value=
"2500"
/>
<Bd
value=
"15000"
/>
<n1
value=
"0.01132"
/>
<H1
value=
"1673"
/>
</ThickDisk>
<ThinDisk>
<A2
value=
"1200"
/>
<B2
value=
"4000"
/>
<n2
value=
"0.404"
/>
<K2
value=
"1.54"
/>
</ThinDisk>
<!-- using HH14 SpiralArms -->
<SpiralArm>
<B2s
value=
"4000"
/>
<Ele_arm_0
value=
"0.135000"
/>
<Ele_arm_1
value=
"0.129000"
/>
<Ele_arm_2
value=
"0.103000"
/>
<Ele_arm_3
value=
"0.116000"
/>
<Ele_arm_4
value=
"0.005700"
/>
<Wid_arm_0
value=
"300"
/>
<Wid_arm_1
value=
"500"
/>
<Wid_arm_2
value=
"300"
/>
<Wid_arm_3
value=
"500"
/>
<Wid_arm_4
value=
"300"
/>
<Aa
value=
"11680"
/>
<Ka
value=
"5.015"
/>
<ncn
value=
"2.4"
/>
<wcn
value=
"8.2"
/>
<thetacn
value=
"109"
/>
<nsg
value=
"0.626"
/>
<wsg
value=
"20"
/>
<thetasg
value=
"75.8"
/>
</SpiralArm>
<GalCenter>
<ngc
value=
"6.2"
/>
<Agc
value=
"160"
/>
<Hgc
value=
"35"
/>
</GalCenter>
<GumNebula>
<ngn
value=
"1.84"
/>
<Wgn
value=
"15.1"
/>
<Agn
value=
"125.8"
/>
<Kgn
value=
"1.4"
/>
</GumNebula>
<LocalBubble>
<J_LB
value=
"0.480"
/>
<nlb1
value=
"1.094"
/>
<detlb1
value=
"28.4"
/>
<wlb1
value=
"14.2"
/>
<hlb1
value=
"112.9"
/>
<thetalb1
value=
"195.4"
/>
<nlb2
value=
"2.33"
/>
<detlb2
value=
"14.7"
/>
<wlb2
value=
"15.6"
/>
<hlb2
value=
"43.6"
/>
<thetalb2
value=
"278.2"
/>
</LocalBubble>
<LoopI>
<nLI
value=
"1.907"
/>
<RLI
value=
"80.0"
/>
<WLI
value=
"15.0"
/>
<detthetaLI
value=
"30.0"
/>
<thetaLI
value=
"40.0"
/>
</LoopI>
</YMW16>
<!-- verification -->
<Verify>
<n0
value=
"0.01"
/>
<!-- pccm -->
<r0
value=
"3.0"
/>
<!-- kpc -->
</Verify>
</Regular>
<!-- turbulent free electron -->
<Random
cue=
"0"
type=
"Iso"
seed=
"0"
>
<Iso>
<rms
value=
"1.0"
/>
<k0
value=
"2.0"
/>
<!-- cutoff 1/Lambda in kpc -->
<a0
value=
"-1.7"
/>
</Iso>
<r0
value=
"8.0"
/>
<!-- in kpc -->
<z0
value=
"1.0"
/>
<!-- in kpc -->
</Global>
<!-- local turbulent -->
<Local>
<pa0
value=
"1"
/>
<!-- Alfven power norm at k0 -->
<pf0
value=
"1"
/>
<!-- fast power norm at k0 -->
<ps0
value=
"1"
/>
<!-- slow power norm at k0 -->
<aa0
value=
"1.7"
/>
<!-- Kolmogorov -->
<af0
value=
"1.5"
/>
<as0
value=
"1.7"
/>
<k0
value=
"0.5"
/>
<!-- cutoff, 1/(Lambda in kpc) -->
<beta
value=
"0.1"
/>
<!-- plasma beta -->
<ma
value=
"0.5"
/>
<!-- Alfven Mach number -->
</Local>
<!-- Jaffe turbulent -->
<Jaffe>
</Jaffe>
</Random>
</MagneticField>
<!-- free electron field -->
<FreeElectron>
<Regular
type=
"YMW16"
>
<!-- YMW16 -->
<YMW16>
<Warp>
<R_warp
value=
"8.4"
/>
<!-- Galactic warp, kpc -->
<Gamma_w
value=
"0.14"
/>
<!-- warp ratio -->
<R0
value=
"8.3"
/>
<!-- Sun radial position, kpc -->
</Warp>
<ThickDisk>
<Ad
value=
"2500"
/>
<Bd
value=
"15000"
/>
<n1
value=
"0.01132"
/>
<H1
value=
"1673"
/>
</ThickDisk>
<ThinDisk>
<A2
value=
"1200"
/>
<B2
value=
"4000"
/>
<n2
value=
"0.404"
/>
<K2
value=
"1.54"
/>
</ThinDisk>
<!-- using HH14 SpiralArms -->
<SpiralArm>
<B2s
value=
"4000"
/>
<Ele_arm_0
value=
"0.135000"
/>
<Ele_arm_1
value=
"0.129000"
/>
<Ele_arm_2
value=
"0.103000"
/>
<Ele_arm_3
value=
"0.116000"
/>
<Ele_arm_4
value=
"0.005700"
/>
<Wid_arm_0
value=
"300"
/>
<Wid_arm_1
value=
"500"
/>
<Wid_arm_2
value=
"300"
/>
<Wid_arm_3
value=
"500"
/>
<Wid_arm_4
value=
"300"
/>
<Aa
value=
"11680"
/>
<Ka
value=
"5.015"
/>
<ncn
value=
"2.4"
/>
<wcn
value=
"8.2"
/>
<thetacn
value=
"109"
/>
<nsg
value=
"0.626"
/>
<wsg
value=
"20"
/>
<thetasg
value=
"75.8"
/>
</SpiralArm>
<GalCenter>
<ngc
value=
"6.2"
/>
<Agc
value=
"160"
/>
<Hgc
value=
"35"
/>
</GalCenter>
<GumNebula>
<ngn
value=
"1.84"
/>
<Wgn
value=
"15.1"
/>
<Agn
value=
"125.8"
/>
<Kgn
value=
"1.4"
/>
</GumNebula>
<LocalBubble>
<J_LB
value=
"0.480"
/>
<nlb1
value=
"1.094"
/>
<detlb1
value=
"28.4"
/>
<wlb1
value=
"14.2"
/>
<hlb1
value=
"112.9"
/>
<thetalb1
value=
"195.4"
/>
<nlb2
value=
"2.33"
/>
<detlb2
value=
"14.7"
/>
<wlb2
value=
"15.6"
/>
<hlb2
value=
"43.6"
/>
<thetalb2
value=
"278.2"
/>
</LocalBubble>
<LoopI>
<nLI
value=
"1.907"
/>
<RLI
value=
"80.0"
/>
<WLI
value=
"15.0"
/>
<detthetaLI
value=
"30.0"
/>
<thetaLI
value=
"40.0"
/>
</LoopI>
</YMW16>
<!-- verification -->
<Verify>
<n0
value=
"0.01"
/>
<!-- pccm -->
<r0
value=
"3.0"
/>
<!-- kpc -->
</Verify>
</Regular>
<!-- turbulent free electron -->
<Random
cue=
"0"
type=
"Global"
seed=
"0"
>
<Global>
<rms
value=
"1.0"
/>
<k0
value=
"2.0"
/>
<!-- cutoff 1/Lambda in kpc -->
<a0
value=
"-1.7"
/>
<!-- field strength rescaling -->
<Rescal>
<r0
value=
"8.0"
/>
<!-- in kpc -->
<z0
value=
"1.0"
/>
<!-- in kpc -->
</Rescal>
</Random>
</FreeElectron>
<!-- spiral arms setting -->
<SpiralArms
type=
"HH14"
>
<!-- Hou & Han, A&A 569 A125 (2014), used in YMW16, R0=8.3 -->
<HH14>
<NumArms
value=
"5"
/>
<R_1
value=
"3.35"
/>
<!-- Noma-Outer Arm -->
<R_2
value=
"3.71"
/>
<!-- Peseus Arm -->
<R_3
value=
"3.56"
/>
<!-- Carina-Segittarius Arm -->
<R_4
value=
"3.67"
/>
<!-- Crux-Scutum Arm -->
<R_5
value=
"8.21"
/>
<!-- Local Arm -->
<phi_1
value=
"44.4"
/>
<phi_2
value=
"120.0"
/>
<phi_3
value=
"218.6"
/>
<phi_4
value=
"330.3"
/>
<phi_5
value=
"55.1"
/>
<psi_1
value=
"11.43"
/>
<psi_2
value=
"9.84"
/>
<psi_3
value=
"10.38"
/>
<psi_4
value=
"10.64"
/>
<psi_5
value=
"2.77"
/>
</HH14>
</SpiralArms>
</Galaxy>
<r0
value=
"8.0"
/>
<!-- in kpc -->
<z0
value=
"1.0"
/>
<!-- in kpc -->
</Global>
<Local>
</Local>
</Random>
</FreeElectron>
<!-- analytic/numeric CRE -->
<CRE
type=
"Analytic"
>
<!-- verification -->
<Verify>
<alpha
value=
"3.0"
/>
<r0
value=
"3.0"
/>
<!-- kpc -->
<je
value=
"0.25"
/>
<!-- local CRE flux norm factor @ 10GeV -->
</Verify>
<Analytic>
<!-- CRE spectral index: -alpha+beta*r+theta*z, Galactic cylindric frame -->
<alpha
value=
"3.0"
/>
...
...
@@ -274,7 +278,7 @@
<nx
value=
"80"
/>
<!-- silent if type="2D" -->
<ny
value=
"80"
/>
<!-- silent if type="2D" -->
<!--
box limit, in Galactic-centric frame
-->
<!--
grid setting
-->
<r_max
value=
"20.0"
/>
<!-- kpc -->
<x_min
value=
"0.0"
/>
<!-- kpc -->
<x_max
value=
"0.0"
/>
<!-- kpc -->
...
...
@@ -288,6 +292,12 @@
<E_max
value=
"100.0"
/>
<!-- GeV -->
<E_fact
value=
"0.1"
/>
<!-- dimensionless -->
</Numeric>
<!-- verification -->
<Verify>
<alpha
value=
"3.0"
/>
<r0
value=
"3.0"
/>
<!-- cutoff radius, kpc -->
<je
value=
"0.25"
/>
<!-- local CRE flux norm factor @ 10GeV -->
</Verify>
</CRE>
</root>
imagine/observers/hammurapy/model_mixins/wmap3yr_mixin.py
View file @
141d2f2a
...
...
@@ -7,9 +7,9 @@ from imagine.magnetic_fields.wmap3yr_magnetic_field import WMAP3yrMagneticField
class
WMAP3yrMixin
(
MagneticFieldModel
):
def
update_parameter_xml
(
self
,
root
):
custom_parameters
=
[
[
'./
Galaxy/
MagneticField/Regular'
,
'type'
,
'WMAP'
],
[
'./
Galaxy/
MagneticField/Random'
,
'cue'
,
'1'
],
[
'./
Galaxy/
MagneticField/Random'
,
'type'
,
'
Anisog
lob'
]]
[
'./MagneticField/Regular'
,
'type'
,
'WMAP'
],
[
'./MagneticField/Random'
,
'cue'
,
'1'
],
[
'./MagneticField/Random'
,
'type'
,
'
G
lob
al
'
]]
for
parameter
in
custom_parameters
:
root
.
find
(
parameter
[
0
]).
set
(
parameter
[
1
],
str
(
parameter
[
2
]))
...
...
imagine/observers/hammurapy/observable_mixins/dm_mixin.py
View file @
141d2f2a
...
...
@@ -17,5 +17,5 @@ class DMMixin(ObservableMixin):
def
update_parameter_xml
(
self
,
root
):
element
=
et
.
Element
(
'DM'
,
{
'cue'
:
'1'
,
'filename'
:
self
.
obs_name
+
'.fits'
})
output
=
root
.
find
(
'O
utp
ut'
)
output
=
root
.
find
(
'O
bso
ut'
)
output
.
append
(
element
)
imagine/observers/hammurapy/observable_mixins/fd_mixin.py
View file @
141d2f2a
...
...
@@ -17,5 +17,5 @@ class FDMixin(ObservableMixin):
def
update_parameter_xml
(
self
,
root
):
element
=
et
.
Element
(
'Faraday'
,
{
'cue'
:
'1'
,
'filename'
:
self
.
obs_name
+
'.fits'
})
output
=
root
.
find
(
'O
utp
ut'
)
output
=
root
.
find
(
'O
bso
ut'
)
output
.
append
(
element
)
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