Clean Dataset

This notebook generates a table of whether Franzen ATLAS-CDFS objects are extended or compact.


In [1]:
import astropy.io.ascii as asc, astropy.table, numpy
table = asc.read('one-table-to-rule-them-all.tbl')

In [2]:
sp = table['Component Sp (Franzen)']
s = table['Component S (Franzen)']
franzen_ratios = s / sp
clean = astropy.table.Table(data=[table['Key'], franzen_ratios < 1], names=['Key', 'Clean'], dtype=[int, int])
clean.write('clean-atlas.tbl', format='ascii')
resolved = astropy.table.Table(data=[table['Key'], franzen_ratios > 1], names=['Key', 'Clean'], dtype=[int, int])
resolved.write('resolved-atlas.tbl', format='ascii')
clean


WARNING: AstropyDeprecationWarning: clean-atlas.tbl already exists. Automatically overwriting ASCII files is deprecated. Use the argument 'overwrite=True' in the future. [astropy.io.ascii.ui]
Out[2]:
<Table masked=True length=3155>
KeyClean
int64int64
00
10
2--
3--
40
5--
60
71
81
9--
......
31451
31461
31471
31481
31491
31501
31511
31521
31531
31541

In [35]:
# Analysis: How many of the clean objects have Norris labels?
has_norris_label = [bool(i) and i.startswith('SWIRE') for i in table['Source SWIRE (Norris)']]
print('Compact and Norris-labelled:', numpy.logical_and(franzen_ratios < 1, has_norris_label).sum())
print('Resolved and Norris-labelled:', numpy.logical_and(franzen_ratios > 1, has_norris_label).sum())


Compact and Norris-labelled: 385
Resolved and Norris-labelled: 223

In [36]:
# Analysis: How many of the clean objects have RGZ labels?
has_rgz_label = [bool(i) for i in table['Source SWIRE Name (RGZ)']]
print('Compact and RGZ-labelled:', numpy.logical_and(franzen_ratios < 1, has_rgz_label).sum())
print('Resolved and RGZ-labelled:', numpy.logical_and(franzen_ratios > 1, has_rgz_label).sum())


Compact and RGZ-labelled: 1986
Resolved and RGZ-labelled: 380

In [38]:
# Analysis: How many of the clean objects have both Norris and RGZ labels?
has_both_label = numpy.logical_and(has_norris_label, has_rgz_label)
print('Compact and labelled:', numpy.logical_and(franzen_ratios < 1, has_both_label).sum())
print('Resolved and labelled:', numpy.logical_and(franzen_ratios > 1, has_both_label).sum())


Compact and labelled: 332
Resolved and labelled: 188

In [ ]: