From 104f612aaacf5ce2421ee4775fbe1644410e2346 Mon Sep 17 00:00:00 2001 From: Attila Kovacs Date: Mon, 16 Sep 2019 11:57:09 -0500 Subject: [PATCH] 0.30-2 (devel.4): Fix parsing of FITS coordinate epoch when RADESYS is not present. --- change.log | 14 +++++++++++++- src/jnum/Util.java | 2 +- src/jnum/astro/CoordinateEpoch.java | 5 ++++- src/jnum/text/AngleFormat.java | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/change.log b/change.log index d77cdce..009a9f6 100644 --- a/change.log +++ b/change.log @@ -1,4 +1,16 @@ - [BUG] AngleFormat parsing negative angles was incorrect. Fixed. + + [BUG] {AngleFormat} parsing negative angles was incorrect. Fixed. + + [FIX] {CoordinateEpoch} Fix case mitmatch in comparison. + + [FIX] {CoordinateEpoch} Parsing of FITS headers even if RADESYS is + not present. + + [FIX] {AbstractMap2D1} Write WCSAXES=3 in FITS headers. + + [TWEAK] {PrecessingCoordinates} Default to J2000 when parsing + coordinates with no epoch given in String or defined in parsing + object. 0.30-1 diff --git a/src/jnum/Util.java b/src/jnum/Util.java index 2dc9e3e..7819bb2 100644 --- a/src/jnum/Util.java +++ b/src/jnum/Util.java @@ -54,7 +54,7 @@ public final class Util { public final static String version = "0.30-2"; - public final static String revision = "devel.3"; + public final static String revision = "devel.4"; public final static String copyright = "(c)2019 Attila Kovacs"; diff --git a/src/jnum/astro/CoordinateEpoch.java b/src/jnum/astro/CoordinateEpoch.java index 249c7a2..c0ccf46 100644 --- a/src/jnum/astro/CoordinateEpoch.java +++ b/src/jnum/astro/CoordinateEpoch.java @@ -109,7 +109,10 @@ public void editHeader(Header header, String alt) throws HeaderCardException { public static CoordinateEpoch fromHeader(Header header, String alt) { double year = header.getDoubleValue("EQUINOX" + alt, Double.NaN); - String system = header.getStringValue("RADESYS").toLowerCase(); + String system = header.getStringValue("RADESYS"); + + if(system == null) system = ""; + else system.toUpperCase(); if(system.startsWith("FK4")) return new BesselianEpoch(Double.isNaN(year) ? 1950.0 : year); else if(year < 1984.0) return new BesselianEpoch(year); diff --git a/src/jnum/text/AngleFormat.java b/src/jnum/text/AngleFormat.java index 26250e0..29150a4 100644 --- a/src/jnum/text/AngleFormat.java +++ b/src/jnum/text/AngleFormat.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017 Attila Kovacs . + * Copyright (c) 2019 Attila Kovacs . * All rights reserved. * * This file is part of jnum.