Skip to content

Commit

Permalink
Allow input lists for wf3rej.py.
Browse files Browse the repository at this point in the history
Resolves spacetelescope#22

Signed-off-by: Michele De La Pena <[email protected]>
  • Loading branch information
mdlpstsci committed Jun 26, 2018
1 parent 22b7718 commit 65b7f0c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions wfc3tools/wf3rej.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ def wf3rej(input, output="", crrejtab="", scalense="", initgues="",
raise IOError("wf3rej does not accept association tables")
if len(parseinput.irafglob(input)) == 0:
raise IOError("No valid image specified")
if len(parseinput.irafglob(input)) > 1:
raise IOError("wf3rej can only accept 1 file for"
"input at a time: {0}".format(infiles))

for image in infiles:
if not os.path.exists(image):
raise IOError("Input file not found: {0}".format(image))

call_list.append(input)
input_string_list = ','.join(input)
call_list.append(input_string_list)

if output:
call_list.append(str(output))
Expand Down

0 comments on commit 65b7f0c

Please sign in to comment.