Skip to content

Commit

Permalink
set GMM attribute correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
moustakas committed Mar 26, 2019
1 parent 9bea2a5 commit ead2986
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions py/desitarget/mock/mockmaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ def read_GMM(self, target=None):
if getattr(self, 'GMM_{}'.format(target.upper())) is not None:
return
except:
return
pass
#return

gmmdir = resource_filename('desitarget', 'mock/data/dr7.1')
if not os.path.isdir:
Expand Down Expand Up @@ -513,7 +514,7 @@ def read_GMM(self, target=None):
gmmcols = [info[1] for info in gmm]
GMM = [info[2] for info in gmm]

setattr(SelectTargets, 'GMM_{}'.format(target.upper()), (morph, fractype, gmmcols, GMM))
setattr(self, 'GMM_{}'.format(target.upper()), (morph, fractype, gmmcols, GMM))

def sample_GMM(self, nobj, isouth=None, target=None, seed=None, morph=None,
prior_mag=None, prior_redshift=None):
Expand Down

0 comments on commit ead2986

Please sign in to comment.