IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19800


Ignore:
Timestamp:
Oct 1, 2008, 6:14:04 PM (18 years ago)
Author:
Sebastian Jester
Message:

Use hash for list of fields to be copied from input primary header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py

    r19787 r19800  
    140140    h = table.header
    141141    table_data = table.data
    142     run = h['RUN']
    143     rerun = h['RERUN']
    144     camcol = h['CAMCOL']
    145     field = h['FIELD']
    146     filtnam = h['FILTER']
     142    # Header names that are going to be copied to output table as
     143    # "reference columns"
     144    copyfields_list = ['RUN','RERUN','CAMCOL','FIELD','FILTER']
     145    outhash = {}
     146    for f in copyfields_list:
     147        outhash[f] = h[f]   
    147148
    148149    # These are just the columns; need to get a slice with the correct array index later
     
    157158        }
    158159
    159     outhash = {'RUN':run,'RERUN':rerun,'CAMCOL':camcol,'FIELD':field,'FILTER':filtnam}
    160160    ismag = re.compile('mag')
    161161    iscounts = re.compile('counts')
Note: See TracChangeset for help on using the changeset viewer.