Stellar Emission Models

Below we describe a number of different emission models describing the emission from stars and their natal birth clouds. We provide details on each stellar model, as well as information on the keys from the underlying grid that are extracted where necessary.

First, we need a grid to pass to each model; here we load our test grid:

[1]:
from unyt import Myr, dimensionless, kelvin

from synthesizer.emission_models.attenuation import PowerLaw
from synthesizer.emission_models.dust.emission import Blackbody
from synthesizer.grid import Grid

# Get the grid which we'll need for extraction
grid_dir = "../../../../tests/test_grid"
grid_name = "test_grid"
grid = Grid(grid_name, grid_dir=grid_dir)

IncidentEmission

Incident emission is the pure stellar emission from a population of stars, usually defined by a SPS model. Incident emission has not been processed by natal birth clouds, or in any other way through a photoionisation code.

Specifically, an incident emission model defines the extraction of the "incident" SPS spectra key from a grid file.

[2]:
from synthesizer.emission_models import IncidentEmission

incident = IncidentEmission(grid=grid)
print(incident)
|==== EmissionModel: incident ====|
|---------------------------------|
|  INCIDENT (stellar)             |
|---------------------------------|
|Extraction model:                |
|  Grid: test_grid                |
|  Extract key: incident          |
|  Escape fraction: 0.0           |
|  Save emission: True            |
|=================================|

LineContinuumEmission

Line continuum emission defines the emission of lines from a stellar population, typically from the natal birth cloud surrounding young stars. Here we also use a mask, since nebular line emission is typically from young stars still surrounded by their birth cloud.

Specifically, a line continuum model defines the extraction of the "linecont" reprocessed SPS spectra key from a grid file.

[3]:
from synthesizer.emission_models import LineContinuumEmission

line_cont = LineContinuumEmission(
    grid, fesc=0.8, mask_attr="ages", mask_op="<", mask_thresh=10 * Myr
)
print(line_cont)
|==== EmissionModel: linecont ====|
|---------------------------------|
|  LINECONT (stellar)             |
|---------------------------------|
|Extraction model:                |
|  Grid: test_grid                |
|  Extract key: linecont          |
|  Escape fraction: 0.8           |
|  Save emission: True            |
|  Masks:                         |
|    - ages < 10 Myr              |
|=================================|

TransmittedEmission

Transmitted emission is the incident emission that is transmitted through the gas when reprocessed using a photoionisation model. Unlike incident emission, transmitted emission has little flux below the Lyman-limit, since it is typically absorbed by the neutral gas (depending on fesc).

A transmitted model defines the extraction of the "transmitted" reprocessed SPS spectra key from a grid file, with some escape fraction.

[4]:
from synthesizer.emission_models import TransmittedEmission

transmitted = TransmittedEmission(grid=grid, fesc=0.1)
print(transmitted)
|==== EmissionModel: transmitted ====|
|------------------------------------|
|  TRANSMITTED (stellar)             |
|------------------------------------|
|Extraction model:                   |
|  Grid: test_grid                   |
|  Extract key: transmitted          |
|  Escape fraction: 0.1              |
|  Save emission: True               |
|====================================|

EscapedEmission

Escaped emission is the portion of the incident emission which, when reprocessed using a photoionsaition code, fully escapes without being affected by the gas.

An escaped model defines the extraction of the "transmitted" reprocessed SPS spectra key from a grid file, with some escape fraction (i.e. escaped = fesc * incident).

[5]:
from synthesizer.emission_models import EscapedEmission

escaped = EscapedEmission(grid, fesc=0.1)
print(escaped)
|====== EmissionModel: escaped ======|
|------------------------------------|
|  ESCAPED (stellar)                 |
|------------------------------------|
|Extraction model:                   |
|  Grid: test_grid                   |
|  Extract key: transmitted          |
|  Escape fraction: 0.9              |
|  Save emission: True               |
|====================================|

Notice here that the “escape fraction” for the escaped model is 1 - fesc, because escaped is the inverse of transmitted.

NebularContinuumEmission

Nebular continuum emission is the continuum emission coming directly from the nebular birth cloud of a stellar population. A nebular continuum model defines the extraction of the "nebular_continuum" reprocessed SPS spectra key from a grid file.

Like LineContinuum we also use a mask here, since nebular continuum is typically dominated by young stars still surrounded by their natal birth clouds.

[6]:
from synthesizer.emission_models import NebularContinuumEmission

nebular_cont = NebularContinuumEmission(
    grid, fesc=0.2, mask_attr="ages", mask_op="<", mask_thresh=10 * Myr
)
print(nebular_cont)
|==== EmissionModel: nebular_continuum ====|
|------------------------------------------|
|  NEBULAR_CONTINUUM (stellar)             |
|------------------------------------------|
|Extraction model:                         |
|  Grid: test_grid                         |
|  Extract key: nebular_continuum          |
|  Escape fraction: 0.2                    |
|  Save emission: True                     |
|  Masks:                                  |
|    - ages < 10 Myr                       |
|==========================================|

NebularEmission

Nebular emission is the emission from the gas surrounding a (typically young) stellar population. Unlike other models we’ve shown so far, NebularEmission comes in two forms depending on whether a Lyman-\(\alpha\) escape fraction is provided. If a Lyman-\(\alpha\) escape fraction less than 1.0 is passed then NebularEmission is the combination of LineContinuumEmission and NebularContinuum. If not, it is an extraction of the "nebular" reprocessed SPS spectra.

Again, as for LineContinuumEmission and NebularContinuum, we’ll include a mask for young stars.

[7]:
from synthesizer.emission_models import NebularEmission

nebular_extract = NebularEmission(grid)
print(nebular_extract)
print()

nebular_combined = NebularEmission(
    grid,
    fesc=0.1,
    fesc_ly_alpha=0.8,
    mask_attr="ages",
    mask_op="<",
    mask_thresh=10 * Myr,
)
print(nebular_combined)
nebular_combined.plot_emission_tree()
|==== EmissionModel: nebular ====|
|--------------------------------|
|  NEBULAR (stellar)             |
|--------------------------------|
|Extraction model:               |
|  Grid: test_grid               |
|  Extract key: nebular          |
|  Escape fraction: 0.0          |
|  Save emission: True           |
|================================|

|================ EmissionModel: nebular ===============|
|-------------------------------------------------------|
|  NEBULAR_CONTINUUM (stellar)                          |
|-------------------------------------------------------|
|Extraction model:                                      |
|  Grid: test_grid                                      |
|  Extract key: nebular_continuum                       |
|  Escape fraction: 0.1                                 |
|  Save emission: True                                  |
|  Masks:                                               |
|    - ages < 10 Myr                                    |
|-------------------------------------------------------|
|  LINECONT (stellar)                                   |
|-------------------------------------------------------|
|Extraction model:                                      |
|  Grid: test_grid                                      |
|  Extract key: linecont                                |
|  Escape fraction: 0.8                                 |
|  Save emission: True                                  |
|  Masks:                                               |
|    - ages < 10 Myr                                    |
|-------------------------------------------------------|
|  NEBULAR (stellar)                                    |
|-------------------------------------------------------|
|Combination model:                                     |
|  Combine models: linecont, nebular_continuum          |
|  Save emission: True                                  |
|  Masks:                                               |
|    - ages < 10 Myr                                    |
|=======================================================|
../../_images/emission_models_premade_models_stellar_models_13_1.png
[7]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

The NebularEmission model is our first example of a model model with child models (LineCont and NebularContinuuum). For more complex models like this we can plot the “emission tree” to visualise the model. When the model is eventually used to generate emission, the model will be traversed bottom to top (breadth first), generating each spectra in the tree.

ReprocessedEmission

Reprocessed emission is the stellar emission which has been reprocessed by gas (i.e. the combination of the reprocessed spectra we saw above, transmitted and nebular).

A reprocessed model defines the combination of TransmittedEmission and NebularEmission.

[8]:
from synthesizer.emission_models import ReprocessedEmission

reprocessed = ReprocessedEmission(grid, fesc=0.1, fesc_ly_alpha=0.8)
print(reprocessed)
reprocessed.plot_emission_tree()
|============== EmissionModel: reprocessed =============|
|-------------------------------------------------------|
|  NEBULAR_CONTINUUM (stellar)                          |
|-------------------------------------------------------|
|Extraction model:                                      |
|  Grid: test_grid                                      |
|  Extract key: nebular_continuum                       |
|  Escape fraction: 0.1                                 |
|  Save emission: True                                  |
|-------------------------------------------------------|
|  LINECONT (stellar)                                   |
|-------------------------------------------------------|
|Extraction model:                                      |
|  Grid: test_grid                                      |
|  Extract key: linecont                                |
|  Escape fraction: 0.8                                 |
|  Save emission: True                                  |
|-------------------------------------------------------|
|  TRANSMITTED (stellar)                                |
|-------------------------------------------------------|
|Extraction model:                                      |
|  Grid: test_grid                                      |
|  Extract key: transmitted                             |
|  Escape fraction: 0.1                                 |
|  Save emission: True                                  |
|-------------------------------------------------------|
|  NEBULAR (stellar)                                    |
|-------------------------------------------------------|
|Combination model:                                     |
|  Combine models: linecont, nebular_continuum          |
|  Save emission: True                                  |
|-------------------------------------------------------|
|  REPROCESSED (stellar)                                |
|-------------------------------------------------------|
|Combination model:                                     |
|  Combine models: nebular, transmitted                 |
|  Save emission: True                                  |
|=======================================================|
../../_images/emission_models_premade_models_stellar_models_15_1.png
[8]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

IntrinsicEmission

Intrinsic emission is the total stellar emission, including all photoionisation reprocessing, prior to dust attenuation. Effectively, intrinsic emission is the emission that is “incident” on the dust distribution. Note that this does not take account of any dust within the birth cloud; this is typically modelled internally within a photoionisation code.

An intrinsic model defines the combination of EscapedEmission and ReprocessedEmission.

[9]:
from synthesizer.emission_models import IntrinsicEmission

intrinsic = IntrinsicEmission(grid, fesc=0.1, fesc_ly_alpha=1.0)
print(intrinsic)
intrinsic.plot_emission_tree()
|=========== EmissionModel: intrinsic ===========|
|------------------------------------------------|
|  ESCAPED (stellar)                             |
|------------------------------------------------|
|Extraction model:                               |
|  Grid: test_grid                               |
|  Extract key: transmitted                      |
|  Escape fraction: 0.9                          |
|  Save emission: True                           |
|------------------------------------------------|
|  NEBULAR (stellar)                             |
|------------------------------------------------|
|Extraction model:                               |
|  Grid: test_grid                               |
|  Extract key: nebular                          |
|  Escape fraction: 0.1                          |
|  Save emission: True                           |
|------------------------------------------------|
|  TRANSMITTED (stellar)                         |
|------------------------------------------------|
|Extraction model:                               |
|  Grid: test_grid                               |
|  Extract key: transmitted                      |
|  Escape fraction: 0.1                          |
|  Save emission: True                           |
|------------------------------------------------|
|  REPROCESSED (stellar)                         |
|------------------------------------------------|
|Combination model:                              |
|  Combine models: nebular, transmitted          |
|  Save emission: True                           |
|------------------------------------------------|
|  INTRINSIC (stellar)                           |
|------------------------------------------------|
|Combination model:                              |
|  Combine models: escaped, reprocessed          |
|  Save emission: True                           |
|================================================|
../../_images/emission_models_premade_models_stellar_models_17_1.png
[9]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

EmergentEmission

Emergent emission is the dust attenuated intrinsic emission, i.e. the stellar emission, post nebular attenuation and post dust attenuation. We haven’t seen the Attenuation model yet, since this is a “common” model, and will be covered below.

An emergent model is a combination of EscapedEmission and AttenuatedEmission.

[10]:
from synthesizer.emission_models import EmergentEmission

emergent = EmergentEmission(
    grid=grid,
    dust_curve=PowerLaw(slope=-1),
    apply_dust_to=reprocessed,
    tau_v=0.67,
    fesc=0.2,
)
print(emergent)
emergent.plot_emission_tree()
|======================================= EmissionModel: emergent ========================================|
|--------------------------------------------------------------------------------------------------------|
|  NEBULAR_CONTINUUM (stellar)                                                                           |
|--------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                       |
|  Grid: test_grid                                                                                       |
|  Extract key: nebular_continuum                                                                        |
|  Escape fraction: 0.1                                                                                  |
|  Save emission: True                                                                                   |
|--------------------------------------------------------------------------------------------------------|
|  LINECONT (stellar)                                                                                    |
|--------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                       |
|  Grid: test_grid                                                                                       |
|  Extract key: linecont                                                                                 |
|  Escape fraction: 0.8                                                                                  |
|  Save emission: True                                                                                   |
|--------------------------------------------------------------------------------------------------------|
|  TRANSMITTED (stellar)                                                                                 |
|--------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                       |
|  Grid: test_grid                                                                                       |
|  Extract key: transmitted                                                                              |
|  Escape fraction: 0.1                                                                                  |
|  Save emission: True                                                                                   |
|--------------------------------------------------------------------------------------------------------|
|  ESCAPED (stellar)                                                                                     |
|--------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                       |
|  Grid: test_grid                                                                                       |
|  Extract key: transmitted                                                                              |
|  Escape fraction: 0.8                                                                                  |
|  Save emission: True                                                                                   |
|--------------------------------------------------------------------------------------------------------|
|  NEBULAR (stellar)                                                                                     |
|--------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                      |
|  Combine models: linecont, nebular_continuum                                                           |
|  Save emission: True                                                                                   |
|--------------------------------------------------------------------------------------------------------|
|  REPROCESSED (stellar)                                                                                 |
|--------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                      |
|  Combine models: nebular, transmitted                                                                  |
|  Save emission: True                                                                                   |
|--------------------------------------------------------------------------------------------------------|
|  ATTENUATED (stellar)                                                                                  |
|--------------------------------------------------------------------------------------------------------|
|Dust attenuation model:                                                                                 |
|  Dust curve: <synthesizer.emission_models.attenuation.dust.PowerLaw object at 0x7ff06971d720>          |
|  Apply dust to: reprocessed                                                                            |
|  Optical depth (tau_v): [0.67]                                                                         |
|  Save emission: True                                                                                   |
|--------------------------------------------------------------------------------------------------------|
|  EMERGENT (stellar)                                                                                    |
|--------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                      |
|  Combine models: attenuated, escaped                                                                   |
|  Save emission: True                                                                                   |
|========================================================================================================|
../../_images/emission_models_premade_models_stellar_models_19_1.png
[10]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

TotalEmission

The Total emission is the combined emission from the stellar population (post dust attenuation) along with the thermal emission from dust.

Once again, dust emission is a common model and is covered here. A total model is a combination of DustEmission and EmergentEmission.

[11]:
from synthesizer.emission_models import TotalEmission

total = TotalEmission(
    grid=grid,
    dust_curve=PowerLaw(slope=-1),
    tau_v=0.67,
    fesc=0.2,
    fesc_ly_alpha=0.7,
    dust_emission_model=Blackbody(temperature=100 * kelvin),
)
print(total)
total.plot_emission_tree()
|================================================ EmissionModel: total ===============================================|
|---------------------------------------------------------------------------------------------------------------------|
|  ESCAPED (stellar)                                                                                                  |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: transmitted                                                                                           |
|  Escape fraction: 0.8                                                                                               |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  TRANSMITTED (stellar)                                                                                              |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: transmitted                                                                                           |
|  Escape fraction: 0.2                                                                                               |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  NEBULAR_CONTINUUM (stellar)                                                                                        |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: nebular_continuum                                                                                     |
|  Escape fraction: 0.2                                                                                               |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  LINECONT (stellar)                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: linecont                                                                                              |
|  Escape fraction: 0.7                                                                                               |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  NEBULAR (stellar)                                                                                                  |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: linecont, nebular_continuum                                                                        |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  REPROCESSED (stellar)                                                                                              |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: nebular, transmitted                                                                               |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  ATTENUATED (stellar)                                                                                               |
|---------------------------------------------------------------------------------------------------------------------|
|Dust attenuation model:                                                                                              |
|  Dust curve: <synthesizer.emission_models.attenuation.dust.PowerLaw object at 0x7ff06971f3a0>                       |
|  Apply dust to: reprocessed                                                                                         |
|  Optical depth (tau_v): [0.67]                                                                                      |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  EMERGENT (stellar)                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: attenuated, escaped                                                                                |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  DUST_EMISSION (stellar)                                                                                            |
|---------------------------------------------------------------------------------------------------------------------|
|Generation model:                                                                                                    |
|  Emission generation model: <synthesizer.emission_models.dust.emission.Blackbody object at 0x7ff06971f6a0>          |
|  Dust luminosity: reprocessed - attenuated                                                                          |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  TOTAL (stellar)                                                                                                    |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: emergent, dust_emission                                                                            |
|  Save emission: True                                                                                                |
|=====================================================================================================================|
../../_images/emission_models_premade_models_stellar_models_21_1.png
[11]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

Note that omitting dust_emission_model when initialising TotalEmission will result in a simpler model, where total is identical to emergent.

CharlotFall2000

In addition to the simpler models shown above we also provide three more complex emission models. The first of these follows Charlot&Fall+2000, which splits the stellar population into young and old populations (with the threshold defined by age_pivot), with specific dust attenuation parameters for each population.

[12]:
from synthesizer.emission_models import CharlotFall2000

cf_model = CharlotFall2000(
    grid=grid,
    tau_v_ism=1.0,
    tau_v_birth=0.7,
    dust_curve_ism=PowerLaw(slope=-0.7),
    dust_curve_birth=PowerLaw(slope=-1.3),
    age_pivot=7 * dimensionless,
    dust_emission_ism=Blackbody(temperature=50 * kelvin),
    dust_emission_birth=Blackbody(temperature=100 * kelvin),
)
print(cf_model)
cf_model.plot_emission_tree(fontsize=6)
|================================================ EmissionModel: total ===============================================|
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_TRANSMITTED (stellar)                                                                                        |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: transmitted                                                                                           |
|  Escape fraction: 0.0                                                                                               |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages < 7 dimensionless                                                                                    |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_NEBULAR (stellar)                                                                                            |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: nebular                                                                                               |
|  Escape fraction: 0.0                                                                                               |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages < 7 dimensionless                                                                                    |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_NEBULAR (stellar)                                                                                              |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: nebular                                                                                               |
|  Escape fraction: 0.0                                                                                               |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages >= 7 dimensionless                                                                                   |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_TRANSMITTED (stellar)                                                                                          |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: transmitted                                                                                           |
|  Escape fraction: 0.0                                                                                               |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages >= 7 dimensionless                                                                                   |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_INCIDENT (stellar)                                                                                             |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: incident                                                                                              |
|  Escape fraction: 0.0                                                                                               |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages >= 7 dimensionless                                                                                   |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_INCIDENT (stellar)                                                                                           |
|---------------------------------------------------------------------------------------------------------------------|
|Extraction model:                                                                                                    |
|  Grid: test_grid                                                                                                    |
|  Extract key: incident                                                                                              |
|  Escape fraction: 0.0                                                                                               |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages < 7 dimensionless                                                                                    |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_REPROCESSED (stellar)                                                                                        |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_transmitted, young_nebular                                                                   |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_ATTENUATED_NEBULAR (stellar)                                                                                 |
|---------------------------------------------------------------------------------------------------------------------|
|Dust attenuation model:                                                                                              |
|  Dust curve: <synthesizer.emission_models.attenuation.dust.PowerLaw object at 0x7ff06971f7f0>                       |
|  Apply dust to: young_reprocessed                                                                                   |
|  Optical depth (tau_v): [0.7]                                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_INTRINSIC (stellar)                                                                                          |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_nebular, young_transmitted                                                                   |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_DUST_EMISSION_BIRTH (stellar)                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|Generation model:                                                                                                    |
|  Emission generation model: <synthesizer.emission_models.dust.emission.Blackbody object at 0x7ff06963b910>          |
|  Dust luminosity: young_intrinsic - young_attenuated_nebular                                                        |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages < 7 dimensionless                                                                                    |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_ATTENUATED_ISM (stellar)                                                                                     |
|---------------------------------------------------------------------------------------------------------------------|
|Dust attenuation model:                                                                                              |
|  Dust curve: <synthesizer.emission_models.attenuation.dust.PowerLaw object at 0x7ff06971f580>                       |
|  Apply dust to: young_reprocessed                                                                                   |
|  Optical depth (tau_v): [1.0]                                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_DUST_EMISSION_ISM (stellar)                                                                                  |
|---------------------------------------------------------------------------------------------------------------------|
|Generation model:                                                                                                    |
|  Emission generation model: <synthesizer.emission_models.dust.emission.Blackbody object at 0x7ff06963be50>          |
|  Dust luminosity: young_intrinsic - young_attenuated_ism                                                            |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages < 7 dimensionless                                                                                    |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_DUST_EMISSION (stellar)                                                                                      |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_dust_emission_birth, young_dust_emission_ism                                                 |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_EMERGENT (stellar)                                                                                           |
|---------------------------------------------------------------------------------------------------------------------|
|Dust attenuation model:                                                                                              |
|  Dust curve: <synthesizer.emission_models.attenuation.dust.PowerLaw object at 0x7ff06971f580>                       |
|  Apply dust to: young_attenuated_nebular                                                                            |
|  Optical depth (tau_v): [1.0]                                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_TOTAL (stellar)                                                                                              |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_dust_emission, young_emergent                                                                |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_INTRINSIC (stellar)                                                                                            |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: old_nebular, old_transmitted                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_REPROCESSED (stellar)                                                                                          |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: old_transmitted, old_nebular                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_ATTENUATED (stellar)                                                                                           |
|---------------------------------------------------------------------------------------------------------------------|
|Dust attenuation model:                                                                                              |
|  Dust curve: <synthesizer.emission_models.attenuation.dust.PowerLaw object at 0x7ff06971f580>                       |
|  Apply dust to: old_reprocessed                                                                                     |
|  Optical depth (tau_v): [1.0]                                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_DUST_EMISSION (stellar)                                                                                        |
|---------------------------------------------------------------------------------------------------------------------|
|Generation model:                                                                                                    |
|  Emission generation model: <synthesizer.emission_models.dust.emission.Blackbody object at 0x7ff06963be50>          |
|  Dust luminosity: old_intrinsic - old_attenuated                                                                    |
|  Save emission: True                                                                                                |
|  Masks:                                                                                                             |
|    - log10ages >= 7 dimensionless                                                                                   |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_EMERGENT (stellar)                                                                                             |
|---------------------------------------------------------------------------------------------------------------------|
|Dust attenuation model:                                                                                              |
|  Dust curve: <synthesizer.emission_models.attenuation.dust.PowerLaw object at 0x7ff06971f580>                       |
|  Apply dust to: old_intrinsic                                                                                       |
|  Optical depth (tau_v): [1.0]                                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  OLD_TOTAL (stellar)                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: old_dust_emission, old_emergent                                                                    |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  TOTAL (stellar)                                                                                                    |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_total, old_total                                                                             |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  INTRINSIC (stellar)                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_intrinsic, old_intrinsic                                                                     |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  NEBULAR (stellar)                                                                                                  |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_nebular, old_nebular                                                                         |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  INCIDENT (stellar)                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_incident, old_incident                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  TRANSMITTED (stellar)                                                                                              |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_transmitted, old_transmitted                                                                 |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  YOUNG_ATTENUATED (stellar)                                                                                         |
|---------------------------------------------------------------------------------------------------------------------|
|Dust attenuation model:                                                                                              |
|  Dust curve: <synthesizer.emission_models.attenuation.dust.PowerLaw object at 0x7ff06971f580>                       |
|  Apply dust to: young_attenuated_nebular                                                                            |
|  Optical depth (tau_v): [1.0]                                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  EMERGENT (stellar)                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_emergent, old_emergent                                                                       |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  REPROCESSED (stellar)                                                                                              |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_reprocessed, old_reprocessed                                                                 |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  DUST_EMISSION (stellar)                                                                                            |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_dust_emission, old_dust_emission                                                             |
|  Save emission: True                                                                                                |
|---------------------------------------------------------------------------------------------------------------------|
|  ATTENUATED (stellar)                                                                                               |
|---------------------------------------------------------------------------------------------------------------------|
|Combination model:                                                                                                   |
|  Combine models: young_attenuated, old_attenuated                                                                   |
|  Save emission: True                                                                                                |
|=====================================================================================================================|
../../_images/emission_models_premade_models_stellar_models_23_1.png
[12]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

If we omit the dust emission model then we get a simpler model with a root at "emergent".

[13]:
cf_model = CharlotFall2000(
    grid=grid,
    tau_v_ism=1.0,
    tau_v_birth=0.7,
    dust_curve_ism=PowerLaw(slope=-0.7),
    dust_curve_birth=PowerLaw(slope=-1.3),
    age_pivot=7 * dimensionless,
)
cf_model.plot_emission_tree()
../../_images/emission_models_premade_models_stellar_models_25_0.png
[13]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

It’s also possible to plot a subtree within a model by passing the root of the subtree. This is particularly helpful for models like CharlotFall2000 which define a lot of extra spectra that don’t necessarily appear in the main tree depending on the exact inputs. You can see this in the plots below which show the trees defining the “extra” spectra available when using CharlotFall2000 (and indeed PacmanEmission and BimodelPacmanEmission which we’ll cover shortly).

[14]:
cf_model.plot_emission_tree(root="incident")
../../_images/emission_models_premade_models_stellar_models_27_0.png
[14]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)
[15]:
cf_model.plot_emission_tree(root="transmitted")
../../_images/emission_models_premade_models_stellar_models_28_0.png
[15]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)
[16]:
cf_model.plot_emission_tree(root="intrinsic")
../../_images/emission_models_premade_models_stellar_models_29_0.png
[16]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)
[17]:
cf_model.plot_emission_tree(root="attenuated")
../../_images/emission_models_premade_models_stellar_models_30_0.png
[17]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

PacmanEmission

We also implement a general model which accounts for escape fractions. We call this the “Pacman” model.

Pacman calculates dust attenuated spectra, including an escape fraction and variable Lyman-\(\alpha\) transmission. In this model, some fraction (fesc) of the pure stellar emission is able to completely escape the galaxy without reprocessing by gas or dust. The rest is assumed to be reprocessed by both gas and a screen of dust.

The Pacman model has two forms: the first is the PacmanEmission model, which does not differentiate between young and old populations.

[18]:
from synthesizer.emission_models import PacmanEmission

# Simple Pacman with dust emission
simple_pc_model = PacmanEmission(
    grid=grid,
    tau_v=0.7,
    dust_curve=PowerLaw(slope=-1.3),
    dust_emission=Blackbody(temperature=100 * kelvin),
    fesc=0.2,
    fesc_ly_alpha=0.9,
)
simple_pc_model.plot_emission_tree()
../../_images/emission_models_premade_models_stellar_models_32_0.png
[18]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

Again, omitting the dust_emission_model will result in a model with "emergent" at it’s root.

BiomodalPacmanEmission

The second flavour of the Pacman model is the BimodalPacmanEmission model, which is the same as PacmanEmission in every other respect, but does differentiate between old and young populations, analogous to Charlot&Fall+2000. The young component feels attenuation from both the ISM and birth clouds, while the old component only feels attenuation from the ISM.

[19]:
from synthesizer.emission_models import BimodalPacmanEmission

pc_model = BimodalPacmanEmission(
    grid=grid,
    tau_v_ism=1.0,
    tau_v_birth=0.7,
    dust_curve_ism=PowerLaw(slope=-1.3),
    dust_curve_birth=PowerLaw(slope=-0.7),
    dust_emission_ism=Blackbody(temperature=100 * kelvin),
    dust_emission_birth=Blackbody(temperature=30 * kelvin),
    fesc=0.2,
    fesc_ly_alpha=0.9,
)
pc_model.plot_emission_tree(fontsize=5)
../../_images/emission_models_premade_models_stellar_models_35_0.png
[19]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

And as with the other models the dust emission can be omitted, leaving "emergent" at the root.

A note: Complex model spectra location

When working with a Stars object alone the behaviour detailed above is exactly what you will want. However, in reality the dust emission is not a “stellar emission” but instead something more general to the galaxy. CharlotFall2000, PacmanEmission, and BimodalPacmanEmission all allow you to pass a stellar_dust argument which is True by default. When stellar_dust=False is passed, the "dust_emission" and "total" spectra will instead be attached to a galaxy emitter, and will only be generated when used with Galaxy.get_spectra.

This is more “correct”, but only works when working with a Galaxy, and also only works for integrated spectra. If you are only working with a Stars object stellar_dust can be ignored, yielding "dust_emission" and "total" spectra on the stellar component. If you are working with per particle spectra then these must be associated to a component, and stellar_dust can be ignored to attach the per particle spectra to a component. If galaxy level integrated spectra are required these can be generated down stream, either by integrating and attaching, or integrating and using a combination emission model.

[20]:
pc_model = BimodalPacmanEmission(
    grid=grid,
    tau_v_ism=1.0,
    tau_v_birth=0.7,
    dust_curve_ism=PowerLaw(slope=-1.3),
    dust_curve_birth=PowerLaw(slope=-0.7),
    dust_emission_ism=Blackbody(temperature=100 * kelvin),
    dust_emission_birth=Blackbody(temperature=30 * kelvin),
    fesc=0.2,
    fesc_ly_alpha=0.9,
    stellar_dust=False,
)
pc_model.plot_emission_tree(fontsize=5)
../../_images/emission_models_premade_models_stellar_models_37_0.png
[20]:
(<Figure size 600x600 with 1 Axes>, <Axes: >)

For more information see the combined models docs where we explictly show the construction of a multicomponent model with dust emission.