PAHFIT / pahfit

Model Decomposition for Near- to Mid-Infrared Spectroscopy of Astronomical Sources
https://pahfit.readthedocs.io/
18 stars 26 forks source link

function to return model compounds #156

Closed els1 closed 2 years ago

els1 commented 2 years ago

Added function to helpers.py to return the model compounds: total continuum, total dust continuum, total dust features, total H2 lines.

els1 commented 2 years ago

Issue #19: IDL version gives (in addition to individual components)

TOTAL_DUST_CONTINUUM=dc_tot, TOTAL_CONTINUUM=tot_cont, TOTAL_DUST_FEATURES=df_tot, TOTAL_LINES=lines_tot, EXTINCTION_CURVE=ext_curve

I didn't add: total lines, only total H2 lines extinction curve

Should this be added?

karllark commented 2 years ago

The codacy failure is minor and is due to trailing white space on some lines. This is a PEP8 thing. It can be left or fixed if you want. Click on the Details link and and then the view more details to see the specific lines that have this issue.

karllark commented 2 years ago

I think you should add a compound that is the atomic emission lines at a minimum (currently this code returns the H2 only).

I would return the attenuation curve as well. Useful as in the future we will have a more complex attenuation curve (e.g., ices with the v2.1 AKARI version).

codecov-commenter commented 2 years ago

Codecov Report

Merging #156 (45270b1) into master (013ca8a) will decrease coverage by 6.86%. The diff coverage is 9.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
- Coverage   62.65%   55.79%   -6.87%     
==========================================
  Files           7        8       +1     
  Lines         399      466      +67     
==========================================
+ Hits          250      260      +10     
- Misses        149      206      +57     
Impacted Files Coverage Δ
pahfit/helpers.py 43.33% <9.43%> (-48.78%) :arrow_down:
pahfit/base.py 57.07% <0.00%> (-0.75%) :arrow_down:
pahfit/feature_strengths.py 44.44% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 013ca8a...45270b1. Read the comment docs.

els1 commented 2 years ago

The codacy failure is minor and is due to trailing white space on some lines. This is a PEP8 thing. It can be left or fixed if you want. Click on the Details link and and then the view more details to see the specific lines that have this issue.

Thanks. I think I removed them.

karllark commented 2 years ago

One thought. It would be good to have some documentation on this useful function. Like a doc page that shows the output for our standard M101 nuclear fit. This could be part of this PR. But doesn't have to be. If not, then an issue should be opened so that such docs are added at some point.

els1 commented 2 years ago

One thought. It would be good to have some documentation on this useful function. Like a doc page that shows the output for our standard M101 nuclear fit. This could be part of this PR. But doesn't have to be. If not, then an issue should be opened so that such docs are added at some point.

I will work on including the docs in this PR.

els1 commented 2 years ago

I will add the docs in a new PR as there is an active PR on docs.

karllark commented 2 years ago

So, is this PR ready for merging @els1?

els1 commented 2 years ago

@karllark yes it is.