Skip to content

Commit

Permalink
First commit in akari branch
Browse files Browse the repository at this point in the history
This branch attempts to add the akari model to zodipy. The model is similar to that of K98 with some of the geometrical parameters having been refitted and the addition of a constant component representing interstellar dust.
  • Loading branch information
MetinSa committed Jul 14, 2023
1 parent 5930420 commit eeb33ff
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ ignore = [
"D105",
"D107",
"ANN101",
"C901",
]
exclude = ["tests/*"]

Expand Down
18 changes: 16 additions & 2 deletions zodipy/_interpolate_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,22 @@ def get_source_parameters_kelsall_comp(
source_parameters["common"] = {}
source_parameters["common"]["phase_coefficients"] = tuple(phase_coefficients)
source_parameters["common"]["solar_irradiance"] = solar_irradiance
source_parameters["common"]["T_0"] = model.T_0
source_parameters["common"]["delta"] = model.delta

if isinstance(model.T_0, dict):
for comp_label in model.comps:
if comp_label not in source_parameters:
source_parameters[comp_label] = {}
source_parameters[comp_label]["T_0"] = model.T_0[comp_label]
else:
source_parameters["common"]["T_0"] = model.T_0

if isinstance(model.delta, dict):
for comp_label in model.comps:
if comp_label not in source_parameters:
source_parameters[comp_label] = {}
source_parameters[comp_label]["delta"] = model.delta[comp_label]
else:
source_parameters["common"]["delta"] = model.delta

return source_parameters

Expand Down
4 changes: 2 additions & 2 deletions zodipy/_ipd_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def to_dict(self) -> dict:
class Kelsall(InterplanetaryDustModel):
"""Kelsall et al. (1998) model."""

T_0: float
delta: float
T_0: float | Mapping[ComponentLabel, float]
delta: float | Mapping[ComponentLabel, float]
emissivities: Mapping[ComponentLabel, Sequence[float]]
albedos: Mapping[ComponentLabel, Sequence[float]] | None = None
solar_irradiance: Sequence[float] | None = None # In units of MJy/sr
Expand Down
83 changes: 83 additions & 0 deletions zodipy/comps.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,86 @@
sigma_theta=12.1,
),
}

AKARI: dict[ComponentLabel, Component] = {
ComponentLabel.CLOUD: Cloud(
x_0=0.0153,
y_0=-0.0081,
z_0=-0.00160,
i=2.047,
Omega=75.9,
n_0=1.578e-07,
alpha=1.59,
beta=4.85,
gamma=1.043,
mu=0.180,
),
ComponentLabel.BAND1: Band(
x_0=0.0,
y_0=0.0,
z_0=0.0,
i=0.56438265154389733,
Omega=80.0,
n_0=5.6e-10,
delta_zeta=8.7850534408713035,
v=0.10000000149011612,
p=4.0,
delta_r=1.5,
),
ComponentLabel.BAND2: Band(
x_0=0.0,
y_0=0.0,
z_0=0.0,
i=1.2000000476837158,
Omega=30.347475578624532,
n_0=3.7e-09,
delta_zeta=1.9917032425777641,
v=0.89999997615814209,
p=4.0,
delta_r=0.94121881201651147,
),
ComponentLabel.BAND3: Band(
x_0=0.0,
y_0=0.0,
z_0=0.0,
i=0.80000001192092896,
Omega=80.0,
n_0=0.06e-10,
delta_zeta=15,
v=0.050000000745058060,
p=4.0,
delta_r=1.5,
),
ComponentLabel.RING: Ring(
x_0=0.0,
y_0=0.0,
z_0=0.0,
i=0.97,
Omega=296,
n_0=0.75e-08,
R=1.0282,
sigma_r=0.025,
sigma_z=0.066,
),
ComponentLabel.FEATURE: Feature(
x_0=0.0,
y_0=0.0,
z_0=0.0206,
i=0.97,
Omega=296,
n_0=2.08e-08,
R=1.06,
sigma_r=0.10,
sigma_z=0.151,
theta=-10.0,
sigma_theta=11.10,
),
ComponentLabel.INTERSTELLAR: Interstellar(
x_0=0.0,
y_0=0.0,
z_0=0.0,
i=0,
Omega=0,
amp=1,
),
}
11 changes: 11 additions & 0 deletions zodipy/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,14 @@
delta=source_params.DELTA_RMM,
),
)

model_registry.register_model(
name="akari",
model=Kelsall(
comps=comps.AKARI,
spectrum=source_params.SPECTRUM_AKARI,
emissivities=source_params.EMISSIVITY_AKARI,
T_0=source_params.T_0_AKARI,
delta=source_params.DELTA_AKARI,
),
)
52 changes: 52 additions & 0 deletions zodipy/source_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,29 @@
ComponentLabel.INTERSTELLAR: DELTA_SMALL_GRAINS,
}

T_0_AKARI = {
ComponentLabel.CLOUD: T_0_DIRBE,
ComponentLabel.BAND1: T_0_DIRBE,
ComponentLabel.BAND2: T_0_DIRBE,
ComponentLabel.BAND3: T_0_DIRBE,
ComponentLabel.RING: T_0_DIRBE,
ComponentLabel.FEATURE: T_0_DIRBE,
ComponentLabel.INTERSTELLAR: 270,
}
DELTA_AKARI = {
ComponentLabel.CLOUD: 0.458,
ComponentLabel.BAND1: 0.458,
ComponentLabel.BAND2: 0.458,
ComponentLabel.BAND3: 0.458,
ComponentLabel.RING: 0.458,
ComponentLabel.FEATURE: 0.458,
ComponentLabel.INTERSTELLAR: 0.458,
}

SPECTRUM_PLANCK = u.Quantity([100.0, 143.0, 217.0, 353.0, 545.0, 857.0], u.GHz)
SPECTRUM_DIRBE = u.Quantity([1.25, 2.2, 3.5, 4.9, 12, 25, 60, 100, 140, 240], u.micron)
SPECTRUM_IRAS = u.Quantity([12, 25, 60, 100], u.micron)
SPECTRUM_AKARI = u.Quantity([9.0, 18.0], u.micron)

#! TODO: Figure out calibration and source evaluation for rrm-experimental
# CALIBRATION_RRM = (2.45, 2.42, 2.24, 1.97)
Expand Down Expand Up @@ -145,6 +165,38 @@
),
}

EMISSIVITY_AKARI = {
ComponentLabel.CLOUD: (
0.8575,
1.0,
),
ComponentLabel.BAND1: (
0.8575,
1.0,
),
ComponentLabel.BAND2: (
0.8575,
1.0,
),
ComponentLabel.BAND3: (
0.8575,
1.0,
),
ComponentLabel.RING: (
0.8575,
1.0,
),
ComponentLabel.FEATURE: (
0.8575,
1.0,
),
ComponentLabel.INTERSTELLAR: (
0.191e-8,
0.246e-8,
),
}


ALBEDO_DIRBE = {
ComponentLabel.CLOUD: (
0.20411939612669797,
Expand Down

0 comments on commit eeb33ff

Please sign in to comment.