Skip to content

Add Salim+18 modified Calzetti attenuation law (δ, B) with end-to-end ProSpect integration#29

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/implement-salim18-attenuation-law
Draft

Add Salim+18 modified Calzetti attenuation law (δ, B) with end-to-end ProSpect integration#29
Copilot wants to merge 4 commits intomasterfrom
copilot/implement-salim18-attenuation-law

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

This PR introduces support for the Salim et al. (2018) modified Calzetti attenuation law so ProSpect can model flexible dust-screen curves via slope tilt (δ) and UV bump strength (B), instead of assuming a single fixed screen law.

  • Dust law implementation (R/dust.R)

    • Added Salim18_screen(...) for modified Calzetti attenuation.
    • Added screen_atten(...) dispatch wrapper (dust_law = "CF" | "Salim18").
    • Extended CF_screen_atten(...) and atten_emit(...) to accept law-selection and Salim+18 parameters (delta, B, Rv) while preserving existing CF defaults.
  • High-level API wiring (R/SFH.R, R/ProSpect.R)

    • Added new screen-law controls to SFHfunc, SFHburst, and ProSpectSED:
      • dust_law = "CF"
      • delta_screen = 0
      • B_screen = 0
      • Rv_screen = 4.05
    • Replaced direct CF_screen(...) usage in screen paths with screen_atten(...).
    • Propagated the same controls into AGN screen attenuation paths via atten_emit(...).
  • Documentation updates (man/*.Rd)

    • Documented new functions and parameters in:
      • man/dust.Rd
      • man/SFH.Rd
      • man/ProSpectSED.Rd
    • Clarified Salim18 behavior and parameter semantics alongside existing CF options.
  • Targeted regression/behavior coverage

    • Added tests/test_salim18_dust.R validating:
      • CF backward-compatibility through the wrapper.
      • Salim18 attenuation normalization behavior.
      • Eb -> B fallback handling in Salim18 mode.
spec <- ProSpectSED(
  dust_law = "Salim18",
  tau_screen = 0.4,
  delta_screen = -0.3,
  B_screen = 1.0,
  Rv_screen = 4.05
)

Copilot AI changed the title [WIP] Add Salim+18 attenuation law implementation to ProSpect Add Salim+18 modified Calzetti attenuation law (δ, B) with end-to-end ProSpect integration Apr 16, 2026
Copilot AI requested a review from asgr April 16, 2026 08:36
Copilot finished work on behalf of asgr April 16, 2026 08:36
@asgr
Copy link
Copy Markdown
Owner

asgr commented Apr 16, 2026

@copilot resolve the merge conflicts in this pull request

Co-authored-by: asgr <5617132+asgr@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts and merged the latest origin/master into this PR branch. The conflict in R/dust.R is fixed in commit 8d6c81d.

Copilot finished work on behalf of asgr April 16, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: Implementation of the Salim+18 attenuation law

2 participants