|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjview.JFitsFactory
public class JFitsFactory
This class provides static methods for retrieving fits from DSS archives and getting WCS information out of it.
| Nested Class Summary | |
|---|---|
static class |
JFitsFactory.Get
|
static class |
JFitsFactory.Method
Known retrieval methods. |
| Field Summary | |
|---|---|
private static JFitsFactory.Method |
current
Current active retrieval method.. |
static int |
DSS1
Get DSS-1. |
static int |
DSS2BLUE
Get DSS-2-blue. |
static int |
DSS2IR
Get DSS-2-infra-red. |
static int |
DSS2RED
Get DSS-2-red. |
private static String |
ESOCGIPATH
|
private static String |
ESODSS1
|
private static String |
ESODSS2BLUE
|
private static String |
ESODSS2IR
|
private static String |
ESODSS2RED
|
private static String |
ESODSSDEFAULT
|
private static double |
ESOMAXSIZE
|
private static String |
ESOSERVER
|
private static String |
HTTP
|
private static String |
LOCALPATH
|
private static int |
LOCALPORT
|
private static String |
LOCALSERVER
|
private static String |
NAOJPCGIPATH
|
private static String |
NAOJPDSS1
|
private static String |
NAOJPDSS2BLUE
|
private static String |
NAOJPDSS2IR
|
private static String |
NAOJPDSS2RED
|
private static String |
NAOJPDSSDEFAULT
|
private static double |
NAOJPMAXSIZE
|
private static String |
NAOJPSERVER
|
private static String |
STSCICGIPATH
|
private static String |
STSCIDSS1
|
private static String |
STSCIDSS2BLUE
|
private static String |
STSCIDSS2IR
|
private static String |
STSCIDSS2RED
|
private static String |
STSCIDSSDEFAULT
|
private static double |
STSCIMAXSIZE
|
private static String |
STSCISERVER
|
| Constructor Summary | |
|---|---|
JFitsFactory()
|
|
| Method Summary | |
|---|---|
private static String |
getCgiForStsci(double ra,
double dec,
double width,
double height,
int dss)
This method prepares an url according to the CGI-requirements of the STScI dss-server. |
static JFitsFactory.Method |
getCurrent()
|
private static URL |
getDownloadUrl(JFitsFactory.Method how,
double ra,
double dec,
double width,
double height,
int source)
Returns the URL from which the image can be retrieved. |
static nom.tam.fits.Fits |
getDssFits(double ra,
double dec,
double width,
double height)
Downloads the DSS-fits image from an url. |
static nom.tam.fits.Fits |
getDssFits(double ra,
double dec,
double width,
double height,
JFitsFactory.Method how,
int format)
Downloads the DSS-fits image from an url. |
private static URL |
getDssFromEso(double ra,
double dec,
double width,
double height,
int dss)
|
private static URL |
getDssFromNaoJp(double ra,
double dec,
double width,
double height,
int dss)
|
private static URL |
getDssFromStsci(double ra,
double dec,
double width,
double height,
int dss)
This method prepares an url according to the CGI-requirements of the STScI dss-server. |
static CoordinateTransforming |
parseWcs(nom.tam.fits.Fits fits)
Tries to infer a CoordinateTransforming isntance from a Fits
file. |
private static CoordinateTransforming |
parseWcsFromImageHeader(nom.tam.fits.ImageHDU hdu)
Scans the image header for a WCS. |
private static nom.tam.fits.Fits |
servletFits(double ra,
double dec,
double width,
double height,
int source)
|
static void |
setCurrent(JFitsFactory.Method current)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static JFitsFactory.Method current
public static final int DSS1
public static final int DSS2RED
public static final int DSS2BLUE
public static final int DSS2IR
private static final String HTTP
private static final double STSCIMAXSIZE
private static final String STSCISERVER
private static final String STSCICGIPATH
private static final String STSCIDSS2RED
private static final String STSCIDSS2BLUE
private static final String STSCIDSS2IR
private static final String STSCIDSS1
private static final String STSCIDSSDEFAULT
private static final double NAOJPMAXSIZE
private static final String NAOJPSERVER
private static final String NAOJPCGIPATH
private static final String NAOJPDSS1
private static final String NAOJPDSS2RED
private static final String NAOJPDSS2BLUE
private static final String NAOJPDSS2IR
private static final String NAOJPDSSDEFAULT
private static final double ESOMAXSIZE
private static final String ESOSERVER
private static final String ESOCGIPATH
private static final String ESODSS1
private static final String ESODSS2RED
private static final String ESODSS2BLUE
private static final String ESODSS2IR
private static final String ESODSSDEFAULT
private static final String LOCALSERVER
private static final String LOCALPATH
private static final int LOCALPORT
| Constructor Detail |
|---|
public JFitsFactory()
| Method Detail |
|---|
public static void setCurrent(JFitsFactory.Method current)
public static JFitsFactory.Method getCurrent()
public static nom.tam.fits.Fits getDssFits(double ra,
double dec,
double width,
double height)
ra - Right ascension of the center of the image in degrees.dec - Declination of the center of the image in degrees.width - Width of the image in degrees.height - Height of the image in degrees.
public static nom.tam.fits.Fits getDssFits(double ra,
double dec,
double width,
double height,
JFitsFactory.Method how,
int format)
ra - Right ascension of the center of the image in degrees.dec - Declination of the center of the image in degrees.width - Width of the image in degrees.height - Height of the image in degrees.
public static CoordinateTransforming parseWcs(nom.tam.fits.Fits fits)
CoordinateTransforming isntance from a Fits
file. This is done by reading WCS-relevant header keywords and trying to
get the transformation out of it. It is losely based on the
org.eso.fits.FitsWCS class.
private static nom.tam.fits.Fits servletFits(double ra,
double dec,
double width,
double height,
int source)
private static final CoordinateTransforming parseWcsFromImageHeader(nom.tam.fits.ImageHDU hdu)
private static URL getDownloadUrl(JFitsFactory.Method how,
double ra,
double dec,
double width,
double height,
int source)
#KEY_URLMETHOD property to fork into the appropriate method.
ra - Right ascension of the center of the image in degrees.dec - Declination of the center of the image in degrees.width - Width of the image in degrees.height - Height of the image in degrees.
private static URL getDssFromStsci(double ra,
double dec,
double width,
double height,
int dss)
#KEY_SOURCE of the
image, r is right ascension in hours, minutes and seconds,
d the declination in degrees, minutes and seconds separated with
'+' that replace ' '. Height and width are in arcminutes. Retrieval
format is 'fits'. No compression, field-of-view, or rotation angle is
allowed.
The image requested has integer width and height (arcmin).
ra - Right ascension of object, 2000.0, in degrees.dec - Declination of object, 2000.0, in degrees.width - Width of the fits image, in degrees.height - Height of the fits image, in degrees.
private static String getCgiForStsci(double ra,
double dec,
double width,
double height,
int dss)
#KEY_SOURCE of the
image, r is right ascension in hours, minutes and seconds,
d the declination in degrees, minutes and seconds separated with
'+' that replace ' '. Height and width are in arcminutes. Retrieval
format is 'fits'. No compression, field-of-view, or rotation angle is
allowed.
The image requested has integer width and height (arcmin).
ra - Right ascension of object, 2000.0, in degrees.dec - Declination of object, 2000.0, in degrees.width - Width of the fits image, in degrees.height - Height of the fits image, in degrees.
private static URL getDssFromNaoJp(double ra,
double dec,
double width,
double height,
int dss)
private static URL getDssFromEso(double ra,
double dec,
double width,
double height,
int dss)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||