aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-12-12 14:14:51 +0800
committerAaron LI <aly@aaronly.me>2017-12-12 14:14:51 +0800
commit0dd8086b73078e0ee19a4d9763beeca2beddfc3a (patch)
treeacf3fa66bfb22ca8a40a7c1373517449c0831ceb
parent26dfdb16d9ff943084da0b21a8a1be1be0b80ead (diff)
downloadatoolbox-0dd8086b73078e0ee19a4d9763beeca2beddfc3a.tar.bz2
astro/make_photon_list.py: Fix sorting by time (1st column)
-rwxr-xr-xastro/suzaku/make_photon_list.py2
1 files changed, 1 insertions, 1 deletions
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]),