From 0dd8086b73078e0ee19a4d9763beeca2beddfc3a Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 12 Dec 2017 14:14:51 +0800 Subject: astro/make_photon_list.py: Fix sorting by time (1st column) --- astro/suzaku/make_photon_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'astro/suzaku/make_photon_list.py') diff --git a/astro/suzaku/make_photon_list.py b/astro/suzaku/make_photon_list.py index d8fe679..8ffe7a9 100755 --- a/astro/suzaku/make_photon_list.py +++ b/astro/suzaku/make_photon_list.py @@ -355,7 +355,7 @@ def main(): header_out.add_history(" ".join(sys.argv)) logger.info("Creating photons table ...") photons = np.row_stack(photonlist) - photons.sort(axis=0) # sort by time in place + photons = photons[photons[:, 0].argsort()] # sort by time (1st column) hdu = fits.BinTableHDU.from_columns([ fits.Column(name="PHOTON_TIME", format="D", unit="s", array=photons[:, 0]), -- cgit v1.2.2