Skip to content

WIP: Basic thermal models#380

Open
jianyangli wants to merge 5 commits intoNASA-Planetary-Science:mainfrom
jianyangli:thermal_20230713
Open

WIP: Basic thermal models#380
jianyangli wants to merge 5 commits intoNASA-Planetary-Science:mainfrom
jianyangli:thermal_20230713

Conversation

@jianyangli
Copy link
Contributor

This is an implementation of the basic thermal models: STM, FRM, and NEATM. It's still a WIP. I'd like to start a PR here for input on everything, API, class inheritance structure, as well as the implementation.

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

❌ Patch coverage is 37.88820% with 100 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.91%. Comparing base (8aacf39) to head (ab49f83).
⚠️ Report is 73 commits behind head on main.

Files with missing lines Patch % Lines
sbpy/thermal/core.py 30.70% 79 Missing ⚠️
sbpy/thermal/models.py 54.34% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #380      +/-   ##
==========================================
- Coverage   76.80%   75.91%   -0.89%     
==========================================
  Files          78       79       +1     
  Lines        6984     7133     +149     
==========================================
+ Hits         5364     5415      +51     
- Misses       1620     1718      +98     

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


not yet implemented
lon : float
Longitude in radiance
Copy link
Member

Choose a reason for hiding this comment

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

What does this mean, longitude/latitude in "radiance"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, typo. Should be radian.


@u.quantity_input(wave_freq=u.m, delta=u.m, lon=u.deg, lat=u.deg,
equivalencies=u.spectral())
def fluxd(self, wave_freq, delta, sublon, sublat, unit='W m-2 um-1',
Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of using sublon and sublat, but can we also have a way to use obliquity and phase angle?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method calculates the total flux density by integrating over the whole visible part of the surface of an object, provided that the temperature distribution is available by .T(lon, lat). So as long as a mechanism is provided to convert (obliquity, phase) or any other combination to (sublon, sublat) in a subclass or inherited .fluxd method, we can use it in any circumstance. I think this will also work for an irregular shape model, but haven't thought about it thoroughly or tested it yet.

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.

2 participants