-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH version of load_results has different behaviour than pip-installable version #11
Comments
Currently (on main) you must call res = kima.load_results(model, diagnostic=False) but I will keep this issue open because I want to restore the ability to "guess" the model from the directory where the function runs. |
Do you have to re-define all of the priors (and known_planets) or can kima infer those from the disk products? |
Those settings are stored in (both) the |
It seems that that is the case. For the loading, I guess that it is fairly straightforward. I am running it like this: model_map = {"GPmodel": GPmodel, "RVFWHMmodel": RVFWHMmodel}
selected_folder = paths["run4"]
with chdir(selected_folder):
with open(selected_folder / "kima_model_setup.txt") as to_read:
for line in to_read:
if "model" in line:
Kimamodel = model_map[line.split(":")[-1].strip()]
if "fix" in line:
state = line.split(":")[-1].strip()
fix = False if state == "false" else True
if "npmax" in line:
npmax = int(line.split(":")[-1])
if "files" in line:
input_files = line.split(":")[-1].split(",")[:-1]
break
data = RVData(
filenames=input_files,
units="ms",
skip=0,
indicators=["fwhm", "s-fwhm", "cont", "s-cont", "bis", "s-bis"],
)
model = Kimamodel(fix=fix, npmax=npmax, data=data)
res = kima.load_results(model, diagnostic=False) I will not open a PR due to:
|
When running the
we get the traceback
An attempt to pass the current directory through the model_or_file argument leads to:
The same issue occurs when directly calling KimaResults that -- from the docs -- should be able to load data from the current directory
PS: all of this was run with the context manager from kima.pykima.utils.chdir
The text was updated successfully, but these errors were encountered: