Skip to content

Commit

Permalink
removelines/uniformize: propagate headers from input to output
Browse files Browse the repository at this point in the history
  • Loading branch information
dstndstn committed May 10, 2023
1 parent 1fa2190 commit f851361
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion util/removelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def removelines(infile, outfile, xcol='X', ycol='Y', ext=1, cut=None, **kwargs):
#header.add_history('This xylist was filtered by the "removelines.py" program')
#header.add_history('to remove horizontal and vertical lines of sources')
#header['REMLINEN'] = (len(x) - len(xc), 'Number of sources removed by "removelines.py"')
T.writeto(outfile)
T.writeto(outfile, header=T.get_header())
return 0

def main():
Expand Down
4 changes: 2 additions & 2 deletions util/uniformize.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def uniformize(infile, outfile, n, xcol='X', ycol='Y', ext=1, **kwargs):
T = fits_table(infile, lower=False)
if len(T) == 0:
print('No sources')
T.writeto(outfile)
T.writeto(outfile, header=T.get_header())
return
x = T.get(xcol)
y = T.get(ycol)
Expand Down Expand Up @@ -63,7 +63,7 @@ def uniformize(infile, outfile, n, xcol='X', ycol='Y', ext=1, **kwargs):
J = np.array(J)
#header.add_history('This xylist was filtered by the "uniformize.py" program')
T.cut(J)
T.writeto(outfile)
T.writeto(outfile, header=T.get_header())
return 0

def main():
Expand Down

0 comments on commit f851361

Please sign in to comment.