public class MHeaderTools extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MHeaderTools.Photometry
Header keyss for use with photometry
|
| Modifier and Type | Field and Description |
|---|---|
static String |
BITPIX
The mandatory FITS key denoting the end of the header section.
|
static String |
BSCALE
The FITS key denoting the scale of image data.
|
static String |
BSCALEREM
The FITS key denoting the scale of image data.
|
static String |
BZERO
The FITS key denoting the zero point of image data.
|
static String |
BZEROREM
The FITS key denoting the zero point of image data.
|
static String |
DATE
The FITS key denoting the yyyy-mm-tt of the observing date.
|
static String |
DATE_OBS
The header keyword for obs.
|
static String |
END
The mandatory FITS key denoting the end of the header section.
|
static String |
GAIN
Gain of CCD.
|
static String |
GAINREM
Gain of CCD.
|
static String |
NAXIS
The mandatory FITS key denoting the end of the header section.
|
static String |
RDNOISE
Read noise of CCD.
|
static String |
RDNOISEREM
Read noise of CCD.
|
static String |
SIMPLE
The mandatory FITS key denoting the end of the header section.
|
static String |
TIME
The FITS key denoting the HH:MM:ss of the observing date.
|
static String |
TIME_OBS
The header keyword for obs.
|
static NumberFormat |
WATNR |
static String |
XORIGIN
Fits key for entering x-pregap info to header.
|
static String |
XORIGINREM
Fits key for entering x-pregap info to header.
|
static String |
XTENSION
The mandatory FITS key denoting the end of the header section.
|
static String |
XTENSIONIMAGE
The recognized extensions is an image
|
static String |
YORIGIN
Fits key for entering y-pregap info to header.
|
static String |
YORIGINREM
Fits key for entering y-pregap info to header.
|
| Constructor and Description |
|---|
MHeaderTools() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addWatCards(Collection<MHeaderCard> ret,
String key,
String split) |
static Object |
getBestValue(Map<String,MHeaderCard> cards,
List<String> keytries)
Convenience method that narrows down all valid keys found in the header
to the first non-null
|
static Date |
getDateObs(HeaderDataUnit hdu)
We scan for the fits creation time.
|
static Date |
getDateObs(MFits f)
We scan for the fits creation time.
|
static Date |
getDateObs(MHeader hdu)
We scan for the fits creation time.
|
static List<HeaderValue> |
getHeaderValuesFromKeyList(Map<String,MHeaderCard> cards,
List<String> keytries)
We have a list of possible header key words, which we try one after the
other on the mapping of header cards provided.
|
static Pair<Statistic,NumberFormat> |
getHeaderValueStatistic(String key,
Collection<MHeader> comb,
NumberFormat... nfs)
A collection of similar headers is scanned for a distinct key.
|
static MHeader |
mergeWith(MHeader into,
MHeader add)
Merges all hards with keys not found in the primary header into the
primary header.
|
static MHeader |
mergeWith(MHeader into,
MHeader add,
boolean replace)
Merges two headers, discarding identical keys.
|
static String |
scanStringValue(MHeader head,
String key)
Scans an mheader for the specified key and returns a non-null value only
if a card to this key is found and the first card has a string value.
|
public static final String SIMPLE
public static final String XTENSION
public static final String BITPIX
public static final String NAXIS
public static final String BZERO
public static final String BSCALE
public static final String END
public static final String DATE_OBS
public static final String TIME_OBS
public static final String DATE
public static final String TIME
public static final String XTENSIONIMAGE
public static final String XORIGIN
public static final String YORIGIN
public static final String XORIGINREM
public static final String YORIGINREM
public static final String BZEROREM
public static final String BSCALEREM
public static final String GAIN
public static final String GAINREM
public static final String RDNOISE
public static final String RDNOISEREM
public static final NumberFormat WATNR
public static MHeader mergeWith(MHeader into, MHeader add)
into - add - public static MHeader mergeWith(MHeader into, MHeader add, boolean replace)
public static Date getDateObs(MFits f) throws ParseException
TIME-OBS and DATE-OBS. If only
date exists, it is assumed to carry a ISO-date string, otherwise we try
to parse the date from pasting DATE-OBS 'T' and
TIME-OBS together. If successful, a date is returned.ParseExceptionpublic static Date getDateObs(HeaderDataUnit hdu) throws ParseException
TIME-OBS and DATE-OBS. If only
date exists, it is assumed to carry a ISO-date string, otherwise we try
to parse the date from pasting DATE-OBS 'T' and
TIME-OBS together. If successful, a date is returned.ParseExceptionpublic static Date getDateObs(MHeader hdu) throws ParseException
TIME-OBS and DATE-OBS. If only
date exists, it is assumed to carry a ISO-date string, otherwise we try
to parse the date from pasting DATE-OBS 'T' and
TIME-OBS together. If successful, a date is returned.ParseExceptionpublic static String scanStringValue(MHeader head, String key)
head - key - public static List<HeaderValue> getHeaderValuesFromKeyList(Map<String,MHeaderCard> cards, List<String> keytries)
public static Object getBestValue(Map<String,MHeaderCard> cards, List<String> keytries)
public static void addWatCards(Collection<MHeaderCard> ret, String key, String split)
public static Pair<Statistic,NumberFormat> getHeaderValueStatistic(String key, Collection<MHeader> comb, NumberFormat... nfs) throws ParseException
key - comb - nfs - ParseException