EFerriss / Pynams

Python package for interpreting FTIR spectra of nominally anhydrous minerals (NAMs)
MIT License
13 stars 4 forks source link

Fitting 'total water' profile #10

Closed barthac closed 7 years ago

barthac commented 7 years ago

I have split my profiles into different peaks. When I want the total water, I add the areas from the different peaks. However, I can't fit this total water with your fitD function since it is not technically a 'profile'. Is there a way to turn my list of total water contents into a profile so that I can fit it?

EFerriss commented 7 years ago

Try profile.areas = your summed area list profile.plot_area_list()

EFerriss commented 7 years ago

Actually, no, that won't work because it's going to re-make the areas every time. Let me fiddle with it.

EFerriss commented 7 years ago

pynams updated - you should be able to set the profile.areas directly and then it'll use those in the plotting command.

barthac commented 7 years ago

Great, thanks!

On Thu, Jan 26, 2017 at 10:52 AM, Elizabeth Ferriss < notifications@github.com> wrote:

Actually, no, that won't work because it's going to re-make the areas every time. Let me fiddle with it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EFerriss/Pynams/issues/10#issuecomment-275424652, or mute the thread https://github.com/notifications/unsubscribe-auth/AU8EhBORkGfp8OijlmyCQR3E0VF-XhxKks5rWMFXgaJpZM4LuFkg .

EFerriss commented 7 years ago

Let me know if it works, and if it does, you can close the issue.

EFerriss commented 7 years ago

Oh, it's not profile.plot_areas_list(), it's the usual plot command

barthac commented 7 years ago

It worked! Thanks!

EFerriss commented 7 years ago

It just occurred to me to add a caution: Because profile.plot_area_profile no longer automatically updates the profile.areas based on the current baselines, if you plot an area profile, change baselines, and then want to plot the new areas for the new baselines, you must first update the profile.areas by running profile.make_area_list()

EFerriss commented 7 years ago

I updated profile.get_baselines() to automatically run profile.make_area_list() so this problem doesn't come up and the areas are automatically updated.