Skip to content

Commit

Permalink
new instrument names; store priors
Browse files Browse the repository at this point in the history
  • Loading branch information
j-faria committed Feb 6, 2025
1 parent fccefad commit 4331dfa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/kima/pykima/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,11 @@ def parameter_priors(self):
prior = self.priors[f'individual_offset_prior[{i}]']
priors[self.indices['inst_offsets']][i] = prior

if self.indicator_correlations:
prior = self.priors['beta_prior']
priors[self.indices['betas']] = prior


if self.has_gp:
if self.model == 'GPmodel':
priors[self.indices['GPpars']] = [
Expand Down Expand Up @@ -1161,6 +1166,9 @@ def parameter_priors(self):
planet_priors.append(self.priors['wprior'])
priors[self.indices['planets']] = planet_priors

if self.studentt:
priors[self.indices['nu']] = self.priors['nu_prior']

try:
priors[self.indices['vsys']] = self.priors['Cprior']
except KeyError:
Expand Down Expand Up @@ -1612,6 +1620,7 @@ def log_posterior(self, sample, separate=False):
return logp + logl, logl, logp
return logp + logl

@lru_cache
def map_sample(self, Np=None, mask=None, printit=True,
from_posterior=False):
"""
Expand Down
5 changes: 3 additions & 2 deletions src/kima/pykima/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,9 @@ def get_instrument_name(data_file):
r'SOPHIE',
r'HAMILTON',
r'NIRPS',
r'PFS',
r'UCLES'
r'PFS[\d+]',
r'UCLES',
r'MIKE',
])
return re.findall(pattern, bn, re.IGNORECASE)[0]

Expand Down

0 comments on commit 4331dfa

Please sign in to comment.