Skip to content

Comments

Add unit test for DilutePlanckianRadiationField (GSoC 2026 Eval)#3457

Open
PritamHazra2708 wants to merge 1 commit intotardis-sn:masterfrom
PritamHazra2708:GsocProject
Open

Add unit test for DilutePlanckianRadiationField (GSoC 2026 Eval)#3457
PritamHazra2708 wants to merge 1 commit intotardis-sn:masterfrom
PritamHazra2708:GsocProject

Conversation

@PritamHazra2708
Copy link

@PritamHazra2708 PritamHazra2708 commented Feb 22, 2026

📝 Description

Type: 🚦 testing

This PR adds a unit test for the DilutePlanckianRadiationField class as part of the GSoC 2026 Evaluation Task.

Key Context & Implementation Details:

  • Created test_dilute_planckian_radiation_field in tardis/plasma/tests/test_dilute_planckian.py.
  • Adapted the test to align with the recent tardisbase refactoring.
  • Integrated necessary Astropy units (u.K for temperature and u.Hz for frequency) to ensure strict unit compliance.
  • Utilized the updated .calculate_mean_intensity(nu=nu) method, passing the required frequency array instead of the older parameter-less .calculate() method.

📌 Resources

  • GSoC 2026 Applicant Evaluation Task.

🚦 Testing

How did you test these changes?

  • Testing pipeline
  • Other method (describe): Tested locally using pytest. Successfully generated local reference data using the --generate-reference flag along with --tardis-regression-data to ensure accurate regression matching without committing large data files to the repository.
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

@tardis-bot
Copy link
Contributor

*beep* *bop*

Hi, human.

I'm the @tardis-bot and couldn't find your records in my database. I think we don't know each other, or you changed your credentials recently.

Please add your name and email to .mailmap in your current branch and push the changes to this pull request.

In case you need to map an existing alias, follow this example.

@tardis-bot
Copy link
Contributor

*beep* *bop*

Hi, human.

I'm the @tardis-bot and I noticed that your email is not associated with an ORCID ID in our database.

Please add your email and ORCID ID to the .orcid.csv file in your current branch and push the changes to this pull request.

If you don't have an ORCID ID yet, you can create one for free at orcid.org. ORCID IDs help ensure you get proper credit for your scientific contributions.

The format should be:

email,orcid
your.email@example.com,0000-0000-0000-0000

@tardis-bot
Copy link
Contributor

*beep* *bop*
Hi human,
I ran ruff on the latest commit (e56e763).
Here are the outputs produced.
Results can also be downloaded as artifacts here.
Summarised output:

Details
1	F401	[*] unused-import
1	I001	[*] unsorted-imports
Found 2 errors.
[*] 2 fixable with the `--fix` option.

Complete output(might be large):

Details
tardis/plasma/tests/test_dilute_planckian.py:1:1: I001 [*] Import block is un-sorted or un-formatted
tardis/plasma/tests/test_dilute_planckian.py:1:8: F401 [*] `pytest` imported but unused
Found 2 errors.
[*] 2 fixable with the `--fix` option.

@atharva-2001
Copy link
Member

atharva-2001 commented Feb 23, 2026

This is not complete, you can move this to draft until then. Also can you mention the project and the idea. Also please follow the instructions, look carefully at the checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants