Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable arithmetic with SpectralSource #272

Open
2 of 5 tasks
mkelley opened this issue Mar 9, 2021 · 1 comment
Open
2 of 5 tasks

Enable arithmetic with SpectralSource #272

mkelley opened this issue Mar 9, 2021 · 1 comment
Labels
feature request request for new functionality

Comments

@mkelley
Copy link
Member

mkelley commented Mar 9, 2021

This is a request for

  • a new feature
  • an enhancement to existing sbpy functionality
  • somethings else: [explain here]

The requested changes will be implemented by

  • me
  • the sbpy developers

High-level concept
Enable arithmetic with SpectralSource.

Proposal details
synphot SpectralSources can be added together to form a new source, or scaled. sbpy's SpectralSource is based on synphot and should do the same. This would allow, e.g., creating a combined spectrum of reflected sunlight + blackbody thermal emission.

Example (pseudo-)code

S = Sun.from_builtin('E490_2014LR').source
T_grain = 300 * u.K
refl = Ap * 10**(-0.4 * Phi(phase)) * S * a**2 / (rh / u.au)**2 / delta**2
therm = BlackbodySource(T_grain) * np.pi * a**2 / delta**2
S_grain = refl + therm
@mkelley mkelley added the feature request request for new functionality label Mar 9, 2021
@mkelley mkelley changed the title feature request Enable arithmetic with SpectralSource Mar 9, 2021
@mkelley
Copy link
Member Author

mkelley commented Jan 25, 2022

This may be addressed via #291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request request for new functionality
Projects
None yet
Development

No branches or pull requests

1 participant