Skip to content

Commit

Permalink
0.30-2 (devel.4): Fix parsing of FITS coordinate epoch when RADESYS i…
Browse files Browse the repository at this point in the history
…s not present.
  • Loading branch information
attipaci committed Sep 16, 2019
1 parent 90b2f6e commit 104f612
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
14 changes: 13 additions & 1 deletion change.log
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/jnum/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
5 changes: 4 additions & 1 deletion src/jnum/astro/CoordinateEpoch.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/jnum/text/AngleFormat.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017 Attila Kovacs <attila[AT]sigmyne.com>.
* Copyright (c) 2019 Attila Kovacs <attila[AT]sigmyne.com>.
* All rights reserved.
*
* This file is part of jnum.
Expand Down

0 comments on commit 104f612

Please sign in to comment.