From 617d3f5160ce7787e38b36223c3fe926e33c22b3 Mon Sep 17 00:00:00 2001 From: Cees Bassa Date: Thu, 2 Jan 2020 22:10:13 +0100 Subject: [PATCH] Sort diagnostic plots by NORAD ID --- stvid/extract.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stvid/extract.py b/stvid/extract.py index 8e77696..2f0aba1 100644 --- a/stvid/extract.py +++ b/stvid/extract.py @@ -163,7 +163,7 @@ def store_results(ident, fname, path, iod_line): color = "magenta" # Copy files - pngfile = fname.replace(".fits", "_%05d.png" % ident.norad) + pngfile = "%05d_%s" % (ident.norad, fname.replace(".fits", ".png")) try: shutil.copy2(fname, dest) shutil.copy2(fname + ".cat", dest) @@ -334,8 +334,8 @@ def extract_tracks(fname, trkrmin, drdtmin, drdtmax, trksig, ntrkmin, path, resu obs.nfd, obs.ra, obs.de) # Create diagnostic plot - plot_header(fname.replace(".fits", "_%05d.png/png" % ident.norad), - ff, iod_line) + pngfile = "%05d_%s" % (ident.norad, fname.replace(".fits", ".png")) + plot_header(pngfile + "/png", ff, iod_line) ppg.pgimag(ff.zmax, ff.nx, ff.ny, 0, ff.nx - 1, 0, ff.ny - 1, ff.zmaxmax, ff.zmaxmin, tr) @@ -419,7 +419,7 @@ def extract_tracks(fname, trkrmin, drdtmin, drdtmax, trksig, ntrkmin, path, resu obs.nfd, obs.ra, obs.de) # Create diagnostic plot - pngfile = fname.replace(".fits", "_%05d.png" % ident.norad) + pngfile = "%05d_%s" % (ident.norad, fname.replace(".fits", ".png")) plot_header(pngfile + "/png", ff, iod_line) ppg.pgimag(ztrk, ff.nx, ff.ny, 0, ff.nx - 1, 0, ff.ny - 1, vmax,