lfit-python 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lfit_python/__init__.py +27 -0
- lfit_python/chains.py +157 -0
- lfit_python/cli/__init__.py +1 -0
- lfit_python/cli/limbdark.py +64 -0
- lfit_python/cli/mcmcfit.py +168 -0
- lfit_python/cli/physparams.py +154 -0
- lfit_python/cli/reddening.py +50 -0
- lfit_python/cli/summary.py +78 -0
- lfit_python/cli/update_input.py +65 -0
- lfit_python/cli/watch.py +39 -0
- lfit_python/cli/wdparams.py +223 -0
- lfit_python/cv_model.py +864 -0
- lfit_python/data/Bergeron/README +7 -0
- lfit_python/data/Bergeron/Table_DA +257 -0
- lfit_python/data/Bergeron/Table_DA_sdss +307 -0
- lfit_python/data/Bergeron/Table_DB +312 -0
- lfit_python/data/Bergeron/color_correction_tables/color_corrections_HCAM-GTC-super_minus_ntt_ucam.csv +1067 -0
- lfit_python/data/Bergeron/color_correction_tables/color_corrections_HCAM-GTC-super_minus_tnt_uspec.csv +1067 -0
- lfit_python/data/Gianninas13/ld_coeffs_g.txt +654 -0
- lfit_python/data/Gianninas13/ld_coeffs_i.txt +654 -0
- lfit_python/data/Gianninas13/ld_coeffs_r.txt +654 -0
- lfit_python/data/Gianninas13/ld_coeffs_u.txt +654 -0
- lfit_python/data/Gianninas13/ld_coeffs_z.txt +654 -0
- lfit_python/data/Gianninas13/radial_bright_profiles.txt +6925 -0
- lfit_python/data/Hamada/mr_hamada.dat +1307 -0
- lfit_python/data/Panei/12C-MR-H-He/12C-MR-H-He.dat +387 -0
- lfit_python/data/Panei/12C-MR-H-He/12C-MR-H-He.saver +750 -0
- lfit_python/data/Panei/12C-MR-He/12C-MR-He.dat +431 -0
- lfit_python/data/Panei/HS/04He-H-S.dat +158 -0
- lfit_python/data/Panei/HS/12C-H-S.dat +158 -0
- lfit_python/data/Panei/HS/16O-H-S.dat +158 -0
- lfit_python/data/Panei/HS/28Si-H-S.dat +158 -0
- lfit_python/data/Panei/HS/56Fe-H-S.dat +158 -0
- lfit_python/data/Panei/othercores/04He-MR-H.dat +91 -0
- lfit_python/data/Panei/othercores/16O-MR-H-He.dat +602 -0
- lfit_python/data/Panei/othercores/28Si-MR-H-He.dat +386 -0
- lfit_python/data/Panei/othercores/56Fe-MR-H-He.dat +390 -0
- lfit_python/data/Panei/othercores/old/04He-MR-H.save +120 -0
- lfit_python/data/Panei/othercores/old/04He-MR.save +130 -0
- lfit_python/data/Panei/othercores/old/16O-MR-H-He.save +602 -0
- lfit_python/data/Panei/othercores/old/16O-MR-He.save +469 -0
- lfit_python/data/Panei/othercores/old/28Si-MR-H-He.save +386 -0
- lfit_python/data/Panei/othercores/old/28Si-MR-He.save +402 -0
- lfit_python/data/Panei/othercores/old/56Fe-MR-H-He.save +633 -0
- lfit_python/data/Panei/othercores/old/56Fe-MR-He.save +537 -0
- lfit_python/data/Wood95/co040.2.04dt1 +80 -0
- lfit_python/data/Wood95/co050.2.04dt1 +82 -0
- lfit_python/data/Wood95/co060.2.04dt1 +85 -0
- lfit_python/data/Wood95/co070.2.04dt1 +91 -0
- lfit_python/data/Wood95/co080.2.04dt1 +100 -0
- lfit_python/data/Wood95/co090.2.04dt1 +99 -0
- lfit_python/data/Wood95/co100.2.04dt1 +100 -0
- lfit_python/data/althaus/readme.tex +12 -0
- lfit_python/data/althaus/t106.one +1132 -0
- lfit_python/data/althaus/t108.one +679 -0
- lfit_python/data/althaus/t110.one +821 -0
- lfit_python/data/althaus/t112.one +239 -0
- lfit_python/data/althaus/t114.one +355 -0
- lfit_python/data/althaus/t116.one +353 -0
- lfit_python/data/althaus/t118.one +356 -0
- lfit_python/data/althaus/t120.one +882 -0
- lfit_python/data/althaus/t122.one +901 -0
- lfit_python/data/althaus/t124.one +913 -0
- lfit_python/data/althaus/t126.one +739 -0
- lfit_python/data/althaus/t128.one +665 -0
- lfit_python/data/althaus/t130.one +626 -0
- lfit_python/likelihood.py +26 -0
- lfit_python/limbdark.py +47 -0
- lfit_python/model.py +801 -0
- lfit_python/physical_params.py +279 -0
- lfit_python/plotting.py +364 -0
- lfit_python/priors.py +51 -0
- lfit_python/sampling.py +472 -0
- lfit_python/summary.py +327 -0
- lfit_python/watch_app.py +1001 -0
- lfit_python/wdparams.py +587 -0
- lfit_python-0.1.0.dist-info/METADATA +222 -0
- lfit_python-0.1.0.dist-info/RECORD +81 -0
- lfit_python-0.1.0.dist-info/WHEEL +5 -0
- lfit_python-0.1.0.dist-info/entry_points.txt +9 -0
- lfit_python-0.1.0.dist-info/top_level.txt +1 -0
lfit_python/limbdark.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Uses the output fluxes of a White Dwarf from an MCMC chain, and uses them
|
|
2
|
+
to calculate the limb darkening coefficient that should be used when fitting
|
|
3
|
+
that body. Data is typically not sensitive enough to this to fit it
|
|
4
|
+
independantly, so a few iterations through this script should aid in the
|
|
5
|
+
science.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import numpy as np
|
|
9
|
+
from scipy.interpolate import RectBivariateSpline
|
|
10
|
+
|
|
11
|
+
from . import DATA_DIR
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def ld(band, logg, teff, law="linear"):
|
|
15
|
+
assert band in ["u", "g", "r", "i", "z"]
|
|
16
|
+
assert law in ["linear", "quad", "sqr"]
|
|
17
|
+
|
|
18
|
+
filename = DATA_DIR / "Gianninas13" / f"ld_coeffs_{band}.txt"
|
|
19
|
+
data = np.loadtxt(filename)
|
|
20
|
+
x = data[
|
|
21
|
+
:, 0
|
|
22
|
+
] # logg (grid increments through all teffs at a single logg, then +logg)
|
|
23
|
+
y = data[:, 1] # teff
|
|
24
|
+
t1 = np.unique(y) # unique temps
|
|
25
|
+
g1 = np.unique(x) # unique loggs
|
|
26
|
+
nt = len(t1)
|
|
27
|
+
ng = len(g1)
|
|
28
|
+
|
|
29
|
+
z0 = data[:, 2] # linear ld coefficient
|
|
30
|
+
z1 = data[:, 3] # first quad term
|
|
31
|
+
z2 = data[:, 4] # 2nd quad term
|
|
32
|
+
z3 = data[:, 5] # first square-root term
|
|
33
|
+
z4 = data[:, 6] # second square-root term
|
|
34
|
+
|
|
35
|
+
# func = SmoothBivariateSpline(x,y,z)
|
|
36
|
+
# return func(logg,teff)[0]
|
|
37
|
+
if law == "linear":
|
|
38
|
+
func = RectBivariateSpline(g1, t1, z0.reshape((ng, nt)), kx=3, ky=3)
|
|
39
|
+
return func(logg, teff)[0, 0]
|
|
40
|
+
elif law == "quad":
|
|
41
|
+
funca = RectBivariateSpline(g1, t1, z1.reshape((ng, nt)), kx=3, ky=3)
|
|
42
|
+
funcb = RectBivariateSpline(g1, t1, z2.reshape((ng, nt)), kx=3, ky=3)
|
|
43
|
+
return (funca(logg, teff)[0, 0], funcb(logg, teff)[0, 0])
|
|
44
|
+
elif law == "sqr":
|
|
45
|
+
funca = RectBivariateSpline(g1, t1, z3.reshape((ng, nt)), kx=3, ky=3)
|
|
46
|
+
funcb = RectBivariateSpline(g1, t1, z4.reshape((ng, nt)), kx=3, ky=3)
|
|
47
|
+
return (funca(logg, teff)[0, 0], funcb(logg, teff)[0, 0])
|