Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/kima-org/kima
Browse files Browse the repository at this point in the history
Merge from main
  • Loading branch information
ThomasBaycroft committed Jan 16, 2024
2 parents 62bd1fa + bc8aa62 commit f23a159
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 86 deletions.
63 changes: 63 additions & 0 deletions src/kima/Data.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ class RVData:
reference epoch for the mean anomaly
"""
...
@M0_epoch.setter
def M0_epoch(self, arg: float, /) -> None:
"""
reference epoch for the mean anomaly
"""
...

@property
def N(self) -> int:
Expand Down Expand Up @@ -249,3 +255,60 @@ class loadtxt:
def usecols(self, arg: list[int], /) -> kima.Data.loadtxt:
...

class multiRVData:
"""
docs
"""

@property
def N(self) -> int:
"""
Total number of observations
"""
...

def __init__(self, filenames: list[list[str]], units: str = 'ms', skip: int = 0, max_rows: int = 0, delimiter: str = ' ') -> None:
...

@property
def full_sig(self) -> list[float]:
"""
The observed RV uncertainties
"""
...

@property
def full_t(self) -> list[float]:
"""
The times of observations
"""
...

@property
def full_y(self) -> list[float]:
"""
The observed radial velocities
"""
...

@property
def sig(self) -> list[list[float]]:
"""
The observed RV uncertainties
"""
...

@property
def t(self) -> list[list[float]]:
"""
The times of observations
"""
...

@property
def y(self) -> list[list[float]]:
"""
The observed radial velocities
"""
...

9 changes: 5 additions & 4 deletions src/kima/GAIAmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,11 +544,12 @@ void GAIAmodel::save_setup() {
fout << "[data]" << endl;
fout << "file: " << data._datafile << endl;
fout << "skip: " << data._skip << endl;
fout << "units: " << data._units << endl;

fout << "files: ";
for (auto f: data._datafile)
fout << f << ",";
fout << endl;
// fout << "files: ";
// for (auto f: data._datafile)
// fout << f << ",";
// fout << endl;

fout.precision(15);
fout << "M0_epoch: " << data.M0_epoch << endl;
Expand Down
39 changes: 39 additions & 0 deletions src/kima/RVFWHMmodel.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,45 @@ class RVFWHMmodel:
def set_known_object(self, arg: int, /) -> None:
...

@property
def share_eta2(self) -> bool:
"""
whether the η2 parameter is shared between RVs and FWHM
"""
...
@share_eta2.setter
def share_eta2(self, arg: bool, /) -> None:
"""
whether the η2 parameter is shared between RVs and FWHM
"""
...

@property
def share_eta3(self) -> bool:
"""
whether the η3 parameter is shared between RVs and FWHM
"""
...
@share_eta3.setter
def share_eta3(self, arg: bool, /) -> None:
"""
whether the η3 parameter is shared between RVs and FWHM
"""
...

@property
def share_eta4(self) -> bool:
"""
whether the η4 parameter is shared between RVs and FWHM
"""
...
@share_eta4.setter
def share_eta4(self, arg: bool, /) -> None:
"""
whether the η4 parameter is shared between RVs and FWHM
"""
...

@property
def slope_prior(self) -> kima.distributions.Distribution:
"""
Expand Down
111 changes: 101 additions & 10 deletions src/kima/RVmodel.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ class RVConditionalPrior:
@property
def eprior(self) -> kima.distributions.Distribution:
"""
Prior for the orbital eccentricities(s)
Prior for the orbital eccentricity(ies)
"""
...
@eprior.setter
def eprior(self, arg: kima.distributions.Distribution, /) -> None:
"""
Prior for the orbital eccentricities(s)
Prior for the orbital eccentricity(ies)
"""
...

Expand Down Expand Up @@ -76,9 +76,6 @@ class RVConditionalPrior:
...

class RVmodel:
"""
None
"""

@property
def Cprior(self) -> kima.distributions.Distribution:
Expand Down Expand Up @@ -171,15 +168,79 @@ class RVmodel:
"""
...

@property
def TR_Kprior(self) -> list[kima.distributions.Distribution]:
"""
Prior for TR semi-amplitude
"""
...
@TR_Kprior.setter
def TR_Kprior(self, arg: list[kima.distributions.Distribution], /) -> None:
"""
Prior for TR semi-amplitude
"""
...

@property
def TR_Pprior(self) -> list[kima.distributions.Distribution]:
"""
Prior for TR orbital period
"""
...
@TR_Pprior.setter
def TR_Pprior(self, arg: list[kima.distributions.Distribution], /) -> None:
"""
Prior for TR orbital period
"""
...

@property
def TR_Tcprior(self) -> list[kima.distributions.Distribution]:
"""
Prior for TR mean anomaly(ies)
"""
...
@TR_Tcprior.setter
def TR_Tcprior(self, arg: list[kima.distributions.Distribution], /) -> None:
"""
Prior for TR mean anomaly(ies)
"""
...

@property
def TR_eprior(self) -> list[kima.distributions.Distribution]:
"""
Prior for TR eccentricity
"""
...
@TR_eprior.setter
def TR_eprior(self, arg: list[kima.distributions.Distribution], /) -> None:
"""
Prior for TR eccentricity
"""
...

@property
def TR_wprior(self) -> list[kima.distributions.Distribution]:
"""
Prior for TR argument of periastron
"""
...
@TR_wprior.setter
def TR_wprior(self, arg: list[kima.distributions.Distribution], /) -> None:
"""
Prior for TR argument of periastron
"""
...

def __init__(self, fix: bool, npmax: int, data: kima.Data.RVData) -> None:
"""
Implements a sum-of-Keplerians model where the number of Keplerians can be free.
This model assumes white, uncorrelated noise.
Args:
fix (bool, default=True):
fix (bool):
whether the number of Keplerians should be fixed
npmax (int, default=0):
npmax (int):
maximum number of Keplerians
data (RVData):
the RV data
Expand Down Expand Up @@ -265,6 +326,19 @@ class RVmodel:
"""
...

@property
def individual_offset_prior(self) -> list[kima.distributions.Distribution]:
"""
Common prior for the between-instrument offsets
"""
...
@individual_offset_prior.setter
def individual_offset_prior(self, arg: list[kima.distributions.Distribution], /) -> None:
"""
Common prior for the between-instrument offsets
"""
...

@property
def known_object(self) -> bool:
"""
Expand All @@ -279,6 +353,13 @@ class RVmodel:
"""
...

@property
def n_transiting_planet(self) -> int:
"""
how many transiting planets
"""
...

@property
def npmax(self) -> int:
"""
Expand Down Expand Up @@ -334,6 +415,9 @@ class RVmodel:
def set_known_object(self, arg: int, /) -> None:
...

def set_transiting_planet(self, arg: int, /) -> None:
...

@property
def slope_prior(self) -> kima.distributions.Distribution:
"""
Expand Down Expand Up @@ -373,6 +457,13 @@ class RVmodel:
"""
...

@property
def transiting_planet(self) -> bool:
"""
whether the model includes transiting planet(s)
"""
...

@property
def trend(self) -> bool:
"""
Expand Down Expand Up @@ -436,13 +527,13 @@ class TRANSITConditionalPrior:
@property
def eprior(self) -> kima.distributions.Distribution:
"""
Prior for the orbital eccentricities(s)
Prior for the orbital eccentricity(ies)
"""
...
@eprior.setter
def eprior(self, arg: kima.distributions.Distribution, /) -> None:
"""
Prior for the orbital eccentricities(s)
Prior for the orbital eccentricity(ies)
"""
...

Expand Down
Loading

0 comments on commit f23a159

Please sign in to comment.