Skip to content

Conversation

@jeremykubica
Copy link
Collaborator

Add a helper function to create StaticSEDSource models from synphot SourceSpectrum models so users do not need to manually define the synphot model, generate the SED, etc.

@jeremykubica jeremykubica requested a review from mi-dai August 25, 2025 13:38
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.37%. Comparing base (7cfb482) to head (e7056f2).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/tdastro/sources/static_sed_source.py 87.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
- Coverage   91.38%   91.37%   -0.02%     
==========================================
  Files          52       52              
  Lines        3728     3744      +16     
==========================================
+ Hits         3407     3421      +14     
- Misses        321      323       +2     

☔ 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.

@github-actions
Copy link

github-actions bot commented Aug 25, 2025

Before [7cfb482] After [2c9b8c2] Ratio Benchmark (Parameter)
1.90±0.4ms 3.05±0.7ms ~1.60 benchmarks.TimeSuite.time_lightcurve_source
19.1±0.1ms 19.6±0.6ms 1.03 benchmarks.TimeSuite.time_make_and_evaluate_static_sed
45.3±0.2μs 46.5±1μs 1.03 benchmarks.TimeSuite.time_make_new_salt3_model
117±5μs 120±6μs 1.02 benchmarks.TimeSuite.time_evaluate_simple_linear_wavelength_source
672±9μs 684±10μs 1.02 benchmarks.TimeSuite.time_fnu_to_flam
33.1±0.2ms 33.6±0.09ms 1.01 benchmarks.TimeSuite.time_additive_multi_model_source
7.66±0.1ms 7.65±0.2ms 1.00 benchmarks.TimeSuite.time_apply_white_noise
8.40±0.04ms 8.44±0.06ms 1.00 benchmarks.TimeSuite.time_load_passbands
86.6±0.6μs 86.5±1μs 1.00 benchmarks.TimeSuite.time_make_and_evaluate_step_source
109±2μs 109±2μs 1.00 benchmarks.TimeSuite.time_sample_x0_from_distmod

Click here to view all benchmarks.

Copy link
Collaborator

@mi-dai mi-dai left a comment

Choose a reason for hiding this comment

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

Looks good overall. One question: synphot.SourceSpectrum includes redshift. Should we keep it as z=0? (How can we ensure that?)

@jeremykubica
Copy link
Collaborator Author

Looks good overall. One question: synphot.SourceSpectrum includes redshift. Should we keep it as z=0? (How can we ensure that?)

I added a check to the code that z is not greater than zero. This means we can apply all redshift through one single code path. I added some notes to this to the notebook and a test for it as well.

@jeremykubica jeremykubica requested a review from mi-dai August 26, 2025 11:48
@jeremykubica jeremykubica merged commit 9458462 into main Aug 26, 2025
7 of 9 checks passed
@jeremykubica jeremykubica deleted the synphot branch August 26, 2025 13:49
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.

3 participants