diff --git a/pyproject.toml b/pyproject.toml index 34270e1..6448dbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,6 +93,7 @@ ignore = [ "D105", "D107", "ANN101", + "C901", ] exclude = ["tests/*"] diff --git a/zodipy/_interpolate_source.py b/zodipy/_interpolate_source.py index ee584d1..87b8e43 100644 --- a/zodipy/_interpolate_source.py +++ b/zodipy/_interpolate_source.py @@ -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 diff --git a/zodipy/_ipd_model.py b/zodipy/_ipd_model.py index 77a19b7..dc98407 100644 --- a/zodipy/_ipd_model.py +++ b/zodipy/_ipd_model.py @@ -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 diff --git a/zodipy/comps.py b/zodipy/comps.py index b44226b..3c1d567 100644 --- a/zodipy/comps.py +++ b/zodipy/comps.py @@ -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, + ), +} diff --git a/zodipy/model_registry.py b/zodipy/model_registry.py index 34ad223..d869a2c 100644 --- a/zodipy/model_registry.py +++ b/zodipy/model_registry.py @@ -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, + ), +) diff --git a/zodipy/source_params.py b/zodipy/source_params.py index b3a2792..b7eacc3 100644 --- a/zodipy/source_params.py +++ b/zodipy/source_params.py @@ -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) @@ -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,