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

WIP: Basic thermal models #380

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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

Merging #380 (ab49f83) into main (8aacf39) will decrease coverage by 0.89%.
The diff coverage is 37.88%.

@@            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     
Impacted Files Coverage Δ
sbpy/data/__init__.py 100.00% <ø> (ø)
sbpy/thermal/core.py 31.30% <30.70%> (-53.32%) ⬇️
sbpy/thermal/models.py 54.34% <54.34%> (ø)
sbpy/thermal/__init__.py 100.00% <100.00%> (ø)


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