meidem 0.0.2__tar.gz

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.
Files changed (32) hide show
  1. meidem-0.0.2/LICENSE +21 -0
  2. meidem-0.0.2/PKG-INFO +463 -0
  3. meidem-0.0.2/README.md +409 -0
  4. meidem-0.0.2/meidem/__init__.py +322 -0
  5. meidem-0.0.2/meidem/_version.py +1 -0
  6. meidem-0.0.2/meidem/tables/claret2011/table-af.parquet +0 -0
  7. meidem-0.0.2/meidem/tables/claret2011/tableeq5.parquet +0 -0
  8. meidem-0.0.2/meidem/tables/claret2011/tableu.parquet +0 -0
  9. meidem-0.0.2/meidem/tables/claret2011/tabley.parquet +0 -0
  10. meidem-0.0.2/meidem/tables/claret2017/table24.parquet +0 -0
  11. meidem-0.0.2/meidem/tables/claret2017/table25.parquet +0 -0
  12. meidem-0.0.2/meidem/tables/claret2017/table26.parquet +0 -0
  13. meidem-0.0.2/meidem/tables/claret2017/table27.parquet +0 -0
  14. meidem-0.0.2/meidem/tables/claret2017/table28.parquet +0 -0
  15. meidem-0.0.2/meidem/tables/claret2017/table29.parquet +0 -0
  16. meidem-0.0.2/meidem/tables/claret2017/tablea.parquet +0 -0
  17. meidem-0.0.2/meidem/tables/claret2017/tableab.parquet +0 -0
  18. meidem-0.0.2/meidem/tables/claret2017/tablecd.parquet +0 -0
  19. meidem-0.0.2/meidem/tables/claret2017/tableef.parquet +0 -0
  20. meidem-0.0.2/meidem/tables/claret2017/tableu.parquet +0 -0
  21. meidem-0.0.2/meidem/tables/claret2022/table1.parquet +0 -0
  22. meidem-0.0.2/meidem/tables/claret2022/table2.parquet +0 -0
  23. meidem-0.0.2/meidem/tables/claret2022/table3.parquet +0 -0
  24. meidem-0.0.2/meidem/tables/kostogryz2022/table5.parquet +0 -0
  25. meidem-0.0.2/meidem/tables/kostogryz2022/table6.parquet +0 -0
  26. meidem-0.0.2/meidem.egg-info/PKG-INFO +463 -0
  27. meidem-0.0.2/meidem.egg-info/SOURCES.txt +30 -0
  28. meidem-0.0.2/meidem.egg-info/dependency_links.txt +1 -0
  29. meidem-0.0.2/meidem.egg-info/requires.txt +11 -0
  30. meidem-0.0.2/meidem.egg-info/top_level.txt +1 -0
  31. meidem-0.0.2/pyproject.toml +80 -0
  32. meidem-0.0.2/setup.cfg +4 -0
meidem-0.0.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Icaro Meidem
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
meidem-0.0.2/PKG-INFO ADDED
@@ -0,0 +1,463 @@
1
+ Metadata-Version: 2.4
2
+ Name: meidem
3
+ Version: 0.0.2
4
+ Summary: Multi-grid Epic Interpolator for limb DarkEning Models
5
+ Author-email: Icaro Meidem <seu_email@exemplo.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 Icaro Meidem
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/icaromeidem/meidem
29
+ Project-URL: Repository, https://github.com/icaromeidem/meidem
30
+ Project-URL: Bug Tracker, https://github.com/icaromeidem/meidem/issues
31
+ Keywords: astronomy,limb darkening,stellar atmosphere,transit,TESS,Kepler,exoplanets
32
+ Classifier: Development Status :: 3 - Alpha
33
+ Classifier: Intended Audience :: Science/Research
34
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.9
37
+ Classifier: Programming Language :: Python :: 3.10
38
+ Classifier: Programming Language :: Python :: 3.11
39
+ Classifier: Programming Language :: Python :: 3.12
40
+ Requires-Python: >=3.9
41
+ Description-Content-Type: text/markdown
42
+ License-File: LICENSE
43
+ Requires-Dist: numpy>=1.21
44
+ Requires-Dist: pandas>=1.5
45
+ Requires-Dist: scipy>=1.8
46
+ Requires-Dist: pyarrow>=12.0
47
+ Provides-Extra: dev
48
+ Requires-Dist: pytest>=7.0; extra == "dev"
49
+ Requires-Dist: pytest-cov; extra == "dev"
50
+ Requires-Dist: ruff; extra == "dev"
51
+ Requires-Dist: build; extra == "dev"
52
+ Requires-Dist: twine; extra == "dev"
53
+ Dynamic: license-file
54
+
55
+ #
56
+ <p align="center">
57
+ <img src="logo/meidem2.png" alt="MEIDEM logo" width="440"/>
58
+ </p>
59
+
60
+ # MEIDEM - Multi-grid Epic Interpolator for stellar limb DarkEning Models
61
+
62
+ [![PyPI version](https://badge.fury.io/py/meidem.svg)](https://badge.fury.io/py/meidem)
63
+ [![Python](https://img.shields.io/pypi/pyversions/meidem)](https://pypi.org/project/meidem/)
64
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
65
+
66
+ MEIDEM is a Python package that provides a unified interface for interpolating stellar **limb darkening (LD) coefficients** from multiple published grids. Instead of dealing with different table formats, column names, and interpolation strategies for each grid, you call a single function — `get_ld_coefficients()` — and MEIDEM handles the rest.
67
+
68
+ All grid tables are **bundled with the package**: no manual downloads, no VizieR visits, no path configuration.
69
+
70
+ ---
71
+
72
+ ## What is Stellar Limb Darkening?
73
+
74
+ When a planet transits its host star, the transit light curve is not only shaped by the planet's size and orbital geometry — it is also strongly affected by how the stellar brightness varies across the disk. Stars are not uniformly bright: they are brighter at the center and dimmer toward the edge (the "limb"). This effect, called **limb darkening**, must be correctly accounted for to accurately determine the planetary radius and other transit parameters.
75
+
76
+ Limb darkening is typically described by a **mathematical law** parametrized by one or more coefficients that depend on the stellar type (Teff, logg, metallicity) and the photometric bandpass. These coefficients are computed from model stellar atmospheres and published as tabulated grids. MEIDEM interpolates those grids for any given set of stellar parameters.
77
+
78
+ ---
79
+
80
+ ## Installation
81
+
82
+ ```bash
83
+ pip install meidem
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Quick Start
89
+
90
+ ```python
91
+ import meidem
92
+
93
+ # Get power-2 LD coefficients for a Sun-like star observed with TESS
94
+ result = meidem.get_ld_coefficients(
95
+ teff=5778, # effective temperature (K)
96
+ logg=4.44, # surface gravity (cgs)
97
+ feh=0.0, # metallicity [Fe/H] (dex)
98
+ passband='TESS',
99
+ grid='kostogryz2022',
100
+ law='power2',
101
+ )
102
+
103
+ print(result['coefficients']) # [c, alpha]
104
+ print(result['reference']) # full bibliographic reference
105
+ print(result['doi']) # DOI of the source paper
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Solar Reference Example (IAU 2015 Values)
111
+
112
+ The example below uses the IAU 2015 nominal solar parameters as a sanity check. You can use it to verify the installation and compare results across grids.
113
+
114
+ ```python
115
+ import meidem
116
+
117
+ # IAU 2015 nominal solar parameters
118
+ # Teff = 5772 K (Prša et al. 2016, AJ 152, 41)
119
+ # logg = 4.438 (log10 of GM_sun / R_sun^2 in cgs)
120
+ # [Fe/H] = 0.0 (by definition)
121
+ SUN = dict(teff=5772, logg=4.438, feh=0.0)
122
+
123
+ print("LD coefficients for the Sun (IAU 2015)\n")
124
+
125
+ # Kostogryz+2022 — power-2 for TESS
126
+ r = meidem.get_ld_coefficients(**SUN, passband='TESS',
127
+ grid='kostogryz2022', law='power2')
128
+ print(f"Kostogryz+2022 power-2 TESS : {r['coefficients']}")
129
+ # Expected: [c ≈ 0.65, alpha ≈ 0.60]
130
+
131
+ # Kostogryz+2022 — nonlinear (4-coeff) for TESS
132
+ r = meidem.get_ld_coefficients(**SUN, passband='TESS',
133
+ grid='kostogryz2022', law='nonlinear')
134
+ print(f"Kostogryz+2022 nonlinear TESS : {r['coefficients']}")
135
+
136
+ # Claret & Southworth 2022 — power-2 for TESS
137
+ r = meidem.get_ld_coefficients(**SUN, passband='TESS', grid='claret2022')
138
+ print(f"Claret2022 power-2 TESS : {r['coefficients']}")
139
+
140
+ # Claret 2017 — quadratic for TESS, ATLAS model, Least-Squares
141
+ r = meidem.get_ld_coefficients(**SUN, passband='TESS',
142
+ grid='claret2017', law='quadratic',
143
+ mod='A', met='L')
144
+ print(f"Claret2017 quadratic TESS : {r['coefficients']}")
145
+
146
+ # Claret & Bloemen 2011 — quadratic for Kepler
147
+ r = meidem.get_ld_coefficients(**SUN, passband='Kp',
148
+ grid='claret2011', law='quadratic')
149
+ print(f"Claret2011 quadratic Kepler : {r['coefficients']}")
150
+ ```
151
+
152
+ ### Loading your own star table
153
+
154
+ ```python
155
+ import pandas as pd
156
+ import meidem
157
+
158
+ # Load a table with stellar parameters
159
+ df = pd.read_csv('my_stars.csv')
160
+ # Required columns: Teff, logg, FeH
161
+
162
+ results = []
163
+ for _, row in df.iterrows():
164
+ try:
165
+ r = meidem.get_ld_coefficients(
166
+ teff=row['Teff'],
167
+ logg=row['logg'],
168
+ feh=row['FeH'],
169
+ passband='TESS',
170
+ grid='kostogryz2022',
171
+ law='power2',
172
+ )
173
+ results.append({
174
+ 'star' : row['hostname'],
175
+ 'LD_c1': r['coefficients'][0],
176
+ 'LD_c2': r['coefficients'][1],
177
+ 'status': 'OK',
178
+ })
179
+ except ValueError:
180
+ results.append({'star': row['hostname'], 'status': 'OUT_OF_GRID'})
181
+
182
+ df_ld = pd.DataFrame(results)
183
+ print(df_ld)
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Supported Grids
189
+
190
+ MEIDEM currently supports four published grids. Each covers a different combination of atmospheric models, LD laws, and photometric passbands.
191
+
192
+ ---
193
+
194
+ ### 1. `kostogryz2022` — Kostogryz et al. (2022), MPS-ATLAS
195
+
196
+ **Reference:** Kostogryz, N. V. et al. (2022), A&A — [doi:10.1051/0004-6361/202140376](https://doi.org/10.1051/0004-6361/202140376)
197
+
198
+ **Atmospheric model:** MPS-ATLAS — a modern 1D plane-parallel model developed at the Max Planck Institute for Solar System Research. It covers a wide range of metallicities and is one of the most up-to-date grids available for exoplanet transit modeling.
199
+
200
+ **Passbands:** TESS, Kepler, CHEOPS, PLATO
201
+
202
+ **Grid limits:** Teff ≈ 3500–10000 K · logg ≈ 2.0–5.0 · [Fe/H] ≈ −5.0 to +1.0
203
+
204
+ **Laws available:**
205
+
206
+ | Law key | Coefficients | Equation |
207
+ |---------|-------------|---------|
208
+ | `power2` | c, alpha | I(μ)/I(1) = 1 − c(1 − μ^α) |
209
+ | `nonlinear` | a1, a2, a3, a4 | I(μ)/I(1) = 1 − Σ aₙ(1 − μ^(n/2)) |
210
+
211
+ **When to use:** This is the **recommended grid for TESS and Kepler** as of 2022. Use `law='power2'` for most transit fitting applications — the power-2 law shows the lowest residuals and the smallest bias in recovered Rp/R* compared to the quadratic law for TESS photometry (Maxted 2023). Note that stars cooler than ~3500 K (cool M dwarfs) fall outside this grid.
212
+
213
+ ```python
214
+ r = meidem.get_ld_coefficients(
215
+ teff=5778, logg=4.44, feh=0.0,
216
+ passband='TESS',
217
+ grid='kostogryz2022',
218
+ law='power2', # or 'nonlinear'
219
+ )
220
+ ```
221
+
222
+ ---
223
+
224
+ ### 2. `claret2022` — Claret & Southworth (2022), A&A 664, A128
225
+
226
+ **Reference:** Claret, A. & Southworth, J. (2022), A&A 664, A128 — [doi:10.1051/0004-6361/202244278](https://doi.org/10.1051/0004-6361/202244278)
227
+
228
+ **Atmospheric model:** ATLAS (plane-parallel, 1D).
229
+
230
+ **Passbands:** TESS, Kepler, Gaia (G, BP, RP), SDSS (u, g, r, i, z), Johnson (U, B, V, R, I), 2MASS (J, H, K), Strömgren (u, v, b, y)
231
+
232
+ **Grid limits:** Teff ≈ 3500–50000 K · logg ≈ 0.0–5.0 · [Fe/H] ≈ −5.0 to +1.0
233
+
234
+ **Laws available:** Power-2 only
235
+
236
+ **Microturbulence (xi):** Available at ξ = 0, 1, 2, 4, 8 km/s. Default is ξ = 2.0 km/s, appropriate for most FGK main-sequence stars.
237
+
238
+ **When to use:** Excellent choice when you need **power-2 coefficients for a wide range of passbands beyond TESS and Kepler** — especially Gaia, SDSS, or Johnson bands. Also useful for comparison with `kostogryz2022` for TESS and Kepler.
239
+
240
+ ```python
241
+ r = meidem.get_ld_coefficients(
242
+ teff=5778, logg=4.44, feh=0.0,
243
+ passband='Gaia_G', # or 'TESS', 'Kepler', 'SDSS_r', 'Johnson_V', ...
244
+ grid='claret2022',
245
+ xi=2.0,
246
+ )
247
+ ```
248
+
249
+ ---
250
+
251
+ ### 3. `claret2017` — Claret (2017), A&A 600, A30
252
+
253
+ **Reference:** Claret, A. (2017), A&A 600, A30 — [doi:10.1051/0004-6361/201629705](https://doi.org/10.1051/0004-6361/201629705)
254
+
255
+ **Atmospheric models:** ATLAS and PHOENIX
256
+
257
+ **Passbands:** TESS only
258
+
259
+ **Grid limits (ATLAS):** Teff ≈ 3500–50000 K · logg ≈ 0.0–5.0 · [Fe/H] ≈ −5.0 to +1.0 · ξ = 0–8 km/s
260
+
261
+ **Grid limits (PHOENIX):** Teff ≈ 1500–12000 K · logg ≈ 2.5–6.0 · [Fe/H] = 0.0 only
262
+
263
+ **Laws available:**
264
+
265
+ | Law key | N coeff | Notes |
266
+ |---------|---------|-------|
267
+ | `linear` | 1 | Avoid — produces biases up to ~3% in Rp/R* (Espinoza & Jordán 2016) |
268
+ | `quadratic` | 2 | Most widely used; fast computation (Kopal 1950; Kreidberg 2015) |
269
+ | `square-root` | 2 | Better for hot stars |
270
+ | `logarithmic` | 2 | Better performance than quadratic (Espinoza & Jordán 2016) |
271
+ | `4coeff` | 4 | Most flexible; best physical description of intensity profile |
272
+ | `y` | 1 | Gravity darkening coefficient; ATLAS only |
273
+
274
+ **Fitting methods (`met`):**
275
+
276
+ | Key | Method | When to use |
277
+ |-----|--------|-------------|
278
+ | `'L'` | LSM — Least-Squares | Minimizes residuals to the intensity profile. Most common; default. |
279
+ | `'F'` | PCM/CFM — Flux Conservation | Ensures integrated flux is conserved. Preferred for generating synthetic light curves. |
280
+
281
+ **Atmospheric models (`mod`):**
282
+
283
+ | Key | Model | When to use |
284
+ |-----|-------|-------------|
285
+ | `'A'` | ATLAS | Covers all metallicities; default for most stars |
286
+ | `'P'` | PHOENIX | More realistic for cool stars (Teff < 5000 K); [Fe/H] = 0.0 only |
287
+
288
+ **When to use:** This grid is ideal when you want to **compare multiple LD laws for TESS** — for example, to assess how much the choice of law affects the recovered Rp/R*. The `4coeff` law provides the most accurate physical description; `quadratic` is most compatible with transit fitting codes like batman.
289
+
290
+ ```python
291
+ # ATLAS — quadratic, Least-Squares (most common setup)
292
+ r = meidem.get_ld_coefficients(
293
+ teff=5778, logg=4.44, feh=0.0,
294
+ passband='TESS',
295
+ grid='claret2017',
296
+ law='quadratic',
297
+ mod='A', # 'A' = ATLAS | 'P' = PHOENIX
298
+ met='L', # 'L' = Least-Squares | 'F' = Flux Conservation
299
+ xi=2.0,
300
+ )
301
+
302
+ # PHOENIX — better for cool stars (Teff < 5000 K), [Fe/H] = 0.0 only
303
+ r = meidem.get_ld_coefficients(
304
+ teff=3800, logg=4.8, feh=0.0,
305
+ passband='TESS',
306
+ grid='claret2017',
307
+ law='quadratic',
308
+ mod='P',
309
+ )
310
+ ```
311
+
312
+ ---
313
+
314
+ ### 4. `claret2011` — Claret & Bloemen (2011), A&A 529, A75
315
+
316
+ **Reference:** Claret, A. & Bloemen, S. (2011), A&A 529, A75 — [doi:10.1051/0004-6361/201116451](https://doi.org/10.1051/0004-6361/201116451)
317
+
318
+ **Atmospheric models:** ATLAS and PHOENIX
319
+
320
+ **Passbands:** Kepler (`Kp`), CoRoT (`C`), Spitzer ch1 (`S1`), Spitzer ch2 (`S2`)
321
+
322
+ **Laws available:** quadratic, root-square, logarithmic, 4coeff, linear, y
323
+
324
+ **Fitting methods (`met`) and models (`mod`):** Same as Claret 2017.
325
+
326
+ **When to use:** This is the **standard reference grid for Kepler and CoRoT** — one of the most cited LD grids in the exoplanet literature. If you are working with Kepler light curves, this is the grid to use for comparison with published results.
327
+
328
+ ```python
329
+ r = meidem.get_ld_coefficients(
330
+ teff=5778, logg=4.44, feh=0.0,
331
+ passband='Kp', # 'Kp' = Kepler | 'C' = CoRoT | 'S1'/'S2' = Spitzer
332
+ grid='claret2011',
333
+ law='quadratic',
334
+ mod='A',
335
+ met='L',
336
+ xi=2.0,
337
+ )
338
+ ```
339
+
340
+ ---
341
+
342
+ ## Choosing the Right Grid and Law
343
+
344
+ ### Which grid?
345
+
346
+ | Situation | Recommended |
347
+ |-----------|------------|
348
+ | TESS photometry, modern analysis | `kostogryz2022` |
349
+ | Kepler photometry | `claret2011` or `kostogryz2022` |
350
+ | Gaia, SDSS, Johnson, 2MASS passbands | `claret2022` |
351
+ | Cool stars (Teff < 3500 K) with TESS | `claret2017` with `mod='P'` |
352
+ | Comparing grids (e.g. for a paper) | `kostogryz2022` + `claret2022` |
353
+
354
+ ### Which law?
355
+
356
+ The power-2 law shows the lowest residuals and the smallest bias in recovered transit parameters for TESS and Kepler photometry. The quadratic law is the most widely used in the exoplanet literature because it enables fast and efficient light curve computation in popular codes such as batman (Kreidberg 2015). Laws such as logarithmic, square-root, and 3-parameter do a better job than quadratic and linear when deriving transit parameters (Espinoza & Jordán 2016).
357
+
358
+ | Law | Recommendation |
359
+ |-----|---------------|
360
+ | `power2` | **Best overall for TESS/Kepler.** 2 parameters, excellent accuracy (Maxted 2023). |
361
+ | `quadratic` | Most compatible with transit codes. Fast, 2 parameters, widely tabulated. |
362
+ | `nonlinear` / `4coeff` | Best physical description. Ideal when fixing coefficients rather than fitting them. |
363
+ | `logarithmic` / `square-root` | Better than quadratic, less widely supported by transit codes. |
364
+ | `linear` | Avoid — biases up to ~3% in Rp/R* (Espinoza & Jordán 2016). |
365
+
366
+ ### Grid coverage and known limitations
367
+
368
+ Each grid covers a finite region of stellar parameter space. Stars outside the grid raise a `ValueError` — MEIDEM **never extrapolates silently**.
369
+
370
+ | Grid | Teff range (K) | ATLAS | PHOENIX |
371
+ |------|---------------|-------|---------|
372
+ | kostogryz2022 | ~3500–10000 | ✓ | — |
373
+ | claret2022 | ~3500–50000 | ✓ | — |
374
+ | claret2017 | ~3500–50000 / ~1500–12000 | ✓ | ✓ ([Fe/H]=0 only) |
375
+ | claret2011 | ~3500–50000 / ~1500–12000 | ✓ | ✓ ([Fe/H]=0 only) |
376
+
377
+ **Note for cool M dwarfs (Teff < 5000 K):** For stars cooler than about 5000 K, significant deviations between measured and theoretical LDCs (Δu₁, Δu₂ ≈ 0.2) have been observed in TESS light curves (Patel & Espinoza 2022). Treat results with extra caution for very cool stars.
378
+
379
+ ---
380
+
381
+ ## API Reference
382
+
383
+ ### `meidem.get_ld_coefficients()`
384
+
385
+ ```python
386
+ meidem.get_ld_coefficients(
387
+ teff, # float — effective temperature (K)
388
+ logg, # float — surface gravity log g (cgs)
389
+ feh, # float — metallicity [Fe/H] (dex)
390
+ passband, # str — photometric passband
391
+ grid = 'kostogryz2022', # str — grid key
392
+ law = None, # str — LD law (None = grid default)
393
+ xi = 2.0, # float — microturbulence km/s (ATLAS only)
394
+ met = 'L', # str — fitting method: 'L' or 'F'
395
+ mod = 'A', # str — atmospheric model: 'A' or 'P'
396
+ verbose = False, # bool — print grid info
397
+ )
398
+ ```
399
+
400
+ **Returns:**
401
+
402
+ ```python
403
+ {
404
+ 'coefficients': [c, alpha], # interpolated LD coefficients
405
+ 'n_coeffs' : 2, # number of coefficients
406
+ 'law' : 'power2', # LD law used
407
+ 'passband' : 'TESS', # passband used
408
+ 'grid' : 'kostogryz2022', # grid used
409
+ 'reference' : 'Kostogryz et al. (2022)',
410
+ 'doi' : '10.1051/0004-6361/202140376',
411
+ 'teff_input' : 5778.0,
412
+ 'logg_input' : 4.44,
413
+ 'feh_input' : 0.0,
414
+ 'xi' : None, # float if Claret ATLAS, else None
415
+ 'met' : None, # str if Claret 2017/2011, else None
416
+ 'mod' : None, # str if Claret 2017/2011, else None
417
+ }
418
+ ```
419
+
420
+ **Raises `ValueError`** if parameters are outside grid limits.
421
+
422
+ ### Discovery functions
423
+
424
+ ```python
425
+ meidem.available_grids() # all grids with details
426
+ meidem.available_laws('claret2017') # laws for a grid
427
+ meidem.available_passbands('claret2022') # passbands for a grid
428
+ ```
429
+
430
+ ---
431
+
432
+ ## Citation
433
+
434
+ If you use MEIDEM in your research, please cite the package and the grid(s) you used:
435
+
436
+ ```bibtex
437
+ @software{meidem,
438
+ author = {Meidem, Icaro},
439
+ title = {{MEIDEM}: Multi-grid Exoplanet Interpolator for limb DarkEning Models},
440
+ year = {2026},
441
+ url = {https://github.com/icaromeidem/meidem},
442
+ }
443
+ ```
444
+
445
+ **Grid references:**
446
+
447
+ - Kostogryz et al. (2022), A&A — [doi:10.1051/0004-6361/202140376](https://doi.org/10.1051/0004-6361/202140376)
448
+ - Claret & Southworth (2022), A&A 664, A128 — [doi:10.1051/0004-6361/202244278](https://doi.org/10.1051/0004-6361/202244278)
449
+ - Claret (2017), A&A 600, A30 — [doi:10.1051/0004-6361/201629705](https://doi.org/10.1051/0004-6361/201629705)
450
+ - Claret & Bloemen (2011), A&A 529, A75 — [doi:10.1051/0004-6361/201116451](https://doi.org/10.1051/0004-6361/201116451)
451
+
452
+ **Key references used in this documentation:**
453
+
454
+ - Espinoza & Jordán (2015), MNRAS 450, 1879
455
+ - Espinoza & Jordán (2016), MNRAS 457, 3573
456
+ - Maxted (2023), MNRAS 519, 3723
457
+ - Patel & Espinoza (2022), AJ 163, 228
458
+
459
+ ---
460
+
461
+ ## License
462
+
463
+ MIT © Icaro Meidem