Skip to content

Commit 0d130e6

Browse files
committed
use -1 for null values
1 parent 67d50b4 commit 0d130e6

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

bin/LSLGA-build-parent

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
"""Generate the parent sample of large galaxies.
44
5+
from LSLGA.io import read_parent
6+
ss = read_parent(verbose=True)
7+
gnum = ss['GROUP_ID']
8+
npergrp, _ = np.histogram(gnum, bins=len(gnum), range=(0, len(gnum)))
9+
print('Found {} total groups, including:'.format(len(set(gnum))))
10+
print(' {} groups with 1 member'.format(np.sum( (npergrp == 1) ).astype('int')))
11+
print(' {} groups with 2 members'.format(np.sum( (npergrp == 2) ).astype('int')))
12+
print(' {} group(s) with 3-5 members'.format(np.sum( (npergrp >= 3)*(npergrp <= 5) ).astype('int')))
13+
print(' {} group(s) with 6-10 members'.format(np.sum( (npergrp >= 6)*(npergrp <= 10) ).astype('int')))
14+
print(' {} group(s) with >10 members'.format(np.sum( (npergrp > 10) ).astype('int')))
15+
516
"""
617
import os, sys, time, pdb
718
import numpy as np
@@ -17,7 +28,7 @@ from legacyhalos.misc import viewer_inspect, imagetool_inspect
1728
sampledir = LSLGA.io.sample_dir()
1829
qadir = os.path.join(LSLGA.io.sample_dir(), 'qa')
1930

20-
def add_ngc(parent, startindx=5000000):
31+
def add_ngc(parent, startindx=4000000):
2132
"""Add in missing NGC galaxies.
2233
2334
"""
@@ -275,7 +286,7 @@ def add_ngc(parent, startindx=5000000):
275286

276287
return parent
277288

278-
def add_rc3(parent, startindx=4000000):
289+
def add_rc3(parent, startindx=3000000):
279290
"""Add in missing RC3 galaxies.
280291
281292
"""
@@ -1511,7 +1522,7 @@ def add_localgroup_dwarfs(parent):
15111522

15121523
return parent
15131524

1514-
def add_dr8_candidates(parent, startindx=6000000):
1525+
def add_dr8_candidates(parent, startindx=5000000):
15151526
"""Read the set of "large" galaxies identified by Stephanie Juneau from the DR8
15161527
catalogs.
15171528
@@ -1597,7 +1608,7 @@ def add_dr8_candidates(parent, startindx=6000000):
15971608
for col in supp.colnames:
15981609
if col in out.colnames:
15991610
out[col] = supp[col]
1600-
out['Z'] = -99.0
1611+
out['Z'] = -1.0
16011612
#out['OBJTYPE'] = 'G'
16021613

16031614
# Get the geometry from the Tractor fit--
@@ -2233,6 +2244,8 @@ def main():
22332244
parent = add_dr8_candidates(parent)
22342245
parent = remove_spurious(parent)
22352246

2247+
pdb.set_trace()
2248+
22362249
#ww = np.where(parent['ID'] > 6e6)[0]
22372250
#imagetool_inspect(parent[ww])
22382251
#pdb.set_trace()
@@ -2268,6 +2281,10 @@ def main():
22682281
if len(fix) > 0:
22692282
parent['PGC'][fix] = -1
22702283

2284+
fix = np.where(parent['MORPHTYPE'] == 'nan')[0]
2285+
if len(fix) > 0:
2286+
parent['MORPHTYPE'][fix] = ''
2287+
22712288
# Find all galaxies in and out of the DESI footprint.
22722289
parent = in_footprint(parent, nside=args.nside)
22732290

bin/LSLGA-localgroup-dwarfs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import numpy as np
1010

1111
import LSLGA.io
1212

13-
def localgroup_dwarfs(leda=None, dwarfindx=3000000):
13+
def localgroup_dwarfs(leda=None, dwarfindx=2000000):
1414
"""Read and parse the catalog of LG galaxies from
1515
1616
# move to globular clusters bit

0 commit comments

Comments
 (0)