Skip to content

Commit

Permalink
fix few failurs
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Nov 16, 2024
1 parent a23ee33 commit 72ab328
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion py/rvspecfit/fitter_ccf.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def fit(specdata, config):
# the best value is l = ((S/E^2) xx T)/(1/E^2 xx T^2)
# Thus the best chisq is -((S/E^2) xx T)^2/(1/E^2 xx T^2)
# where xx is the convolution operator
if ccf_confs[ii].continuum:
if ccf_confs[ii]['continuum']:
chisq = -2 * curccf0 + curccf1
else:
chisq = (-curccf0**2 / curccf1)
Expand Down
4 changes: 2 additions & 2 deletions py/rvspecfit/spec_inter.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, uvecs, vecs, idgrid):
self.edges = [np.array(_) for _ in edges] # 0,1,0,1 vectors
self.lens = np.array([len(_) for _ in self.uvecs])
self.Ns = self.idgrid.shape
self.ptp = vecs.ptp(axis=1)
self.ptp = np.ptp(vecs, axis=1)
self.tree = scipy.spatial.cKDTree(vecs.T / self.ptp[None, :],
compact_nodes=False,
balanced_tree=False)
Expand Down Expand Up @@ -123,7 +123,7 @@ def __init__(self, uvecs, idgrid, vecs, dats, exp=True):
# list of vectors corresponding to vertices of unit cube, i.e.
# [[0,0], [0,1], [1,0], [1, 1]]

self.ptp = vecs.ptp(axis=1)
self.ptp = np.ptp(vecs, axis=1)
self.tree = scipy.spatial.cKDTree(vecs.T / self.ptp[None, :])

def get_nearest(self, p):
Expand Down

0 comments on commit 72ab328

Please sign in to comment.