public class Imager
extends java.lang.Object
java skyview.geometry.test.Imager [key=value] [key=value] ...
java -jar skyview.jar [key=value] [key=value]...
Valid field keys include:
Lon: The longitude of the center of the output image in the coordinate system selected. Note that the default coordinate system is J2000, so the longitude is the right ascension. The value is specified in decimal degrees.
Lat: The latitude of the center of the output image in the coordinate system selected. J2000 is the default coordinate system, so by default Lat corresponds to declination. The value is specified in decimal degrees.
Position : The comma separated longitude and latitude. If Position and Lon/Lat are specified then the values specified in Lon/Lat override those in position.
CopyWCS : An existing FITS file may be used to define the WCS to be used for the output. If this argument is specified any other argument that specifies the output image geometry is ignored.
Coordinates : A string describing the coordinate system to be used for the output image. It comprises an inital letter which gives the coordiante system, which prefixes a number giving the epoch of the coordiante system.
Projection: The projection used to convert from celestial to plane coordinates. The projection string is the 3 character string used in the FITS WCS papers, with only the first letter capitalized. Supported output projections include:
Sampler: The sampler defines how the input images are sampled to get values at the putput pixels. Sampling algorithims include:
Scale: The size of the output pixels in degrees. If the pixels are square only a single values is given. Non-square pixels can be specified as Scale=xsize,ysize.
Size: The size of the entire image in degrees.
Pixels: The number of output pixels along an edge. If the output image is not square this can be specified as Pixels=xPixels,yPixels
Rotation: A rotation in the output plane to be applied to the data (in decimal degrees)
Survey: The survey from which the output image is to be created. More than one survey can be specified as survey1,survey2,survey3,...
Ebins: For surveys with a third dimension, the binning to be applied in this dimension. Currently this is specified using as x0,dx,n where x0 is the starting bin for the first output bin, dx is the width of the output bins, and n is the number of output bins. These are expressed in terms of the input energy bins, such that if the survey data has 10 bins, the first bin ranges from 0-1, the second from 1-2 and the last from 9-10. If we wished to rebin this data into four evenly spaced bins excluding the first and last bins, then Ebins=1,2,4. A default binning is defined for each 3-d survey included in SkyView.
Output: The output file name. If data is being created from more than one survey, then the survey short name will be appended to the name. The default output filename is output.fits. The strings "-" or "stdout" are used to specify writing to the standard output.
Compress: Write the output in GZIP compressed form. The value field is ignored.
Float: Write output in 4 byte reals rather than 8 byte. The value field is ignored.
The following options control where the imager task finds survey data.
XMLRoot: The directory containing the XML survey descriptions
Cache: Directory location (or locations) where cached files (survey files retrieved from remote locations) are to be found. The first cache location is also used when a remote file is retrieved.
PurgeCache: Should files cached during this retrieval be deleted after processing? Only files cached during the current operation will be deleted. If there are survey files in the cache area from previous requests that are used in the current request, these will be retained.
SurveyXML: Gives the name of a file containing an XML description of a survey. This allows the user to create an image from a survey they are describing. Use a "," to separate multiple survey files.
The following operations allow the user to override the basic processing operations.
The following options control the classes that are used in processing the user request. Most users can ignore these.
SurveyFinder: The class of the object that finds the appropriate survey object for the surveys the user has requested.
ImageFinder The class of the object that finds the appropriate images within a survey for each pixel of the output object.
PreProcessor: One or more objects that do image pre-processing.
Mosaicker: The object that actually generates the output image melding together the input images.
PostProcessor: One or more classes of object that do image post processing. One example used by default in some surveys is the skyview.geometry.Deedger. You can force de-edging by specifying the class, or turn it off by setting PostProcessor=null.
NoFITS: Do not create a FITS output file. This could be used for debugging, or more likely in combination with graphics output created by the skyview.ij.IJProcessor where the user wants only a JPEG or GIF and does not need a FITS file. See the help for the IJProcessor for details on supported formats and other options.
Modifier and Type | Field and Description |
---|---|
protected double |
bin0
The beginning of the first pixel in energy space.
|
protected CoordinateSystem |
c
The CoordinateSystem object for the output image.
|
protected Image[] |
cand
The candidate images for use in resampling
|
protected double |
dBin
The width of pixels in energy space
|
protected DepthSampler |
dsamp
The energy sampler object used when creaing the output image.
|
protected double |
lat
The lon/lat (or RA/dec) coordinates of the output image.
|
protected double |
lon
The lon/lat (or RA/dec) coordinates of the output image.
|
protected Image |
output
The current output image
|
protected Projection |
p
The Projection object for the output image.
|
protected Scaler |
s
The Scaler object for the output image.
|
protected Sampler |
samp
The sampler object used to create the output image.
|
protected Survey |
surv
The current Survey object being used.
|
Constructor and Description |
---|
Imager()
Initialize the imager.
|
Modifier and Type | Method and Description |
---|---|
void |
checkUpdateSettings() |
void |
clearImageCache()
Clear out state that may confuse subsequent processing
|
void |
createFitsFile()
Create the FITS file
|
protected void |
doProcess(java.lang.String type) |
protected void |
doProcess(java.lang.String type,
java.lang.Boolean updates) |
Image |
doProcessSurvey(java.lang.String surveyID,
Survey surv) |
void |
dynoProcess(java.lang.String name,
java.lang.Boolean updates)
Run a processor.
|
Image[] |
getCandidates()
Get the candidate images that may be used for resampling
|
double[] |
getEdgeAdjustments()
Get any adjustments made to image intensities to minimize edge effects.
|
java.lang.Object |
getImageData()
Get the output data as 1-d double array
|
static Imager |
getImager()
Get an Imager object -- normally the last one created.
|
double |
getLat()
Get the central latitude/declination of the output image
|
double |
getLon()
Get the central longitude/RA of the output image
|
int |
getPixelDepth()
Get the energy depth of the output image
|
int |
getPixelHeight()
Get the height of the output image in pixels
|
int |
getPixelWidth()
Get the width of the output image in pixels
|
java.lang.String |
getSamplerName()
Get the sampler name.
|
Scaler |
getScaler()
Get the Scaler used for the output image.
|
static double |
getSum(double[] arr) |
Survey |
getSurvey()
Get the current survey being processed
|
static java.lang.String |
getVersion() |
protected skyview.executive.Imager.ImageState |
haveImage(java.lang.String surveyID,
WCS wcs) |
boolean |
init() |
protected Image[] |
loadCandidates(Position pos,
Survey surv) |
protected Image |
loadImage() |
protected int[] |
loadMatch(java.lang.String surveyID) |
protected Position |
loadPosition() |
protected void |
loadSamplers() |
Survey |
loadSurvey(java.lang.String surveyID) |
protected WCS |
loadWCS() |
static void |
main(java.lang.String[] args)
Generate an image given the input parameters.
|
void |
postprocessSurvey(java.lang.Boolean allProc) |
void |
processSurvey(java.lang.String surveyID)
Process a particular survey.
|
protected int[] |
reuseMatch(java.lang.String surveyID) |
void |
run()
Run the command
|
void |
run(java.lang.String[] args)
Run an image with a given set of arguments.
|
protected double bin0
protected double dBin
protected Scaler s
protected Projection p
protected CoordinateSystem c
protected Sampler samp
protected DepthSampler dsamp
protected double lon
protected double lat
protected Survey surv
protected Image[] cand
protected Image output
public Imager()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getVersion()
public java.lang.String getSamplerName()
public Scaler getScaler()
public java.lang.Object getImageData()
public double getLon()
public double getLat()
public Survey getSurvey()
public double[] getEdgeAdjustments()
public Image[] getCandidates()
public int getPixelDepth()
public int getPixelWidth()
public int getPixelHeight()
public void run(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void checkUpdateSettings()
public boolean init() throws java.lang.Exception
java.lang.Exception
public void run() throws java.lang.Exception
java.lang.Exception
public Survey loadSurvey(java.lang.String surveyID) throws java.lang.Exception
java.lang.Exception
protected WCS loadWCS() throws java.lang.Exception
java.lang.Exception
protected Position loadPosition() throws java.lang.Exception
java.lang.Exception
protected Image loadImage() throws java.lang.Exception
java.lang.Exception
protected Image[] loadCandidates(Position pos, Survey surv) throws java.lang.Exception
java.lang.Exception
protected void loadSamplers() throws java.lang.Exception
java.lang.Exception
protected int[] reuseMatch(java.lang.String surveyID)
protected int[] loadMatch(java.lang.String surveyID) throws java.lang.Exception
java.lang.Exception
protected void doProcess(java.lang.String type) throws java.lang.Exception
java.lang.Exception
protected void doProcess(java.lang.String type, java.lang.Boolean updates) throws java.lang.Exception
java.lang.Exception
public void dynoProcess(java.lang.String name, java.lang.Boolean updates) throws java.lang.Exception
name
- The class name of the processorupdates
- Indicates whether the processor should be run.
If null, then any processor should run.
Otherwise run the processor only if the values of updates
is the same as the value of the updatesOutput method of the
processor.java.lang.Exception
public void clearImageCache()
protected skyview.executive.Imager.ImageState haveImage(java.lang.String surveyID, WCS wcs)
public void processSurvey(java.lang.String surveyID) throws java.lang.Exception
java.lang.Exception
public static double getSum(double[] arr)
public Image doProcessSurvey(java.lang.String surveyID, Survey surv) throws java.lang.Exception
java.lang.Exception
public void postprocessSurvey(java.lang.Boolean allProc) throws java.lang.Exception
java.lang.Exception
public void createFitsFile() throws java.lang.Exception
java.lang.Exception
public static Imager getImager()