public class Ndxs extends Object
Ndx manipulation.| Modifier and Type | Method and Description | 
|---|---|
| static FrameSet | getAst(Ndx ndx)Unconditionally returns world coordinate system information for an
 NDX as a  FrameSet. | 
| static FrameSet | getDefaultAst(Ndx ndx)Returns a default AST  FrameSetfor an Ndx. | 
| static NDArray | getMaskedErrors(Ndx ndx)Returns a view of the Errors of an Ndx with any masking implied
 by its Quality array taken care of. | 
| static NDArray | getMaskedErrors(Ndx ndx,
               Requirements req)Returns a view of the Errors of an Ndx with any masking implied
 by its Quality array taken care of, and additional constraints
 supplied by a  Requirementsobject. | 
| static NDArray | getMaskedImage(Ndx ndx)Returns a view of the Image array of an Ndx with any masking
 implied by its Quality array taken care of. | 
| static NDArray | getMaskedImage(Ndx ndx,
              Requirements req)Returns a view of the Image array of an Ndx with any masking 
 implied by its Quality array taken care of, and additional 
 constraints supplied by a  Requirementsobject. | 
| static NDArray | getMaskedVariance(Ndx ndx)Returns a view of the Variance array of an Ndx with any masking
 implied by its Quality array taken care of. | 
| static NDArray | getMaskedVariance(Ndx ndx,
                 Requirements req)Returns a view of the Variance array of an Ndx with any masking 
 implied by its Quality array taken care of, and additional 
 constraints supplied by an  Requirementsobject. | 
| static NDArray | maskArray(NDArray target,
         NDArray quality,
         int badbits,
         Requirements req)Applies quality masking to an NDArray based on another NDArray
 representing quality values. | 
public static NDArray getMaskedImage(Ndx ndx, Requirements req) throws IOException
Requirements object.ndx - the NDX whose image is soughtreq - additional requirements for the returned array.
              May be nullIOException - if an I/O error occursmaskArray(uk.ac.starlink.array.NDArray, uk.ac.starlink.array.NDArray, int, uk.ac.starlink.array.Requirements)public static NDArray getMaskedImage(Ndx ndx) throws IOException
ndx - the NDX whose image is soughtIOException - if an I/O error occursmaskArray(uk.ac.starlink.array.NDArray, uk.ac.starlink.array.NDArray, int, uk.ac.starlink.array.Requirements)public static NDArray getMaskedVariance(Ndx ndx, Requirements req) throws IOException
Requirements object.ndx - the NDX whose variance is soughtreq - additional requirements for the returned array.
              May be nullIOException - if an I/O error occursmaskArray(uk.ac.starlink.array.NDArray, uk.ac.starlink.array.NDArray, int, uk.ac.starlink.array.Requirements)public static NDArray getMaskedVariance(Ndx ndx) throws IOException
ndx - the NDX whose variance is soughtIOException - if an I/O error occursmaskArray(uk.ac.starlink.array.NDArray, uk.ac.starlink.array.NDArray, int, uk.ac.starlink.array.Requirements)public static NDArray getMaskedErrors(Ndx ndx, Requirements req) throws IOException
Requirements object.
 The resulting object has pixels which are the square roots of
 those in the array returned by 
 getMaskedVariance(Ndx,Requirements).ndx - the NDX whose errors are soughtreq - additional requirements for the returned array.
              May be nullIOException - if an I/O error occursmaskArray(uk.ac.starlink.array.NDArray, uk.ac.starlink.array.NDArray, int, uk.ac.starlink.array.Requirements)public static NDArray getMaskedErrors(Ndx ndx) throws IOException
getMaskedVariance(Ndx).ndx - the NDX whose errors are soughtIOException - if an I/O error occursmaskArray(uk.ac.starlink.array.NDArray, uk.ac.starlink.array.NDArray, int, uk.ac.starlink.array.Requirements)public static NDArray maskArray(NDArray target, NDArray quality, int badbits, Requirements req) throws IOException
badbits mask and the 
 corresponding pixel of the quality array is non-zero, in which
 case they have the bad value.
 A Requirements object may be supplied to specify 
 additional required characteristics of the returned array.
 This method does the work for the various Ndx array masking methods in this class.
target - the target NDArray to be maskedquality - an NDArray of an integer typebadbits - the quality maskreq - additional requirements on the returned object.
               May be nulltarget but
          with bad pixels where the indicated by quality
          May or may not be the same object as targetIOException - if an I/O error occurspublic static FrameSet getAst(Ndx ndx)
FrameSet.
 If ndx has a WCS component it is generated from that,
 otherwise a suitable default one is returned.ndx - the NDX for which WCS are requiredpublic static FrameSet getDefaultAst(Ndx ndx)
FrameSet for an Ndx.
 This has GRID and PIXEL Frames, such that when the unit hypercube
 (having coordinates xi in the range
 0<=xi..1 in each dimension i) 
 is transformed into the PIXEL frame it
 becomes the hypercube with coordinates in the range
 Origini-1<=xi<=Origini,
 where Origin is the origin of the Image array component.ndx - the Ndx for which to find the default FrameSetndxCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.