diff --git a/src/pacman/lib/least_squares.py b/src/pacman/lib/least_squares.py index d363ecf..6aa73ff 100644 --- a/src/pacman/lib/least_squares.py +++ b/src/pacman/lib/least_squares.py @@ -63,14 +63,14 @@ def lsq_fit(fit_par, data, meta, model, myfuncs, noclip=False): if m.errmsg: print("MPFIT error message", m.errmsg) if meta.run_verbose: - f_lsq = open(meta.workdir + meta.fitdir + '/lsq_res/' + "/lsq_res_bin{0}_wvl{1:0.3f}.txt".format(meta.s30_file_counter, meta.wavelength), 'w') + f_lsq = open(os.path.join(meta.workdir, meta.fitdir, 'lsq_res', "lsq_res_bin{0}_wvl{1:0.3f}.txt".format(meta.s30_file_counter, meta.wavelength)), 'w') PrintParams(m, data, savefile=f_lsq) f_lsq.close() PrintParams(m, data) if meta.save_fit_lc_plot: - if not os.path.isdir(meta.workdir + meta.fitdir + '/fit_lc'): - os.makedirs(meta.workdir + meta.fitdir + '/fit_lc') + if not os.path.isdir(os.path.join(meta.workdir, meta.fitdir, 'fit_lc')): + os.makedirs(os.path.join(meta.workdir, meta.fitdir, 'fit_lc')) plots.plot_fit_lc2(data, model, meta) plots.plot_fit_lc3(data, model, meta) plots.save_plot_raw_data(data, meta) diff --git a/src/pacman/lib/util.py b/src/pacman/lib/util.py index 62a3bc6..a8c3551 100644 --- a/src/pacman/lib/util.py +++ b/src/pacman/lib/util.py @@ -788,9 +788,9 @@ def create_res_dir(meta): """ Creates the result directory depending on which fitters were used. """ - print(meta.workdir) - print(meta.fitdir) - print(os.path.join(meta.workdir, meta.fitdir, 'lsq_res')) + print('HALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOOOO????????????????????????????????', meta.workdir) + print('HALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOOOO????????????????????????????????222222', meta.fitdir) + print('HALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOOOO???????????????????????????????3333333333333?', os.path.join(meta.workdir, meta.fitdir, 'lsq_res')) if meta.run_lsq: if not os.path.isdir(os.path.join(meta.workdir, meta.fitdir, 'lsq_res')): os.makedirs(os.path.join(meta.workdir, meta.fitdir, 'lsq_res'))