Skip to content

Commit

Permalink
dg_mosaic: Support for single entry TLC
Browse files Browse the repository at this point in the history
  • Loading branch information
Zack Moratto committed Feb 21, 2013
1 parent e9e050b commit ddd7554
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/asp/Tools/dg_mosaic.py.in
Expand Up @@ -63,6 +63,12 @@ def read_tlc( filename ):
for tlc_item in IMAGE.find("TLCLISTList").findall("TLCLIST"): for tlc_item in IMAGE.find("TLCLISTList").findall("TLCLIST"):
tokens = tlc_item.text.strip().split(' ') tokens = tlc_item.text.strip().split(' ')
tlclist.append([float(tokens[0]), float(tokens[1])]) tlclist.append([float(tokens[0]), float(tokens[1])])
if len(tlclist) == 1:
direction = 1.0
if IMAGE.find("SCANDIRECTION").text.lower() != "forward":
direction = -1.0
linerate = float(IMAGE.find("AVGLINERATE").text)
tlclist.append([(linerate+tlclist[0][0]), (tlclist[0][1]+direction)])
firstlinetime = datetime.strptime(IMAGE.find("FIRSTLINETIME").text, firstlinetime = datetime.strptime(IMAGE.find("FIRSTLINETIME").text,
"%Y-%m-%dT%H:%M:%S.%fZ") "%Y-%m-%dT%H:%M:%S.%fZ")
image_size = [] image_size = []
Expand Down

0 comments on commit ddd7554

Please sign in to comment.