jsky.image.fits
Class FITSKeywordProvider

java.lang.Object
  extended by jsky.image.fits.FITSKeywordProvider
All Implemented Interfaces:
WCSKeywordProvider

public class FITSKeywordProvider
extends java.lang.Object
implements WCSKeywordProvider

A simple class accessing FITS/WCS keywords, where keywords are inherited from an empty primary FITS extension, if present.

Version:
$Revision: 1.1 $
Author:
Allan Brighton

Constructor Summary
FITSKeywordProvider(FITSImage fitsImage)
           
 
Method Summary
 boolean findKey(java.lang.String key)
          Return true if the given keyword was found
 double getDoubleValue(java.lang.String key)
          Return the value of the given keyword as a double, or 0.0 if not found.
 double getDoubleValue(java.lang.String key, double defaultValue)
          Return the value of the given keyword as a double, or 0.0 if not found.
 float getFloatValue(java.lang.String key)
          Return the value of the given keyword as a double, or 0.0 if not found.
 float getFloatValue(java.lang.String key, float defaultValue)
          Return the value of the given keyword as a double, or 0.0 if not found.
 int getIntValue(java.lang.String key)
          Return the value of the given keyword as an int, or 0 if not found.
 int getIntValue(java.lang.String key, int defaultValue)
          Return the value of the given keyword as an int, or 0 if not found.
 java.lang.String getStringValue(java.lang.String key)
          Return the value of the given keyword as a String, or null if not found.
 java.lang.String getStringValue(java.lang.String key, java.lang.String defaultValue)
          Return the value of the given keyword as a String, or null if not found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FITSKeywordProvider

public FITSKeywordProvider(FITSImage fitsImage)
Method Detail

findKey

public boolean findKey(java.lang.String key)
Return true if the given keyword was found

Specified by:
findKey in interface WCSKeywordProvider

getStringValue

public java.lang.String getStringValue(java.lang.String key)
Return the value of the given keyword as a String, or null if not found.

Specified by:
getStringValue in interface WCSKeywordProvider

getStringValue

public java.lang.String getStringValue(java.lang.String key,
                                       java.lang.String defaultValue)
Return the value of the given keyword as a String, or null if not found.

Specified by:
getStringValue in interface WCSKeywordProvider

getDoubleValue

public double getDoubleValue(java.lang.String key)
Return the value of the given keyword as a double, or 0.0 if not found.

Specified by:
getDoubleValue in interface WCSKeywordProvider

getDoubleValue

public double getDoubleValue(java.lang.String key,
                             double defaultValue)
Return the value of the given keyword as a double, or 0.0 if not found.

Specified by:
getDoubleValue in interface WCSKeywordProvider

getFloatValue

public float getFloatValue(java.lang.String key)
Return the value of the given keyword as a double, or 0.0 if not found.

Specified by:
getFloatValue in interface WCSKeywordProvider

getFloatValue

public float getFloatValue(java.lang.String key,
                           float defaultValue)
Return the value of the given keyword as a double, or 0.0 if not found.

Specified by:
getFloatValue in interface WCSKeywordProvider

getIntValue

public int getIntValue(java.lang.String key)
Return the value of the given keyword as an int, or 0 if not found.

Specified by:
getIntValue in interface WCSKeywordProvider

getIntValue

public int getIntValue(java.lang.String key,
                       int defaultValue)
Return the value of the given keyword as an int, or 0 if not found.

Specified by:
getIntValue in interface WCSKeywordProvider