Skip to content

Add a CHIANTI 11 source spectrum - #445

Draft
nabobalis wants to merge 1 commit into
temperature_responsefrom
chianti11-spectra
Draft

nabobalis wants to merge 1 commit into
temperature_responsefrom
chianti11-spectra

Conversation

@nabobalis

@nabobalis nabobalis commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Stacked on #443.

Summary

-get_source_spectra()
+get_source_spectra(source="solarsoft")   # unchanged default
+get_source_spectra(source="chianti11")   # CHIANTI 11.0.2 via fiasco, no chiantifix

The loader is shared: the file decides. A CHIANTIFIX extension means the SolarSoft file (rescaled by 12398/hc, chiantifix in meta); without one, temperature_response(..., chiantifix=True) is refused.

The CHIANTI 11 file boosts both members of the He II 304 Å doublet by 20, as SolarSoft's aia_bp_make_emiss intends; SolarSoft's V9 file boosts only the weak member (its exact-wavelength match for the strong one failed on CHIANTI 9; V6 and V8 boosted both), so its 304 Å response is 2.7× low at He II temperatures. The docstring says so.

Evidence

  • Before: temperature_response could only use SolarSoft's CHIANTI 9 emissivity.
    After: test_temperature_response_chianti11 checks 94 and 335 Å at log T 6.0, 6.4 and 7.0 against sdo's independent CHIANTI 11 table (rtol 2e-4; 3e-3 at log T 6.4 where sdo's table lacks the excited-level free-bound continuum; 1.5e-3 for 335 Å, which sees He II through the short-wavelength wing of its filter and sdo boosts one member). test_chiantifix_requires_ssw_spectra now uses the real CHIANTI 11 spectra. 10 passed locally with the file served from a checkout. The gallery example gains the 94 Å comparison: SolarSoft, SolarSoft with chiantifix, CHIANTI 11.

Merge Danger

Door: two-way

Blast Radius: one keyword

The default is unchanged; the tests need the file on backup-files' aia branch (LM-SAL/backup-files#19).

Summary by Sourcery

Add selectable CHIANTI 11 emissivity support while preserving SolarSoft as the default source.

New Features:

  • Add CHIANTI 11.0.2 source spectra as an alternative to the existing SolarSoft emissivity, selectable through get_source_spectra.
  • Extend the temperature-response example to compare SolarSoft, chiantifix-corrected SolarSoft, and CHIANTI 11 responses.

Bug Fixes:

  • Prevent chiantifix correction from being applied to spectra that do not provide SolarSoft chiantifix data.

Enhancements:

  • Support deferred management of multiple emissivity data files while preserving the SolarSoft source as the default.
  • Add validation of CHIANTI 11 temperature responses against independent reference data.

Documentation:

  • Document the differences between the SolarSoft CHIANTI 9 and CHIANTI 11 emissivities, including their treatment of the He II 304 Å doublet and the 94 Å response.

Tests:

  • Add tests covering CHIANTI 11 metadata, temperature responses, and chiantifix restrictions.

@sourcery-ai

sourcery-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

The PR extends temperature-response spectra loading with a lazily downloaded, verified CHIANTI 11.0.2 source generated by fiasco while preserving the SolarSoft default and restricting chiantifix to SolarSoft data. Tests compare CHIANTI 11 responses against independent references, and the example documents the differing 94 Å behavior.

File-Level Changes

Change Details Files
Add selectable SolarSoft and CHIANTI 11 emissivity sources with file-specific metadata and deferred resource downloads.
  • Add the source selector while preserving the SolarSoft default.
  • Register and lazily download verified SolarSoft and CHIANTI 11 FITS files.
  • Apply SolarSoft-only hc rescaling and chiantifix metadata; identify CHIANTI 11 as a fiasco-generated source.
  • Reject chiantifix requests for spectra without SolarSoft correction data.
aiapy/response/temperature.py
Validate CHIANTI 11 response values and source-specific chiantifix behavior.
  • Add a CHIANTI 11 fixture and compare 94 and 335 Å responses at selected temperatures against independent reference values.
  • Verify CHIANTI 11 metadata excludes chiantifix and raises when correction is requested.
  • Retain coverage for existing SolarSoft behavior.
aiapy/response/tests/test_temperature.py
Document and demonstrate the new CHIANTI 11 response option.
  • Add a feature changelog entry.
  • Extend the temperature-response example with a CHIANTI 11 94 Å comparison alongside SolarSoft variants.
changelog/+chianti11.feature.rst
examples/temperature_response.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@nabobalis
nabobalis added this pull request to stack #444 October 20, 2026 22:51
get_source_spectra(source="chianti11") loads an emissivity computed from
CHIANTI 11.0.2 with fiasco on backup-files; the chiantifix is refused for it.

This branch has not been deployed

No deployments
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.

1 participant