Skip to content

Conversation

@icweaver
Copy link
Member

@icweaver icweaver commented May 8, 2025

Closes #43

@codecov
Copy link

codecov bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.62%. Comparing base (2dad230) to head (a3e7c72).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #67   +/-   ##
=======================================
  Coverage   99.62%   99.62%           
=======================================
  Files          10       10           
  Lines         267      267           
=======================================
  Hits          266      266           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@icweaver icweaver changed the title docs cleaned up Clarify A(x)/A(V) units in docs May 8, 2025
Calzetti et al. (2000) Dust Law.

Returns E(B-V) in magnitudes at the given wavelength. `λ` is the wavelength in Å
Returns A(λ)/E(B-V) in magnitudes at the given wavelength. `λ` is the wavelength in Å
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is A(lambda) / A_V as currently implemented. I like returning A(lambda) / A_V for consistency with other models.

Above equation 2 in Calzetti 2000 we have k_full = A(lambda) / E(B-V).

The k we define on lines 57 and 59 is only the polynomial portion of the full k term. The full term would be k_full = 2.659 * k + R_v (see their equation 4). By the above, we have k_full = A(lambda) / E(B-V) = 2.659 * k + R_v. Therefore, what we return on line 61 is 1.0 + 2.659 * k / law.Rv == k_full / law.RV == A(lambda) / E(B-V) / law.RV == A(lambda) / A(V).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you have it labeled as A(x)/A(V) in the plot above so this might be the only place it needs to be changed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Not a dust guy, so thank you for walking me through that, it was bugging me. Updating now

Out of curiosity, are we using E(B-V) and E_s(B-V) interchangeably here? The reason I ask is because there seems to be some kind of conversion between them in Eq. 3 which k_full depends on

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using them interchangeably for simplicity but they are not in general the same. Part of the complexity is that the Calzetti 2000 law is technically an attenuation law rather than an extinction law (see here) although this distinction is not often discussed. Because C00 is measuring extragalactic attenuation, they employ different methods to constrain the observational E(B-V) values than studies looking at extinction in the MW. The nebular emission line tracers they use to measure E(B-V) values for the galaxies are summarized in Table 1 but presented in earlier work. The E(B-V) values measured in these nebular regions are systematically higher than the galaxy-wide average value, which is the quantity they actually want for predicting the attenutation of the stellar continuum (this is what they call E_s(B-V)) -- in this case, they say that the stellar continuum color excess E_s(B-V)) is 44% of the nebular color excess.

I think our implementation is fine because the conversion between the two has to be made by the user after we've provided them with A(lambda) / A(V). In order to calculate a final attenuation in magnitudes A(lambda), a user must determine what A(V) is for their region, which requires assuming an E(B-V) and an RV. It is at this point that the definition of the color excess becomes relevant, which is after we have already calculated A(lambda) / A(V).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really interesting, thanks for taking the time to explain the distinction to me! That also clears up for me why Karl made both a dust_extinction and dust_attenuation package 😄

@cgarling
Copy link
Member

cgarling commented May 8, 2025

Looks good to merge

@icweaver icweaver merged commit f2a860d into master May 8, 2025
11 checks passed
@icweaver icweaver deleted the docs-law-units branch May 8, 2025 20:49
@icweaver icweaver mentioned this pull request May 8, 2025
12 tasks
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.

Documentation for color laws

2 participants