[Mesa-users] Noisy derivatives for structure quantities

Giovanni Mirouh g.mirouh at surrey.ac.uk
Fri Oct 18 04:04:41 EDT 2019


Dear all,

I come to you with a pretty trivial question, sorry for that.

I am computing models, and for some calculations I need to compute d 
ln(rho)/ dx. I read the data in python using the py_mesa_reader package 
and derive logRho using numpy.gradient. What I obtain is noisy, with a 
lot of spikes in the derivative: does anyone have advice on how to avoid 
this? is there a way to compute/smooth the derivatives while running the 
code? should I use better tolerances?

Attached is a series of plots for a 4Msun star at center_h1 = 0.6, and 
the associated inlist, to give you an idea.

Thank you in advance,
Best.
-- 
Giovanni Mirouh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlnrho_dx_logscale.jpg
Type: image/jpeg
Size: 28934 bytes
Desc: dlnrho_dx_logscale.jpg
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20191018/e3db88af/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlnrho_dx.jpg
Type: image/jpeg
Size: 26951 bytes
Desc: dlnrho_dx.jpg
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20191018/e3db88af/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rho.jpg
Type: image/jpeg
Size: 22274 bytes
Desc: rho.jpg
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20191018/e3db88af/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lnrho.jpg
Type: image/jpeg
Size: 22856 bytes
Desc: lnrho.jpg
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20191018/e3db88af/attachment-0007.jpg>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: inlist
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20191018/e3db88af/attachment-0001.ksh>


More information about the Mesa-users mailing list