Skip to content

Commit

Permalink
error_prop.error_prop_chuncodes: print statement for overwriting outp…
Browse files Browse the repository at this point in the history
…ut file (iss #5)
  • Loading branch information
astrochun committed Mar 15, 2020
1 parent 3519d93 commit 3e6153a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Metallicity_Stack_Commons/error_prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ def error_prop_chuncodes(path):
# Edit ASCII Table
new_flux_file = join(path, filename_dict['bin_fit_rev'])

asc.write(flux_tab0, new_flux_file, format='fixed_width_two_line')
if exists(new_flux_file):
print("Overwriting: "+new_flux_file)
else:
print("Writing: "+new_flux_file)
asc.write(flux_tab0, new_flux_file, overwrite=True, format='fixed_width_two_line')

# Save npz files
np.savez(path + 'flux_propdist.npz', **flux_propdist_dict)
Expand Down

0 comments on commit 3e6153a

Please sign in to comment.