||
wcsalign prompt-Aligns a group of NDFs using World Co-ordinate System information
这个命令是将input image 转换成与reference image有相同的起始位置、相同的piexl的大小、相同的坐标系,这样得到的result images能够相互比较,可以做SED拟合,做比值计算。
Aligns a group of NDFs using World Co-ordinate System information
Description:If an input NDF has more pixel axes than the reference NDF, then the extra pixel axes areretained unchanged in the output NDF. Thus, for instance, if an input RA/Dec/velocitycube is aligned with a reference two-dimensional galactic-longitude/latitude image, theoutput NDF will be a galactic-longitude/latitude/velocity cube.
The transformations needed to produce alignment are derived from the co-ordinate systeminformation stored in the WCS components of the supplied NDFs. For each input NDF,alignment is first attempted in the current co-ordinate Frame of the reference NDF. Ifthis fails, alignment is attempted in the current co-ordinate Frame of the input NDF.If this fails, alignment occurs in the pixel co-ordinate Frame. A message indicatingwhich Frame alignment was achieved in is displayed.
Two algorithms are available for determining the output pixel values: resampling andrebinning (the method used is determined by the REBIN parameter).
Two methods exist for determining the bounds of the output NDFs. First youcan give values for Parameters LBND and UBND which are then used as the pixelindex bounds for all output NDFs. Second, if a null value is given for LBND orUBND, default values are generated separately for each output NDF so that theoutput NDF just encloses the entire area covered by the corresponding inputNDF. Using the first method will ensure that all output NDFs have the samepixel origin, and so the resulting NDFs can be directly compared. However, thismay result in the output NDFs being larger than necessary. In general, thesecond method results in smaller NDFs being produced, in less time. However,the output NDFs will have differing pixel origins which need to be taken intoaccount when comparing the aligned NDFs.
As an example, if you are aligning two spectra which both use radio velocity as thecurrent WCS, but which have different rest frequencies, then setting ALIGNREF to TRUEwill cause alignment to be performed in radio velocity, meaning that the differences inrest frequency are ignored. That is, a channel with 10 Km/s in the input is mappingonto the channel with 10 km/s in the output. If ALIGNREF is FALSE (and no value hasbeen set for the AlignSystem attribute in the reference WCS), then alignment will beperformed in wavelength, meaning that the different rest frequencies cause anadditional shift. That is, a channel with 10 Km/s in the input will be mapping ontowhich ever output channel has the same wavelength, taking into account the differentrest frequencies.
As another example, consider aligning two maps which both have (azimuth,elevation)axes. If ALIGNREF is TRUE, then any given (az,el) values in one image will be mappedonto the exact same (az,el) values in the other image, regardless of whether the twoimages were taken at the same time. But if ALIGNREF is FALSE, then a given (az,el)value in one image will be mapped onto pixel that has the same ICRS co-ordinates in theother image (since AlignSystem default to ICRS for celestial axes). Thus anydifferent in the observation time of the two images will result in an additionalshift.
As yet another example, consider aligning two spectra which are both in frequency withrespect to the LSRK, but which refer to different points on the sky. If ALIGNREFis TRUE, then a given LSRK frequency in one spectrum will be mapped onto theexact same LSRK frequency in the other image, regardless of the different skypositions. But if ALIGNREF is FALSE, then a given input frequency will first beconverted to Heliocentric frequency (the default value for AlignStdOfRest is“Heliocentric”), and will be mapped onto the output channel that has the same Heliocentric frequency. Thus the differecen in sky positions will result in anadditional shift. [FALSE]
an NDF name, optionally containing wild-cards and/or regular expressions("∗∗","?", "[a-z]"etc.).
the name of a text file, preceded by an up-arrow character"^".Each line in the text file should contain a comma-separated list of elements, each ofwhich can in turn be an NDF name (with optional wild-cards, etc.), or another filespecification (preceded by an up-arrow). Comments can be included in the file bycommencing lines with a hash character "#".
If the value supplied for this parameter ends with a minus sign "-", then you arere-prompted for further input until a value is given which does not end with a hyphen.All the NDFs given in this way are concatenated into a single group.
"Bilinear" –- When resampling, the output pixel values are calculated by bi-linearinterpolation among the four nearest pixels values in the input NDF. When rebinning,the input pixel value is divided up bi-linearly between the four nearest output pixels.Produces smoother output NDFs than the nearest-neighbour scheme, but is marginallyslower.
"Nearest" –- When resampling, the output pixel values are assigned the value of thesingle nearest input pixel. When rebinning, the input pixel value is assignedcompletely to the single nearest output pixel.
"Sinc" –- Uses the <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mstyle class="text"><mtext class="textrm" mathvariant="normal">sinc<mo class="MathClass-open">(πx<mo class="MathClass-close">)" style="position:relative;" tabindex="0" id="MathJax-Element-3-Frame" class="MathJax">sinc(πx)sinc(πx)kernel, where <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">x" style="position:relative;" tabindex="0" id="MathJax-Element-4-Frame" class="MathJax">xxis the pixel offset from the interpolation point (resampling) or transformed input pixel centre(rebinning), and <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mstyle class="text"><mtext class="textrm" mathvariant="normal">sinc<mo class="MathClass-open">(z<mo class="MathClass-close">)<mo class="MathClass-rel">=<mo class="qopname">sin<mo class="MathClass-open">(z<mo class="MathClass-close">)<mo class="MathClass-bin">/z" style="position:relative;" tabindex="0" id="MathJax-Element-5-Frame" class="MathJax">sinc(z)=sin(z)/zsinc(z)=sin(z)/z.Use of this scheme is not recommended.
"SincSinc" –- Uses the <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mstyle class="text"><mtext class="textrm" mathvariant="normal">sinc<mo class="MathClass-open">(πx<mo class="MathClass-close">)<mstyle class="text"><mtext class="textrm" mathvariant="normal">sinc<mo class="MathClass-open">(kπx<mo class="MathClass-close">)" style="position:relative;" tabindex="0" id="MathJax-Element-6-Frame" class="MathJax">sinc(πx)sinc(kπx)sinc(πx)sinc(kπx)kernel. A valuable general-purpose scheme, intermediate in its visual effect on NDFsbetween the bi-linear and nearest-neighbour schemes.
"SincCos" –- Uses the <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mstyle class="text"><mtext class="textrm" mathvariant="normal">sinc<mo class="MathClass-open">(πx<mo class="MathClass-close">)<mo class="qopname">cos<mo class="MathClass-open">(kπx<mo class="MathClass-close">)" style="position:relative;" tabindex="0" id="MathJax-Element-7-Frame" class="MathJax">sinc(πx)cos(kπx)sinc(πx)cos(kπx)kernel. Gives similar results to the "Sincsinc" scheme.
"SincGauss" –- Uses the <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mstyle class="text"><mtext class="textrm" mathvariant="normal">sinc<mo class="MathClass-open">(πx<mo class="MathClass-close">)e<mo class="MathClass-bin">−kx2" style="position:relative;" tabindex="0" id="MathJax-Element-8-Frame" class="MathJax">sinc(πx)e−kx2sinc(πx)e−kx2kernel. Good results can be obtained by matching the FWHM of the envelope function tothe point-spread function of the input data (see Parameter PARAMS).
"Somb" –- Uses the <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mstyle class="text"><mtext class="textrm" mathvariant="normal">somb<mo class="MathClass-open">(πx<mo class="MathClass-close">)" style="position:relative;" tabindex="0" id="MathJax-Element-9-Frame" class="MathJax">somb(πx)somb(πx)kernel, where <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">x" style="position:relative;" tabindex="0" id="MathJax-Element-10-Frame" class="MathJax">xxis the pixel offset from the interpolation point (resampling) or transformed input pixel centre (rebinning), and <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mstyle class="text"><mtext class="textrm" mathvariant="normal">somb<mo class="MathClass-open">(z<mo class="MathClass-close">)<mo class="MathClass-rel">=2<mo class="MathClass-bin">∗J1<mo class="MathClass-open">(z<mo class="MathClass-close">)<mo class="MathClass-bin">/z" style="position:relative;" tabindex="0" id="MathJax-Element-11-Frame" class="MathJax">somb(z)=2∗J1(z)/zsomb(z)=2∗J1(z)/z(<span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">J1" style="position:relative;" tabindex="0" id="MathJax-Element-12-Frame" class="MathJax">J1J1 isthe first-order Bessel function of the first kind. This scheme is similar to the "Sinc"scheme.
"SombCos" –- Uses the <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mstyle class="text"><mtext class="textrm" mathvariant="normal">somb<mo class="MathClass-open">(πx<mo class="MathClass-close">)<mo class="qopname">cos<mo class="MathClass-open">(kπx<mo class="MathClass-close">)" style="position:relative;" tabindex="0" id="MathJax-Element-13-Frame" class="MathJax">somb(πx)cos(kπx)somb(πx)cos(kπx)kernel. This scheme is similar to the "SincCos" scheme.
"Gauss" –- Uses the <span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">e<mo class="MathClass-bin">−kx2" style="position:relative;" tabindex="0" id="MathJax-Element-14-Frame" class="MathJax">e−kx2e−kx2kernel. The FWHM of the Gaussian is given by Parameter PARAMS(2), and the point atwhich to truncate the Gaussian to zero is given by Parameter PARAMS(1).
All methods propagate variances from input to output, but the variance estimatesproduced by interpolation schemes other than nearest neighbour need to be treated withcare since the spatial smoothing produced by these methods introduces correlations inthe variance estimates. Also, the degree of smoothing produced varies across the NDF.This is because a sample taken at a pixel centre will have no contributionsfrom the neighbouring pixels, whereas a sample taken at the corner of a pixelwill have equal contributions from all four neighbouring pixels, resultingin greater smoothing and lower noise. This effect can produce complex Moirépatterns in the output variance estimates, resulting from the interferenceof the spatial frequencies in the sample positions and in the pixel centrepositions. For these reasons, if you want to use the output variances, you aregenerally safer using nearest-neighbour interpolation. The initial defaultis "SincSinc". [current value]
an NDF name. If the name contains an asterisk character"<span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mo class="MathClass-bin">∗" style="position:relative;" tabindex="0" id="MathJax-Element-15-Frame" class="MathJax">∗∗", the name of thecorresponding input NDF (without directory or file suffix) is substituted for the asterisk (forinstance, "<span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mo class="MathClass-bin">∗" style="position:relative;" tabindex="0" id="MathJax-Element-16-Frame" class="MathJax">∗∗_al"causes the output NDF name to be formed by appending the string "_al" to thecorresponding input NDF name). Input NDF names can also be edited by including originaland replacement strings between vertical bars after the NDF name (for instance,<span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mo class="MathClass-bin">∗" style="position:relative;" tabindex="0" id="MathJax-Element-17-Frame" class="MathJax">∗∗_al<span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mo class="MathClass-rel">|" style="position:relative;" tabindex="0" id="MathJax-Element-18-Frame" class="MathJax">||b4<span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mo class="MathClass-rel">|" style="position:relative;" tabindex="0" id="MathJax-Element-19-Frame" class="MathJax">||B1<span role="presentation" data-mathml="<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><mo class="MathClass-rel">|" style="position:relative;" tabindex="0" id="MathJax-Element-20-Frame" class="MathJax">||causes any occurrence of the string "B4" in the input NDF name to be replaced by thestring "B1" before appending the string "_al" to the result).
the name of a text file, preceded by an up-arrow character"^".Each line in the text file should contain a comma-separated list of elements, each ofwhich can in turn be an NDF name (with optional editing, etc.), or another file specification (preceded by an up-arrow). Comments can be included in the file bycommencing lines with a hash character "#".
If the value supplied for this parameter ends with a hyphen "-", then you arere-prompted for further input until a value is given which does not end with hyphen.All the NDFs given in this way are concatenated into a single group.
This parameter is only accessed if the INSITU parameter is FALSE.
PARAMS(1) is required by all the above schemes. It is used to specify how many pixelsare to contribute to the interpolated result on either side of the interpolation orbinning point in each dimension. Typically, a value of 2 is appropriate and the minimumallowed value is 1 (i.e. one pixel on each side). A value of zero or fewerindicates that a suitable number of pixels should be calculated automatically.[0]
PARAMS(2) is required only by the Gauss, SombCos, SincSinc, SincCos, and SincGaussschemes. For the SombCos, SincSinc and SincCos schemes, it specifies the number ofpixels at which the envelope of the function goes to zero. The minimum value is 1.0,and the run-time default value is 2.0. For the Gauss and SincGauss scheme,it specifies the full-width at half-maximum (FWHM) of the Gaussian envelopemeasured in output pixels. The minimum value is 0.1, and the run-time defaultis 1.0. On astronomical NDFs and spectra, good results are often obtained byapproximately matching the FWHM of the envelope function, given by PARAMS(2), tothe point-spread function of the input data. []
The resampling algorithm steps through every pixel in the output image, samplingthe input image at the corresponding position and storing the sampled inputvalue in the output pixel. The method used for sampling the input image isdetermined by the METHOD parameter. The rebinning algorithm steps through everypixel in the input image, dividing the input pixel value between a group ofneighbouring output pixels, incrementing these output pixel values by theirallocated share of the input pixel value, and finally normalising each outputvalue by the total number of contributing input values. The way in which theinput sample is divided between the output pixels is determined by the METHODparameter.
Both algorithms produce an output in which the each pixel value is the weighted mean ofthe near-by input values, and so do not alter the mean pixel values associatedwith a source, even if the pixel size changes. Thus the total data sum in asource will change if the input and output pixel sizes differ. However, ifthe CONSERVE parameter is set TRUE, the output values are scaled by the ratioof the output to input pixel size, so that the total data sum in a source ispreserved.
A difference between resampling and rebinning is that resampling guarantees to fill theoutput image with good pixel values (assuming the input image is filled with good inputpixel values), whereas holes can be left by the rebinning algorithm if the output imagehas smaller pixels than the input image. Such holes occur at output pixels whichreceive no contributions from any input pixels, and will be filled with the valuezero in the output image. If this problem occurs the solution is probably tochange the width of the pixel spreading function by assigning a larger valueto PARAMS(1) and/or PARAMS(2) (depending on the specific METHOD value beingused).
Both algorithms have the capability to introduce artefacts into the output image. Thesehave various causes described below.
Particularly sharp features in the input can cause rings around the corresponding features in the output image. This can be minimised by suitable settings for the METHODand PARAMS parameters. In general such rings can be minimised by using a widerinterpolation kernel (if resampling) or spreading function (if rebinning), at the costof degraded resolution.
The approximation of the Mapping using a piece-wise linear transformation (controlledby Parameter ACC) can produce artefacts at the joints between the panels of theapproximation. They are caused by the discontinuities between the adjacent panels ofthe approximation, and can be minimised by reducing the value assigned to the ACCparameter.
This routine correctly processes the DATA, VARIANCE, LABEL, TITLE, UNITS, WCS, andHISTORY components of the input NDFs (see the METHOD parameter for notes on theinterpretation of output variances).
Processing of bad pixels and automatic quality masking are supported.
All non-complex numeric data types can be handled. If REBIN is TRUE, the datatype will be converted to one of _INTEGER, _DOUBLE or _REAL for processing.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-10-20 05:07
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社