Skip to content

Commit

Permalink
join/split archetype subtypes by semicolon instead of comma
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Bailey authored and Stephen Bailey committed Apr 19, 2024
1 parent 621bc0a commit de8fdbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/redrock/archetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def nearest_neighbour_model(self, target,weights,flux,wflux,dwave,z, n_nearest,
(zzchi2, zzcoeff) = calc_zchi2_batch(spectra, tdata, weights, flux, wflux, 1, nbasis, use_gpu=False)

sstype = ['%s'%(self._subtype[k]) for k in iBest] # subtypes of best archetypes
fsstype = ','.join(sstype)
fsstype = ';'.join(sstype)
#print(sstype)
#print(z, zzchi2, zzcoeff, fsstype)
return zzchi2[0], zzcoeff[0], self._rrtype+':::%s'%(fsstype)
Expand Down Expand Up @@ -453,7 +453,7 @@ def split_archetype_coeff(subtype, coeff, nbands, nleg=None):
If nleg is None, it will be derived from counting non-zero terms of coeff.
Expected length of non-zero coeffs is num_subtypes + nbands*nleg.
"""
narchetypes = len(subtype.split(','))
narchetypes = len(subtype.split(';'))
archcoeff = coeff[0:narchetypes]
all_legcoeff = coeff[narchetypes:]

Expand Down

0 comments on commit de8fdbd

Please sign in to comment.