|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
astro.fits.Icat
public class Icat
Base class for icat preparation, joining, and finishing. Provides necessarry path for all of the icat subobjects. The following file name appendices are created or interpreted by ICAT:
| Nested Class Summary | |
|---|---|
static class |
Icat.Compress
Compresses a list of files. |
static class |
Icat.Snoop
Snoops into the save-file and print its content. |
static class |
Icat.Uncompress
Uncompresses a list of files. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
static String |
BIASCOMBINED
|
static String |
DATAEXTENSION
Data file extension. |
private static String |
DEFANALYSISPAR
The location of the analysis-parameter file. |
private static String |
DEFANALYSISPARNO
The location of the analysis-parameter file. |
private static String |
DEFANALYSISPARYES
The location of the analysis-parameter file. |
private static String |
DEFARCHIVE
Start of directory tree of archive. |
private static String |
DEFCALIBPAR
The location of the calibration-parameter file. |
private static String |
DEFCALIBPARDARK
The location of the calibration-parameter file for dark reduction. |
private static String |
DEFCALIBPARNODARK
The location of the calibration-parameter file for no dark reduction. |
private static String |
DEFCALIBPARSKIP
The location of the calibration-parameter file. |
private static String |
DEFDATEKEY
The default key-name for the date of the observation. |
private static String |
DEFEXPOSUREKEY
The default key-name for the exposure time of the observation. |
private static String |
DEFFILTERKEY
The default key-name for the filter of the observation. |
static String |
DEFFROM
The default from address. |
private static String |
DEFICATDIR
The main root directory where ICAT resides. |
private static String |
DEFICATIN
The default input directory. |
private static String |
DEFIMAGETYPEKEY
The default key-name for the type of the observation. |
private static String |
DEFIMCOPY
Default path to imcopy. |
private static String |
DEFIMCOPYFLAG
Default extension for compress. |
private static String |
DEFLOCALFITS
Directory where the compressed files are stored for transfer. |
private static String |
DEFLOCALTMP
Directory where the compressed files are stored for transfer. |
private static String |
DEFMODEANALYSE
The location of the mode-parameter file. |
private static String |
DEFMODEPAR
The location of the mode-parameter file. |
private static String |
DEFPASSWORD
Default password name. |
private static String |
DEFREDUCED
Start of directory tree of archive. |
private static String |
DEFREDUCEDONE
All successfully and complete reduced dirs go into here. |
private static String |
DEFREPLACEFROM
Replace archive. |
private static String |
DEFREPLACETO
Replace archive with reduced. |
private static String |
DEFSERIALIZE
The default serialization file of the lookup table |
private static String |
DEFSMTPHOST
The default smtphost. |
private static int |
DEFSMTPPORT
The default port. |
private static String |
DEFTO
|
private static String |
DEFUSERNAME
Default user name. |
private static boolean |
DEFUSESSL
Default we use ssl. |
private Mailer |
email
Mailer instance. |
static NumberFormat |
EXPTIME
How we format the exposure time part of the file name. |
protected static String |
FE
Shortcut |
static String |
FLATHEADBIAS
|
static String |
FLATHEADDARK
|
static String |
FLATMASTERBIAS
|
static String |
FLATMASTERDARK
|
static String |
FLATMASTERSIGMA
|
static NumberFormat |
INDEXCAL
How we format the running number part of the file name, calibration. |
static NumberFormat |
INDEXSCI
How we format the running number part of the file name, science. |
private File |
input
The mian ICAT input directory, exisitng, readable and writeable. |
static String |
INPUTBIAS
The input bias image appendix. |
static String |
INPUTDARK
The input dark image appendix. |
static String |
INPUTFLATPART
The input flat image name appendix without the filter name. |
static String |
KEY_ANALYSISPAR
The location of the analysis-parameter file. |
static String |
KEY_ANALYSISPARNO
The location of the analysis-parameter file. |
static String |
KEY_ANALYSISPARYES
The location of the analysis-parameter file. |
static String |
KEY_ARCHIVE
Path to the main archive dir. |
static String |
KEY_CALIBPAR
The location of the calibration-parameter file. |
static String |
KEY_CALIBPARDARK
The location of the calibration-parameter file for dark reduction. |
static String |
KEY_CALIBPARNODARK
The location of the calibration-parameter file for no dark reduction. |
static String |
KEY_CALIBPARSKIP
The location of the calibration-parameter file for skipping calib. |
static String |
KEY_DATEKEY
This is the fits header key holding date of observation. |
static String |
KEY_EXPOSUREKEY
This is the fits header key holding exposure time of observation. |
static String |
KEY_FILTERKEY
This is the fits header key holding the filter name. |
static String |
KEY_FROM
Address of the sender, with or without domain. |
static String |
KEY_ICATDIR
The main root directory where ICAT resides. |
static String |
KEY_ICATIN
The main root directory where ICAT expect files. |
static String |
KEY_IMAGETYPEKEY
This is the fits header key designating the type of the image. |
static String |
KEY_IMCOPY
The path to the imcopy external program. |
static String |
KEY_IMCOPYFLAG
The thing to append to the target fits for imcopy. |
static String |
KEY_LOCALFITS
A re-useable file name for decompressed fits. |
static String |
KEY_LOCALTMP
Directory where the compressed files are stored for transfer. |
static String |
KEY_MODEANALYSE
The location of the mode file holding just analyse request. |
static String |
KEY_MODEPAR
The location of the mode par file. |
static String |
KEY_REDUCED
Path to the main reduced dir. |
static String |
KEY_REDUCEDONE
Path to the main reduced dir. |
static String |
KEY_REPLACEFROM
The src-part of the path that should be replaced in the final . |
static String |
KEY_REPLACETO
The src-part of the path is replaced with this . |
static String |
KEY_SERIALIZE
Where we serialize our lookup tables from one step to another. |
static String |
KEY_TO
Address list of the recipients, to-type. |
protected Map<File,String> |
lookbias
The same for calibration images, bias. |
protected Map<File,String> |
lookdark
The same for calibration images, dark. |
protected Map<File,String> |
lookflat
The same for calibration images, flat. |
protected Map<File,String> |
lookup
For later reconstruction, we have to record the lookup to orignal. |
private File |
main
The main ICAT directory, exisitng, readable and writeable. |
static String |
OUT
The file-name part for output directories per quadrant. |
static String |
OUTBDSFLAT
Calibration images, bias dark and shutter corrected if applicable. |
static String |
OUTBIAS
Calibration images, bias corrected if applicable. |
static String |
OUTBSFLAT
Calibration images, bias and shutter corrected if applicable. |
static String |
PHOTOMETRYASC
The ascii file produced by sextractor. |
static String[] |
QUADRANTS
The names of the quadrant, also the names of the sub-dirs created. |
static String |
SCIENCEBDFLAT
The bias, dark, flat and shutter corrected science image appendix. |
static String |
SCIENCEBFLAT
The bias, flat and shutter corrected science image appendix. |
static String |
SCIENCEBIAS
The bias corrected science image appendix. |
static String |
SCIENCEDARK
The bias and dark corrected science image appendix. |
static String |
SCIENCEFINAL
The final science image solution appendix. |
static String |
SCIENCERAW
The raw science image appendix. |
static String |
SCIENCETEMP
The temporal science image solution appendix. |
static Format |
YYYYMMDD
How we create a file name from the observation date. |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
Icat(Map<String,String> prop)
Defaults keys. |
|
| Method Summary | |
|---|---|
protected static void |
addExtension(List<String> aug,
Collection<String> with,
String ext)
Adds the requested extension to all the string in the list. |
protected boolean |
compress(File src,
File dest)
Uses imcopy [compress] to compress a fits file from the original path to the destination path. |
private int |
execute(String exe,
long timeout)
Uses the given executable command line string and executes that with a specified timeout. |
String |
getIcatInputExtension(String typestr)
From the type of the fits file get the icat extension, which is '.fits' for all calibration files and '_imr.fits' for science input files. |
String |
getIcatName(String typestr,
String filter,
Date expstart,
double texp,
int nr)
Returns the standard icat name from the given type, observational filter, the time of the exposure start, the exposure time in ms and a running number. |
String |
getIcatOutputExtension(String typestr)
From the type of the fits file get the icat extension, which is '.fits' for all calibration files and '_imc.fits' for science input files. |
File |
getInput()
Returns the main icat input directory. |
File |
getMain()
Returns the main ICAT directory. |
File |
getOutput()
Returns the main icat input directory. |
File |
getQuadrantInput(int q0)
Returns the icat input directory for a specified quadrant. |
File |
getQuadrantOutput(int q0)
Returns the icat output directory per quadrant, where the first reduction step, the flat-field calibrated science images, are stored on a per-quadrant basis. |
File |
getSerializeFile()
Returns a inter-process serialization file for permanent storage. |
void |
init()
We check for the main directory and create the necessarry input and output dirs if they do not exist, or purge them otherwise. |
private char |
lookupFilterChar(String filter)
|
protected File |
reducedDir(File src)
From the src-path DIR we get to the reduced path, creating any missing directories on the way. |
protected int |
restoreLookup()
Restores the lookup tables from the serialization file. |
protected void |
saveLookup()
Stores the lookup tables in the serialization file. |
boolean |
sendMail(String subject,
String text)
Sends mail to the default user. |
protected boolean |
uncompress(File src,
File dest)
Uses imcopy [compress] to compress a fits file from the original path to the destination path.See Error codes Because imcopy tends to fail for unknown reasons (error code 106), but on perfectly uncompressable files, we loop on this process at max 3 times. |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final Format YYYYMMDD
public static final NumberFormat INDEXSCI
public static final NumberFormat INDEXCAL
public static final NumberFormat EXPTIME
public static final String SCIENCERAW
public static final String SCIENCEBIAS
public static final String SCIENCEDARK
public static final String SCIENCEBDFLAT
public static final String SCIENCEBFLAT
public static final String SCIENCETEMP
public static final String SCIENCEFINAL
public static final String PHOTOMETRYASC
public static final String INPUTBIAS
public static final String INPUTDARK
public static final String INPUTFLATPART
public static final String OUTBIAS
public static final String OUTBSFLAT
public static final String OUTBDSFLAT
public static final String FLATMASTERDARK
public static final String FLATMASTERBIAS
public static final String FLATMASTERSIGMA
public static final String FLATHEADDARK
public static final String FLATHEADBIAS
public static final String BIASCOMBINED
protected static final String FE
public static final String DATAEXTENSION
public static final String[] QUADRANTS
public static final String OUT
public static final String KEY_ICATDIR
public static final String KEY_MODEPAR
public static final String KEY_MODEANALYSE
public static final String KEY_CALIBPAR
public static final String KEY_CALIBPARSKIP
public static final String KEY_CALIBPARDARK
public static final String KEY_CALIBPARNODARK
public static final String KEY_ANALYSISPAR
public static final String KEY_ANALYSISPARNO
public static final String KEY_ANALYSISPARYES
public static final String KEY_ICATIN
public static final String KEY_SERIALIZE
public static final String KEY_IMCOPY
public static final String KEY_IMCOPYFLAG
public static final String KEY_LOCALTMP
public static final String KEY_LOCALFITS
public static final String KEY_DATEKEY
public static final String KEY_EXPOSUREKEY
public static final String KEY_FILTERKEY
public static final String KEY_IMAGETYPEKEY
public static final String KEY_ARCHIVE
public static final String KEY_REDUCED
public static final String KEY_REPLACEFROM
public static final String KEY_REPLACETO
public static final String KEY_REDUCEDONE
public static final String KEY_FROM
public static final String KEY_TO
private static final String DEFICATDIR
private static final String DEFMODEPAR
private static final String DEFMODEANALYSE
private static final String DEFCALIBPAR
private static final String DEFCALIBPARSKIP
private static final String DEFCALIBPARDARK
private static final String DEFCALIBPARNODARK
private static final String DEFANALYSISPAR
private static final String DEFANALYSISPARNO
private static final String DEFANALYSISPARYES
private static final String DEFICATIN
private static final String DEFSERIALIZE
private static final String DEFIMCOPY
private static final String DEFIMCOPYFLAG
private static final String DEFLOCALTMP
private static final String DEFLOCALFITS
private static final String DEFDATEKEY
private static final String DEFEXPOSUREKEY
private static final String DEFFILTERKEY
private static final String DEFIMAGETYPEKEY
private static final String DEFARCHIVE
private static final String DEFREDUCED
private static final String DEFREDUCEDONE
public static final String DEFFROM
private static final String DEFTO
private static final String DEFSMTPHOST
private static final int DEFSMTPPORT
private static final boolean DEFUSESSL
private static final String DEFUSERNAME
private static final String DEFPASSWORD
private static final String DEFREPLACEFROM
private static final String DEFREPLACETO
protected Map<File,String> lookup
protected Map<File,String> lookbias
protected Map<File,String> lookdark
protected Map<File,String> lookflat
private File main
private File input
private Mailer email
| Constructor Detail |
|---|
public Icat(Map<String,String> prop)
| Method Detail |
|---|
public void init()
IllegalArgumentException is thrown, if the main
directory or the in/out directories cannot be created or purged,
or unreadable/unwritable.
init in interface Initializableinit in class PropertyResourcesprivate char lookupFilterChar(String filter)
public String getIcatName(String typestr,
String filter,
Date expstart,
double texp,
int nr)
public String getIcatInputExtension(String typestr)
public String getIcatOutputExtension(String typestr)
public File getMain()
public File getQuadrantInput(int q0)
public File getInput()
public File getOutput()
public File getQuadrantOutput(int q0)
public File getSerializeFile()
private int execute(String exe,
long timeout)
protected File reducedDir(File src)
protected boolean compress(File src,
File dest)
protected boolean uncompress(File src,
File dest)
protected void saveLookup()
throws IOException
IOException
protected int restoreLookup()
throws IOException
IOException
public boolean sendMail(String subject,
String text)
protected static void addExtension(List<String> aug,
Collection<String> with,
String ext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||