Skip to content

Commit

Permalink
Remove tempoarary output_columns variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed Dec 18, 2018
1 parent 70b970a commit 1a064fa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions python/lsst/ap/association/mapApData.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,13 @@ def __init__(self, inputSchema, **kwargs):
def _create_bit_pack_mappings(self):
"""Setup all flag bit packings.
"""
output_columns = []
self.bit_pack_columns = []
with open(self.config.flagMap) as yaml_stream:
table_list = list(yaml.load_all(yaml_stream))
for table in table_list:
if table['tableName'] == 'DiaSource':
output_columns = table['columns']
self.bit_pack_columns = table['columns']
break
self.bit_pack_columns = output_columns

# Test that all flags requested are present in both the input and
# output schemas.
Expand Down Expand Up @@ -281,14 +280,13 @@ class UnpackPpdbFlags(object):
"""

def __init__(self, flag_map_file, table_name):
output_columns = []
self.bit_pack_columns = []
with open(flag_map_file) as yaml_stream:
table_list = list(yaml.load_all(yaml_stream))
for table in table_list:
if table['tableName'] == table_name:
output_columns = table['columns']
self.bit_pack_columns = table['columns']
break
self.bit_pack_columns = output_columns

self.output_flag_columns = {}

Expand Down

0 comments on commit 1a064fa

Please sign in to comment.