Source code for starlink.kappa

"""
Runs commands from the Starlink KAPPA package.

Autogenerated from the starlink .hlp and .ifl files,
by starlink-pywrapper/helperscripts/generate_functions.py.

Starlink version: 2018A
b6ca36bf8884802759017298539489d11795861e (2018-07-06 09:36:39)
"""

from . import wrapper


[docs]def add(in1, in2, out, **kwargs): """ Adds two NDF data structures. Runs the command: $KAPPA_DIR/add . Arguments --------- in1 : str,filename First input NDF in2 : str,filename Second input NDF out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ADD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/add", "add", in1, in2, out, **kwargs)
[docs]def align2d(in_, ref, **kwargs): """ Aligns a pair of two-dimensional NDFs by minimising the residuals Runs the command: $KAPPA_DIR/align2d . Arguments --------- `in_` : str,filename The input NDF ref : str,filename The reference NDF Keyword Arguments ----------------- out : str,filename The output aligned NDF [!] box : int Larger of maximum expected shift or feature size, in pixels [5] conserve : bool Conserve flux? [dyn.] corlimit : float Lower limit on local correlation for usable input pixels [!] fitvals : bool Adjust pixel value scale and offset as part of the fitting process? [FALSE] form : int Form of transformation to use (0-3) [0] method : str Re-sampling method [current value] norm : bool Normalise output values? [TRUE] params : List[float] Auxiliary resampling parameters rebin : bool Create output pixel values by rebinning input pixels? [current value] tol : float Tolerance for linear transformation approximation [0.05] wlim : float Minimum weight for valid output pixels [!] Returns ------- rms : float tr : List[float] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ALIGN2D for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/align2d", "align2d", in_, ref, **kwargs)
[docs]def aperadd(ndf, centre, diam, **kwargs): """ Integrates pixel values within an aperture of an NDF. Runs the command: $KAPPA_DIR/aperadd . Arguments --------- ndf : str,filename Data structure to analyse centre : str Centre of circular aperture diam : str Diameter of circular aperture Keyword Arguments ----------------- ardfile : str,filename ARD file defining the aperture [!] logfile : str,filename File for logging results [!] mask : str,filename Output NDF [!] useaxis : str The current Frame axes to be used [!] weight : bool Weight pixel data using inverse variances? [FALSE] Returns ------- mean : float ngood : int numpix : int sigma : float sigmean : float sigtotal : float total : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_APERADD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/aperadd", "aperadd", ndf, centre, diam, **kwargs)
[docs]def ardgen(ardout, shape, option, **kwargs): """ Creates a text file describing selected regions of an image. Runs the command: $KAPPA_DIR/ardgen . Arguments --------- ardout : str,filename Name of the output text file [ardfile.dat] shape : str Region shape [CIRCLE] option : str Next operation to perform [MULTI] Keyword Arguments ----------------- device : Name of graphics device [Current graphics device] startup : str Start up mode ["Multi"] operands : List[int] Indices of regions to combine or invert operator : str How to combine the regions [AND] regions : List[str] A list of region indices [*] style : str Plotting style [current value] undo : bool Undo the previous changes to the list of regions? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ARDGEN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ardgen", "ardgen", ardout, shape, option, **kwargs)
[docs]def ardmask(in_, ardfile, out, **kwargs): """ Uses an ARD file to set some pixels of an NDF to be bad. Runs the command: $KAPPA_DIR/ardmask . Arguments --------- `in_` : str,filename NDF to be masked ardfile : str,filename Masking ARD file [ardfile.dat] out : str,filename Masked NDF Keyword Arguments ----------------- comp : str NDF array component to mask ["All"] const : str New value for masked pixels ["bad"] defpix : bool Use pixel co-ordinates by default? [TRUE] inside : bool Mask the inside of the ARD region? [TRUE] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ARDMASK for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ardmask", "ardmask", in_, ardfile, out, **kwargs)
[docs]def ardplot(ardfile, **kwargs): """ Plot regions described in an ARD file. Runs the command: $KAPPA_DIR/ardplot . Arguments --------- ardfile : str,filename ARD file [ardfile.dat] Keyword Arguments ----------------- device : Name of graphics device [Current graphics device] regval : int Index of the region to plot (0 = all) [0] clear : bool Is the current picture to be cleared before plotting? [FALSE] region : str,filename Text file containing AST Region to be outlined [!] size : float Size of plot (in units of the Region size) [2.0] style : str Plotting style [current value] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ARDPLOT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ardplot", "ardplot", ardfile, **kwargs)
[docs]def axconv(ndf, **kwargs): """ Expands spaced axes in an NDF into the primitive form. Runs the command: $KAPPA_DIR/axconv . Arguments --------- ndf : str,filename NDF to be modified Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_AXCONV for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/axconv", "axconv", ndf, **kwargs)
[docs]def axlabel(ndf, label, dim, **kwargs): """ Sets a new label value for an axis within an NDF data structure. Runs the command: $KAPPA_DIR/axlabel . Arguments --------- ndf : str,filename Data structure label : str New NDF axis label dim : int Dimension of axis to modify Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_AXLABEL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/axlabel", "axlabel", ndf, label, dim, **kwargs)
[docs]def axunits(ndf, units, dim, **kwargs): """ Sets a new units value for an axis within an NDF data structure. Runs the command: $KAPPA_DIR/axunits . Arguments --------- ndf : str,filename Data structure units : str New NDF axis units dim : int Dimension of axis to modify Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_AXUNITS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/axunits", "axunits", ndf, units, dim, **kwargs)
[docs]def beamfit(ndf, **kwargs): """ Fits beam features in a two-dimensional NDF. Runs the command: $KAPPA_DIR/beamfit . Arguments --------- ndf : str,filename Array to be analysed Keyword Arguments ----------------- mode : str Mode used to obtain initial positions [current value] beams : int Number of beam features to fit [1] pos : str Initial position of primary beam ampratio : List[float] Ratios of amplitudes of secondary features relative to the primary [!] circular : bool Are the beams circular? [FALSE] coin : str,filename Text file containing initial positions describe : bool Is the co-ordinate Frame to be described? [current value] device : Name of graphics device [Current graphics device] fitarea : List[int] Size of region to fit [!] fixamp : float Fixed amplitude of the primary beam [!] fixback : float Fixed background level [!] fixfwhm : bool Fix beam FWHM(s) at supplied size(s)? [FALSE] fixpos : bool Fix beam location(s) at supplied position(s)? [FALSE] fixsep : bool Fix secondary beam seaparation(s) at supplied position(s)? [FALSE] fwhm : str Initial FWHM(s) [!] gauss : bool Constrain to normal-Gaussian fits? [TRUE] incat : str,filename Positions list containing initial positions logfile : str,filename Filename to store the screen output [!] mark : str Positions to mark [current value] marker : int The PGPLOT type for position markers [current value] plotstyle : str Style for graphics markers [current value] polar : bool Use polar co-ordinates for POS2)--POS5 parameters? [TRUE] pos2 : str Initial position of first secondary beam pos3 : str Initial position of second secondary beam pos4 : str Initial position of third secondary beam pos5 : str Initial position of fourth secondary beam refpos : str Reference position [dyn.] resid : str,filename NDF for the map of the residuals [!] title : str Title for residuals NDF ["KAPPA - BEAMFIT"] variance : bool Weight using variance array, if available? [FALSE] Returns ------- amp : List[float] Object to contain the amplitude and its error for the primary beam back : List[float] Object to contain the background and its error for the primary beam centre : List[str] Object to contain the position and its error for the primary beam gamma : List[float] Object to contain the shape exponent and its error for the primary beam majfwhm : List[float] Object to contain the major-axis FWHM and its error for the primary beam minfwhm : List[float] Object to contain the minor-axis FWHM and its error for the primary beam offset : List[str] Object to contain the offsets of secondary positions with respect to the primary beam and corresponding errors orient : List[float] Object to contain the beam orientation and its error for the primary beam pa : List[float] Object to contain the position angles of secondary positions with respect to the primary beam and corresponding errors refoff : List[str] Object to contain the offset of the primary beam with respect to the reference point and its error rms : float Object to contain the rms of the fit sum : float Object to contain the total data sum in the fit Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_BEAMFIT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/beamfit", "beamfit", ndf, **kwargs)
[docs]def block(in_, out, box, **kwargs): """ Smooths an NDF using an n-dimensional rectangular box filter. Runs the command: $KAPPA_DIR/block . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF box : List[int] Smoothing box size [3,3] Keyword Arguments ----------------- estimator : str Method for estimating smoothed pixel values ["Mean"] title : str Output title [!] wlim : float Weight limit for good output pixels [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_BLOCK for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/block", "block", in_, out, box, **kwargs)
[docs]def cadd(in_, scalar, out, **kwargs): """ Adds a scalar to an NDF data structure. Runs the command: $KAPPA_DIR/cadd . Arguments --------- `in_` : str,filename Input NDF data structure scalar : float Value to be added out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CADD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/cadd", "cadd", in_, scalar, out, **kwargs)
[docs]def calc(exp, **kwargs): """ Evaluates a mathematical expression. Runs the command: $KAPPA_DIR/calc . Arguments --------- exp : str Expression to evaluate Keyword Arguments ----------------- prec : str Precision of the evaluation ["_REAL"] fa : str Sub-expression fb : str Sub-expression fc : str Sub-expression fd : str Sub-expression fe : str Sub-expression ff : str Sub-expression fg : str Sub-expression fh : str Sub-expression fi : str Sub-expression fj : str Sub-expression fk : str Sub-expression fl : str Sub-expression fm : str Sub-expression fn : str Sub-expression fo : str Sub-expression fp : str Sub-expression fq : str Sub-expression fr : str Sub-expression fs : str Sub-expression ft : str Sub-expression fu : str Sub-expression fv : str Sub-expression fw : str Sub-expression fx : str Sub-expression fy : str Sub-expression fz : str Sub-expression pa : float Constant value pb : float Constant value pc : float Constant value pd : float Constant value pe : float Constant value pf : float Constant value pg : float Constant value ph : float Constant value pi : float Constant value [3.14159265359D0] pj : float Constant value pk : float Constant value pl : float Constant value pm : float Constant value pn : float Constant value po : float Constant value pp : float Constant value pq : float Constant value pr : float Constant value ps : float Constant value pt : float Constant value pu : float Constant value pv : float Constant value pw : float Constant value px : float Constant value py : float Constant value pz : float Constant value Returns ------- result : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CALC for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/calc", "calc", exp, **kwargs)
[docs]def calpol(in1, in2, in3, in4, p, theta, i, **kwargs): """ Calculates polarisation parameters. Runs the command: $KAPPA_DIR/calpol . Arguments --------- in1 : str,filename 0-degree intensity map in2 : str,filename 45-degree intensity map in3 : str,filename 90-degree intensity map in4 : str,filename 135-degree intensity map p : str,filename Percentage polarisation theta : str,filename Polarisation angle i : str,filename Total intensity Keyword Arguments ----------------- debias : bool Remove statistical bias? [FALSE] ia : str,filename Total intensity from 0- and 90-degree intensities [!] ib : str,filename Total intensity from 45- and 135-degree intensities [!] ip : str,filename Polarised intensity [!] q : str,filename Normalise Stokes parameter Q [!] u : str,filename Normalised Stokes parameter U [!] variance : bool Are variance values to be generated? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CALPOL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/calpol", "calpol", in1, in2, in3, in4, p, theta, i, **kwargs)
[docs]def carpet(in_, out, **kwargs): """ Creates a cube representing a carpet plot of an image. Runs the command: $KAPPA_DIR/carpet . Arguments --------- `in_` : str,filename Input image out : str,filename Output cube Keyword Arguments ----------------- ndatapix : int Number of pixels on output data-value axis [dyn.] range : str Range of values on output data-value axis [current value] mode : str Method for calculating output values ["Data"] sigma : float Standard deviation in input image [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CARPET for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/carpet", "carpet", in_, out, **kwargs)
[docs]def cdiv(in_, scalar, out, **kwargs): """ Divides an NDF by a scalar. Runs the command: $KAPPA_DIR/cdiv . Arguments --------- `in_` : str,filename Input NDF data structure scalar : float Division constant out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CDIV for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/cdiv", "cdiv", in_, scalar, out, **kwargs)
[docs]def centroid(ndf, **kwargs): """ Finds the centroids of star-like features in an NDF. Runs the command: $KAPPA_DIR/centroid . Arguments --------- ndf : str,filename Array to be analysed Keyword Arguments ----------------- mode : str Mode used to obtain initial positions [current value] init : str Initial position search : List[int] Size of search box in pixels [9] maxiter : int Maximum number of iterations [9] maxshift : List[float] Maximum shift between guess and output [9.0] toler : float Accuracy required [0.05] catepoch : float Output catalogue epoch catframe : str Output catalogue co-ordinate Frame [!] cerror : bool Calculate centroid errors? [FALSE] coin : str,filename Text file containing initial positions coout : str,filename Text file to hold centroid positions [!] describe : bool Is the co-ordinate Frame to be described? [current value] device : Name of graphics device [Current graphics device] guess : bool Display initial guesses? [current value] incat : str,filename Positions list containing initial positions logfile : str,filename Filename to store the screen output [!] mark : str Positions to mark [current value] marker : int The PGPLOT type for position markers [current value] nsim : int Number of simulations to estimate the errors [100] outcat : str Output positions list [!] plotstyle : str Style for graphics markers [current value] positive : bool Array features positive [TRUE] title : str Title for output positions list [!] Returns ------- centre : str Object to contain the centroid position error : str Object to contain the centroid errors xcen : str Object to contain the x centroid position xerr : str Object to contain the x centroid error ycen : str Object to contain the y centroid position yerr : str Object to contain the y centroid error Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CENTROID for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/centroid", "centroid", ndf, **kwargs)
[docs]def chain(in_, c1, **kwargs): """ Concatenates a series of vectorized NDFs. Runs the command: $KAPPA_DIR/chain . Arguments --------- `in_` : str,filename Base NDF structure c1 : str,filename NDF structure to chain Keyword Arguments ----------------- c2 : str,filename NDF structure to chain [!] c3 : str,filename NDF structure to chain [!] c4 : str,filename NDF structure to chain [!] c5 : str,filename NDF structure to chain [!] c6 : str,filename NDF structure to chain [!] c7 : str,filename NDF structure to chain [!] c8 : str,filename NDF structure to chain [!] c9 : str,filename NDF structure to chain [!] c10 : str,filename NDF structure to chain [!] c11 : str,filename NDF structure to chain [!] c12 : str,filename NDF structure to chain [!] c13 : str,filename NDF structure to chain [!] c14 : str,filename NDF structure to chain [!] c15 : str,filename NDF structure to chain [!] c16 : str,filename NDF structure to chain [!] c17 : str,filename NDF structure to chain [!] c18 : str,filename NDF structure to chain [!] c19 : str,filename NDF structure to chain [!] c20 : str,filename NDF structure to chain [!] c21 : str,filename NDF structure to chain [!] c22 : str,filename NDF structure to chain [!] c23 : str,filename NDF structure to chain [!] c24 : str,filename NDF structure to chain [!] c25 : str,filename NDF structure to chain [!] out : str,filename Output NDF structure title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CHAIN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/chain", "chain", in_, c1, **kwargs)
[docs]def chanmap(in_, out, axis, nchan, shape, **kwargs): """ Creates a channel map from a cube NDF by compressing slices along Runs the command: $KAPPA_DIR/chanmap . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF axis : str The axis to be collapsed nchan : int Total number of channels shape : int Number of channels along x axis of the output NDF Keyword Arguments ----------------- low : str Axis value at start of channel range [!] high : str Axis value at end of channel range [!] estimator : str Method for estimating collapsed pixel values ["Mean"] wlim : float Weight limit for good output pixels [0.3] clip : float Clipping standard deviation [3.0] title : str Output title [!] useaxis : str The WCS axes to retain in the output [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CHANMAP for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/chanmap", "chanmap", in_, out, axis, nchan, shape, **kwargs)
[docs]def chpix(in_, out, section, newval, **kwargs): """ Replaces the values of selected pixels in an NDF. Runs the command: $KAPPA_DIR/chpix . Arguments --------- `in_` : str,filename NDF to be modified out : str,filename Output NDF section : str Section to be set to a constant newval : str New value for the section [0.0] Keyword Arguments ----------------- comp : str NDF array component to analyse ["Data"] title : str Title for output NDF [!] Returns ------- oldval : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CHPIX for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/chpix", "chpix", in_, out, section, newval, **kwargs)
[docs]def clinplot(ndf, **kwargs): """ Draws a spatial grid of line plots for an axis of a cube NDF. Runs the command: $KAPPA_DIR/clinplot . Arguments --------- ndf : str,filename 3-dimensional array to be displayed Keyword Arguments ----------------- useaxis : int Spectral axis [dyn.] device : Name of graphics device [current graphics device] nx : int No. of spectra in each row [dyn.] ny : int No. of spectra in each column [dyn.] align : bool Align the spectra with an existing picture? [dyn.] axes : bool Produce annotated celestial axes? [dyn.] blankedge : bool Remove annotation and ticks from edge cells? [dyn.] clear : bool Is the current picture to be cleared before plotting? [TRUE] comp : str Component to display ["Data"] fill : bool Fill the plotting area? [dyn.] key : bool Do you want a key to the cell axes? [TRUE] keypos : List[float] Horizontal and vertical position of key [current value] keystyle : str Plotting style for the key [current value] lmode : str How to choose default y-axis bounds [current value] margin : List[float] Widths of margins around spatial axes [current value] marker : int PGPLOT marker type [current value] mode : str Method for displaying the data curves [current value] reflabel : bool Put labels around the first line plot? [current value] specaxes : bool Produce spectral axes? [TRUE] specstyle : str Plotting style for the line plot axes [current value] style : str Plotting style for the spatial axes [current value] ybot : float Minimum data value to display in each spectrum [dyn.] ytop : float Maximum data value to display in each spectrum [dyn.] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CLINPLOT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/clinplot", "clinplot", ndf, **kwargs)
[docs]def cmult(in_, scalar, out, **kwargs): """ Multiplies an NDF by a scalar. Runs the command: $KAPPA_DIR/cmult . Arguments --------- `in_` : str,filename Input NDF data structure scalar : float Multiplication constant out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CMULT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/cmult", "cmult", in_, scalar, out, **kwargs)
[docs]def colcomp(inr, ing, inb, out, lut, **kwargs): """ Produces a colour composite of up to three 2-dimensional NDFs. Runs the command: $KAPPA_DIR/colcomp . Arguments --------- inr : str,filename The red NDF ing : str,filename The green NDF inb : str,filename The blue NDF out : str,filename The output NDF containing an image of colour indices lut : str,filename The output NDF containing the colour table Keyword Arguments ----------------- device : Name of display device [current image-display device] badcol : str Colour of bad pixels [current value] bhigh : float NDF data value corresponding to full blue intensity [!] blow : float NDF data value corresponding to zero blue intensity [!] ghigh : float NDF data value corresponding to full green intensity [!] glow : float NDF data value corresponding to zero green intensity [!] percentiles : List[float] Percentiles for default scaling [5,95] ppm : str,filename Filename to store output PPM image [!] rhigh : float NDF data value corresponding to full red intensity [!] rlow : float NDF data value corresponding to zero red intensity [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_COLCOMP for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/colcomp", "colcomp", inr, ing, inb, out, lut, **kwargs)
[docs]def collapse(in_, out, axis, **kwargs): """ Reduce the number of axes in an N-dimensional NDF by compressing Runs the command: $KAPPA_DIR/collapse . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF axis : str The axis to be collapsed Keyword Arguments ----------------- low : str Axis value at start of collapsed range [!] high : str Axis value at end of collapsed range [!] estimator : str Method for estimating collapsed pixel values ["Mean"] wlim : float Weight limit for good output pixels [0.3] clip : float Clipping standard deviation [3.0] comp : str Array component to collapse ["Data"] title : str Output title [!] trim : bool Remove collapsed pixel and WCS axis? [TRUE] variance : bool Process the variance array? [TRUE] wcsatts : str WCS attributes for input NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_COLLAPSE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/collapse", "collapse", in_, out, axis, **kwargs)
[docs]def compadd(in_, out, compress, **kwargs): """ Reduces the size of an NDF by adding values in rectangular boxes. Runs the command: $KAPPA_DIR/compadd . Arguments --------- `in_` : str,filename NDF to be compressed out : str,filename NDF after being compressed compress : List[int] Compression factors Keyword Arguments ----------------- wlim : float Weight limit for good output pixels [0.3] align : str Position for a compresion box corner ["ORIGIN"] axweight : bool Compute weighted axis centres? [FALSE] normal : bool Normalise summations for bad values? [TRUE] preserve : bool Preserve input data type in output NDF? [FALSE] title : str Title for output NDF [!] trim : bool Trim input NDF to a whole number of compression boxes? [current value] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_COMPADD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/compadd", "compadd", in_, out, compress, **kwargs)
[docs]def compave(in_, out, compress, **kwargs): """ Reduces the size of an NDF by averaging values in rectangular Runs the command: $KAPPA_DIR/compave . Arguments --------- `in_` : str,filename NDF to be compressed out : str,filename NDF after being compressed compress : List[int] Compression factors Keyword Arguments ----------------- wlim : float Weight limit for good output pixels [0.3] align : str Position for a compresion box corner ["ORIGIN"] axweight : bool Compute weighted axis centres? [FALSE] preserve : bool Preserve input data type in output NDF? [FALSE] title : str Title for output NDF [!] trim : bool Trim input NDF to a whole number of compression boxes? [current value] weight : bool Compute weighted averages using variance? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_COMPAVE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/compave", "compave", in_, out, compress, **kwargs)
[docs]def compick(in_, out, compress, **kwargs): """ Reduces the size of an NDF by picking equally spaced pixels. Runs the command: $KAPPA_DIR/compick . Arguments --------- `in_` : str,filename NDF to be compressed out : str,filename NDF after being compressed compress : List[int] Compression factors Keyword Arguments ----------------- origin : List[int] Pixel indices of the first selected element. [!] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_COMPICK for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/compick", "compick", in_, out, compress, **kwargs)
[docs]def configecho(name, config, **kwargs): """ Displays one or more configuration parameters. Runs the command: $KAPPA_DIR/configecho . Arguments --------- name : str Parameter name config : str Configuration parameters Keyword Arguments ----------------- defaults : str Defaults file [!] select : str Allowed parameter prefix selection [!] defval : str Default value [<***>] application : str Application for which to find configuration [current value] logfile : str Filename to store config parameters [!] ndf : NDF from which to read configuration [!] sort : bool Sort displayed configuration parameters? [FALSE] Returns ------- value : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CONFIGECHO for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/configecho", "configecho", name, config, **kwargs)
[docs]def contour(ndf, **kwargs): """ Contours a 2-d NDF. Runs the command: $KAPPA_DIR/contour . Arguments --------- ndf : str,filename NDF to be contoured Keyword Arguments ----------------- comp : str Component to contour ["Data"] mode : str Method for selecting contour heights ncont : int Give the number of contour heights [6] key : bool Do you want a key to contour levels? [TRUE] device : Name of graphics device [current image-display device] axes : bool Are annotated axes to be drawn? [!] clear : bool Is the current picture to be cleared before plotting? [TRUE] dashed : float Height below which contours are dashed [!] fast : bool Optimise drawing speed? [TRUE] fill : bool Fill the plotting area? [FALSE] firstcnt : float Give the height of the first contour heights : List[float] Give the heights of the contours keypos : List[float] Horizontal and vertical position of key [current value] keystyle : str Plotting style for the key [current value] labpos : List[float] Position for label in Good and Bounds modes [!] lastcnt : float Give the height of the last contour margin : List[float] Widths of margins around DATA picture [current value] pen1 : int penrot : bool Is the graphics pen to be cycled through 3 colours? [FALSE] pens : str Pen definitions for each contour [!] percentiles : List[float] Give the heights of the contours as percentiles stats : bool Are contouring statistics to be computed? [FALSE] stepcnt : float Give the interval between contour heights style : str Plotting style for the annotated axes and contours [current value] useaxis : str The axes to be annotated [!] Returns ------- length : List[float] number : List[int] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CONTOUR for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/contour", "contour", ndf, **kwargs)
[docs]def convolve(in_, psf, out, xcentre, ycentre, **kwargs): """ Convolves a pair of NDFs where the smoothing NDF is one- or Runs the command: $KAPPA_DIR/convolve . Arguments --------- `in_` : str,filename The input NDF psf : str,filename NDF containing the convolution function or PSF out : str,filename The output NDF xcentre : int X pixel index of the PSF centre within the PSF image ycentre : int Y pixel index of the PSF centre within the PSF image Keyword Arguments ----------------- axes : List[int] Indices of pixel axes spanning the convolution plane [dyn.] norm : bool Normalise the output NDF to match the input NDF? [TRUE] title : str Output title [!] wlim : float Weight limit for good output pixels [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CONVOLVE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/convolve", "convolve", in_, psf, out, xcentre, ycentre, **kwargs)
[docs]def copybad(in_, ref, out, **kwargs): """ Copies bad pixels from one NDF file to another. Runs the command: $KAPPA_DIR/copybad . Arguments --------- `in_` : str,filename Input NDF ref : str,filename Reference NDF out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] invert : bool Should good reference pixels be set bad? [FALSE] Returns ------- nbad : int ngood : int Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_COPYBAD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/copybad", "copybad", in_, ref, out, **kwargs)
[docs]def creframe(out, **kwargs): """ Generates a test two-dimensional NDF with a selection of several Runs the command: $KAPPA_DIR/creframe . Arguments --------- out : str,filename Output NDF structure Keyword Arguments ----------------- mode : str Form of data to be generated [GS] lbound : List[int] Lower bounds of the output NDF [1] ubound : List[int] Upper bounds of the output NDF [64] background : float Background value [0] badcol : int Number of bad columns to include [0] badpix : bool Bad pixels to be included? [FALSE] badrow : int Number of bad rows to include [0] dirn : int Direction of ramping [1] distrib : str Type of radial distribution (RSQ,FIX) ["FIX"] fraction : float Fraction of bad pixels [0.01] high : float Upper limit for data [1000] like : str,filename Template NDF [!] logfile : str,filename Name for log file [!] low : float Lower limit for data [0.0] max : float Maximum peak intensity for Gaussians mean : float Mean intensity min : float Minimum peak intensity for Gaussians ngauss : int Number of Gaussians outcat : str Output positions list [!] seeing : float Full-width half-maximum of Gaussians in pixels sigma : float Standard deviation of the noise. title : str Title for output NDF ["KAPPA - Creframe"] variance : bool Create a VARIANCE component? [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CREFRAME for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/creframe", "creframe", out, **kwargs)
[docs]def csub(in_, scalar, out, **kwargs): """ Subtracts a scalar from an NDF data structure. Runs the command: $KAPPA_DIR/csub . Arguments --------- `in_` : str,filename Input NDF data structure scalar : float Value to be subtracted out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CSUB for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/csub", "csub", in_, scalar, out, **kwargs)
[docs]def cumulvec(in_, out, **kwargs): """ Sums the values cumulatively in a one-dimensional NDF. Runs the command: $KAPPA_DIR/cumulvec . Arguments --------- `in_` : str,filename NDF to be summed out : str,filename Summed NDF Keyword Arguments ----------------- thresh : float Maximum difference of adjacent array values [!] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CUMULVEC for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/cumulvec", "cumulvec", in_, out, **kwargs)
[docs]def cursor(*args, **kwargs): """ Reports the co-ordinates of positions selected using the cursor. Runs the command: $KAPPA_DIR/cursor . Keyword Arguments ----------------- mode : str Co-ordinate system/picture mode [dyn.] name : str Name of pictures to be selected [!] outcat : str Output positions list [!] device : Name of graphics device [current graphics device] catepoch : float Output catalogue epoch catframe : str Output catalogue co-ordinate Frame [!] close : bool Are polygons to be closed? [current value] comp : str Array component to display ["Data"] describe : bool Are co-ordinate Frames to be described? [current value] epoch : float Epoch of observation frame : str Required co-ordinate Frame [!] geodesic : bool Should polygon edges be geodesic curves? [FALSE] info : bool Should the use of the mouse be described? [TRUE] just : str Justification for displayed text strings [CC] logfile : str,filename File to store cursor co-ordinates [!] marker : int The PGPLOT type for position markers [current value] maxpos : int Maximum number of positions which can be supplied [dyn.] minpos : int Minimum number of positions which must be supplied [0] plot : str What sort of graphics should be used? [current value] showdata : bool Also report pixel values? [FALSE] showpixel : bool Also report pixel co-ordinates? [current value] strings : str Strings to mark positions [!] style : str Style for graphics and formatted axis values [current value] Returns ------- lastdim : int lastpos : List[float] number : int Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_CURSOR for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/cursor", "cursor", *args, **kwargs)
[docs]def display(in_, **kwargs): """ Displays a one- or two-dimensional NDF. Runs the command: $KAPPA_DIR/display . Arguments --------- `in_` : str,filename NDF to be displayed Keyword Arguments ----------------- comp : str Component to display ["Data"] clear : bool Is the current picture to be cleared before display? [current value] device : Name of display device [current graphics device] mode : str Method to define the scaling limits centre : str Position at the centre of the display [!] xmagn : float Magnification in X co-ordinate about the centre of array [1.0] ymagn : float Magnification in Y co-ordinate about the centre of array [!] out : str,filename NDF for scaled data [!] axes : bool Are annotated axes to be drawn? [current value] badcol : str Colour of bad pixels [current value] border : bool Is a coloured border required? [current value] borstyle : str Plotting style for the border [current value] fill : bool Fill the plotting area? [dyn.] high : float High value for display key : bool Do you want a key to the colour table? [TRUE] keypos : List[float] Horizontal position of key [current value] keystyle : str Plotting style for the key [current value] low : float Low value for display lut : str,filename NDF containing lookup table [!] margin : List[float] Widths of margins around DATA picture [current value] nn : bool Nearest-neighbour mapping of lookup table? [FALSE] numbin : int Number of bins to compute percentiles [2048] penrange : List[float] Range of pens to use [0.0,1.0] percentiles : List[float] Percentiles for scaling [10,90] scale : bool Scale the data? [TRUE] sigmas : List[float] Standard-deviation limits for scaling [-2,2] sqrpix : bool Should all pixels be displayed as squares? [current value] style : str Plotting style for the annotated axes [current value] useaxis : str The axes to be annotated [!] Returns ------- scahigh : float Object to contain the upper scaling value. scalow : float Object to contain the lower scaling value. Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_DISPLAY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/display", "display", in_, **kwargs)
[docs]def div(in1, in2, out, **kwargs): """ Divides one NDF data structure by another. Runs the command: $KAPPA_DIR/div . Arguments --------- in1 : str,filename First input NDF in2 : str,filename Second input NDF out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_DIV for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/div", "div", in1, in2, out, **kwargs)
[docs]def drawnorth(*args, **kwargs): """ Draws arrows parallel to the axes. Runs the command: $KAPPA_DIR/drawnorth . Keyword Arguments ----------------- device : Name of graphics device [Current graphics device] length : List[float] Lengths of arrows [current value] origin : str Position of arrow origin [!] arrow : float Fractional size of arrow heads [current value] blank : bool Blank area behind arrows? [FALSE] blanksize : float Fractional size of area to be blanked [1.05] epoch : float Epoch of observation frame : str Co-ordinate Frame for arrows [!] oframe : str Co-ordinate Frame for origin ["CURNDC"] style : str Plotting style for the arrows [current value] useaxis : str The axes to be annotated [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_DRAWNORTH for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/drawnorth", "drawnorth", *args, **kwargs)
[docs]def drawsig(ndf, nsigma, **kwargs): """ Draws +/-n standard-deviation lines on a line plot. Runs the command: $KAPPA_DIR/drawsig . Arguments --------- ndf : str,filename Array to be analysed [The dataset used to create the existing plot.] nsigma : List[float] Sigma levels [1.0] Keyword Arguments ----------------- axis : str Orientation of lines ["Y"] comp : str Array component to process ["Data"] device : Name of graphics device [Current graphics device] style : str Plotting style for the lines [current value] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_DRAWSIG for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/drawsig", "drawsig", ndf, nsigma, **kwargs)
[docs]def elprof(in_, out, **kwargs): """ Creates a radial or azimuthal profile of a 2-dimensional image. Runs the command: $KAPPA_DIR/elprof . Arguments --------- `in_` : str,filename Input NDF out : str,filename Binned output NDF Keyword Arguments ----------------- nbin : int Number of bins to use [20] xc : float X pixel co-ordinate of ellipse centre yc : float Y pixel co-ordinate of ellipse centre anglim : List[float] Azimuthal angles defining the sector to be binned [0.0] angmaj : float Angle from X-axis to ellipse major axis [0.0] estimator : str Method for estimating output pixel values ["Mean"] mask : str,filename Output NDF to hold pixel mask [!] mtitle : str Title for output mask NDF ["Mask created by KAPPA - Elprof"] radial : bool Radial (as opposed to azimuthal) profile? [TRUE] ratio : float Ratio of the ellipse minor axis to the major axis [1.0] rmax : float Radius to outer edge of outer-most annulus [!] rmin : float Radius to inner edge of inner-most annulus [0.0] title : str Title for binned output NDF ["KAPPA - Elprof"] width : float Bin size [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ELPROF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/elprof", "elprof", in_, out, **kwargs)
[docs]def erase(object, **kwargs): """ Erases an HDS object. Runs the command: $KAPPA_DIR/erase . Arguments --------- object : HDS object to be erased? Keyword Arguments ----------------- ok : bool Confirm erasure? [FALSE] report : bool Report an error if the object does not exist? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ERASE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/erase", "erase", object, **kwargs)
[docs]def errclip(in_, out, limit, **kwargs): """ Removes pixels with large errors from an NDF. Runs the command: $KAPPA_DIR/errclip . Arguments --------- `in_` : str,filename The input NDF out : str,filename The output NDF limit : float Limiting value Keyword Arguments ----------------- mode : str Quantity to limit ["Sigma"] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ERRCLIP for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/errclip", "errclip", in_, out, limit, **kwargs)
[docs]def excludebad(in_, out, **kwargs): """ Excludes bad rows or columns from a two-dimensional NDF. Runs the command: $KAPPA_DIR/excludebad . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF Keyword Arguments ----------------- rows : bool Should bad rows be excluded? [TRUE] wlim : float Min. fraction of good pixels in a good row [0.0] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_EXCLUDEBAD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/excludebad", "excludebad", in_, out, **kwargs)
[docs]def expon(in_, out, base, **kwargs): """ Takes the exponential (specified base) of an NDF data structure. Runs the command: $KAPPA_DIR/expon . Arguments --------- `in_` : str,filename Input NDF data structure out : str,filename Output NDF base : str Base [Natural] Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_EXPON for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/expon", "expon", in_, out, base, **kwargs)
[docs]def ffclean(in_, out, clip, box, **kwargs): """ Removes defects from a substantially flat one-, two- or Runs the command: $KAPPA_DIR/ffclean . Arguments --------- `in_` : str,filename Give image to be cleaned out : str,filename NDF to hold the cleaned image clip : List[float] Clipping levels [3.0, 3.0, 3.0] box : List[int] Smoothing box size [3,3] Keyword Arguments ----------------- thresh : List[float] Data-value limits [!] wlim : float Weight limit for good output pixels [!] axes : List[int] Pixel axes spanning the rows or planes to be cleaned [dyn.] genvar : bool Generate output variance from local variations? [FALSE] title : str Title for output NDF [!] Returns ------- sigma : float Object to contain the RMS noise per pixel Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FFCLEAN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ffclean", "ffclean", in_, out, clip, box, **kwargs)
[docs]def fillbad(in_, out, **kwargs): """ Removes regions of bad values from an NDF. Runs the command: $KAPPA_DIR/fillbad . Arguments --------- `in_` : str,filename Give image to be cleaned out : str,filename NDF to hold the cleaned image Keyword Arguments ----------------- niter : int Number of iterations [2] size : List[float] Initial scale length in pixels along each dimension [5.0] block : int Maximum block dimension [512] memory : bool Is the array to be processed in blocks? [FALSE] title : str Title for output NDF [!] variance : bool Are variance values to be generated? [TRUE] Returns ------- cngmax : float Object to contain the maximum change cngrms : float Object to contain the RMS change Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FILLBAD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fillbad", "fillbad", in_, out, **kwargs)
[docs]def fitsdin(files, out, **kwargs): """ Reads a FITS disc file composed of simple, group or table objects. Runs the command: $KAPPA_DIR/fitsdin . Arguments --------- files : List[str] Give a list of the FITS files to be processed out : str,filename Output image Keyword Arguments ----------------- auto : bool Automatic mode? [FALSE] fmtcnv : bool Convert data? [TRUE] logfile : str,filename Filename to store FITS headers [!] dscftable : str,filename Name of FACTS description file encodings : str FITS keywords to use when creating NDF WCS components [!] glocon : bool Data-conversion switch to apply globally? [FALSE] table : str,filename Name of output table Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSDIN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitsdin", "fitsdin", files, out, **kwargs)
[docs]def fitsedit(*args, **kwargs): """ Edits the FITS extension of an NDF. Runs the command: $KAPPA_DIR/fitsedit.csh . Keyword Arguments ----------------- ndf : The name of the NDF whose FITS extension is to be edited. Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSEDIT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitsedit.csh", "fitsedit", *args, **kwargs)
[docs]def fitsexist(ndf, keyword, **kwargs): """ Inquires whether or not a keyword exists in a FITS extension. Runs the command: $KAPPA_DIR/fitsexist . Arguments --------- ndf : str,filename NDF to test for the presence of the FITS keyword keyword : str Keyword whose existence is to be determined Returns ------- exists : bool Object to store result of existence test Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSEXIST for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitsexist", "fitsexist", ndf, keyword, **kwargs)
[docs]def fitsexp(ndf, table, **kwargs): """ Exports NDF-extension information into an NDF FITS extension. Runs the command: $KAPPA_DIR/fitsexp . Arguments --------- ndf : str,filename Data structure to modify table : str,filename FITS keyword translation table Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSEXP for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitsexp", "fitsexp", ndf, table, **kwargs)
[docs]def fitshead(*args, **kwargs): """ Lists the headers of FITS files. Runs the command: $KAPPA_DIR/fitshead.csh . Keyword Arguments ----------------- block : The FITS blocking factor of the tape to list. This is the tape blocksize in bytes divided by the FITS record length of 2880 bytes. BLOCK must be a positive integer, between 1 and 12, otherwise you will be prompted for a new value. Should the first argument not be a tape device, this argument will be treated as a file name. [1] file : A space-separated list of FITS files whose headers are to be listed, or the name of a single no-rewind tape device. The list of files can include wildcard characters. finish : The last file on the tape to list. This defaults to the end of the tape. It must be a positive integer and at least equal to the value of start, otherwise you will be prompted for a new value. Should the first argument not be a tape device, this argument will be treated as a file name. start : The first file on the tape to list. This defaults to 1, i.e. the start of the tape. It must be a positive integer, otherwise you will be prompted for a new value. Should the first argument not be a tape device, this argument will be treated as a file name. [1] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSHEAD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitshead.csh", "fitshead", *args, **kwargs)
[docs]def fitsimp(ndf, table, xname, xtype, **kwargs): """ Imports FITS information into an NDF extension. Runs the command: $KAPPA_DIR/fitsimp . Arguments --------- ndf : str,filename Data structure to modify table : str,filename FITS keyword translation table xname : str Output extension name xtype : str Output extension type Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSIMP for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitsimp", "fitsimp", ndf, table, xname, xtype, **kwargs)
[docs]def fitslist(in_, **kwargs): """ Lists the FITS extension of an NDF. Runs the command: $KAPPA_DIR/fitslist . Arguments --------- `in_` : str,filename Input NDF Keyword Arguments ----------------- logfile : str,filename Filename to store the FITS headers [!] encoding : str Encoding for WCS keywords [!] fullwcs : bool Include headers for all WCS frames? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSLIST for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitslist", "fitslist", in_, **kwargs)
[docs]def fitsmod(ndf, keyword, edit, value, comment, position, **kwargs): """ Edits an NDF FITS extension via a text file or parameters. Runs the command: $KAPPA_DIR/fitsmod . Arguments --------- ndf : str,filename NDF containing FITS extension to edit keyword : str Keyword to edit edit : str Edit command [Read] value : str Value to write comment : str Comment to write position : str Position keyword Keyword Arguments ----------------- mode : str Mode by which editing instructions are to be supplied ["Interface"] newkey : str Renamed keyword readonly : bool Open the NDF for reading only? [dyn.] string : bool Is the value a string? [FALSE] table : str,filename FITS editing-instruction table Returns ------- exists : bool Object to store result of final "Exist" operation Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSMOD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitsmod", "fitsmod", ndf, keyword, edit, value, comment, position, **kwargs)
[docs]def fitstext(ndf, file, **kwargs): """ Creates an NDF FITS extension from a text file. Runs the command: $KAPPA_DIR/fitstext . Arguments --------- ndf : str,filename Data structure to modify file : str,filename Text file of FITS Headers Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSTEXT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitstext", "fitstext", ndf, file, **kwargs)
[docs]def fitsurface(ndf, **kwargs): """ Fits a polynomial surface to two-dimensional data array. Runs the command: $KAPPA_DIR/fitsurface . Arguments --------- ndf : str,filename NDF to be fitted Keyword Arguments ----------------- fittype : str Type of the fit ["Polynomial"] nxpar : , 1-15 Number of fitting parameters in the x direction [4] nypar : , 1-15 Number of fitting parameters in the y direction [4] cosys : str Co-ordinate system [Current co-ordinate system] knots : List[int] Number of interior knots (1-11) [4] overwrite : bool Overwrite any existing surface fit? [TRUE] variance : bool Weight using variance array, if available? [TRUE] xmax : float Maximum X co-ordinate for fit [!] xmin : float Minimum X co-ordinate for fit [!] ymax : float Maximum Y co-ordinate for fit [!] ymin : float Minimum Y co-ordinate for fit [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSURFACE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitsurface", "fitsurface", ndf, **kwargs)
[docs]def fitsval(ndf, keyword, **kwargs): """ Reports the value of a keyword in the FITS airlock. Runs the command: $KAPPA_DIR/fitsval . Arguments --------- ndf : str,filename NDF containing the FITS keyword keyword : str Keyword whose value is to be reported Returns ------- comment : str Object to store comment of FITS keyword value : str Object to store value of FITS keyword Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSVAL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fitsval", "fitsval", ndf, keyword, **kwargs)
[docs]def fitswrite(*args, **kwargs): """ Writes a new keyword to the FITS extension. Runs the command: fitsmod edit=write mode=interface position=\! . Keyword Arguments ----------------- comment : The comments to be written to the KEYWORD keyword. A null value (!) gives a blank comment. The special value "$C" means use the current comment. In addition "$C(keyword)" requests that the comment of the keyword given between the parentheses be assigned to the keyword being edited. If this positional keyword does not exist, the comment is is blank. keyword : The name of the new keyword in the FITS extension. A name may be compound to handle hierarchical keywords, and it has the form keyword1.keyword2.keyword3 etc. The maximum number of keywords per FITS card is 20. Each keyword must be no longer than 8 characters, and be a valid FITS keyword comprising only alphanumeric characters, hyphen, and underscore. Any lowercase letters are converted to uppercase and blanks are removed before comparison with the existing keywords. Note that it is not normal to have multiple occurrences of a keyword in a FITS header, unless it is blank, COMMENT or HISTORY. The suggested value is the current value. ndf : The NDF containing the FITS extension into which the new FITS keyword. position : The position keyword name. A position name may be compound to handle hierarchical keywords, and it has the form keyword1.keyword2.keyword3 etc. The maximum number of keywords per FITS card is 20. Each keyword must be no longer than 8 characters. When locating the position card, comparisons are made in uppercase and with the blanks removed. An occurrence may be specified (see parameter KEYWORD for details). The new keywords are inserted immediately before each corresponding position keyword. If any name in it does not exist in FITS array, or the null value (!) is supplied, the KEYWORD keyword will be inserted just before the END card or appended to FITS array when the END card does not exist. [!] string : When STRING is FALSE, inferred data typing is used. So for instance if parameter VALUE = "Y", it would appears as logical TRUE rather than the string 'Y ' in the FITS header. See topic "Value Data Type". When STRING is TRUE, the value will be treated as a string for the purpose of writing the FITS header. [FALSE] value : The new value of the KEYWORD keyword. The special value "$V" means use the current value of the KEYWORD keyword. This makes it possible to modify a comment, leaving the value unaltered. In addition "$V(keyword" requests that the value of the reference keyword given between the parentheses be assigned to the keyword being written. This reference keyword must exist and have a value. Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FITSWRITE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("fitsmod edit=write mode=interface position=\!", "fitswrite", *args, **kwargs)
[docs]def flip(in_, out, dim, **kwargs): """ Reverses an NDF's pixels along a specified dimension. Runs the command: $KAPPA_DIR/flip . Arguments --------- `in_` : str,filename Input NDF data structure out : str,filename Output NDF data structure dim : int Dimension to reverse pixels along Keyword Arguments ----------------- axis : bool Flip associated axis values? [TRUE] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FLIP for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/flip", "flip", in_, out, dim, **kwargs)
[docs]def fourier(in_, hermout, **kwargs): """ Performs forward and inverse Fourier transforms of 1- or Runs the command: $KAPPA_DIR/fourier . Arguments --------- `in_` : str,filename NDF to be transformed hermout : str,filename Hermitian-Fourier-transform NDF Keyword Arguments ----------------- fillval : str Fill and padding value [0.0] hermin : str,filename NDF for Hermitian Fourier transform hm_title : str Title for output Hermitian NDF ["KAPPA - Fourier - Hermitian"] im_title : str Title for output imaginary-transform NDF ["KAPPA - Fourier - Imaginary"] imagin : str,filename NDF for Fourier transform imaginary component [!] imagout : str,filename NDF for imaginary part of Fourier transform [!] inverse : bool Inverse transformation? [FALSE] out : str,filename Real NDF to be created ph_title : str Title for output power NDF ["KAPPA - Fourier - Phase"] phasein : str,filename NDF for Fourier transform phase component [!] phaseout : str,filename NDF for phase part of Fourier transform [!] powerin : str,filename NDF for Fourier transform power component [!] powerout : str,filename NDF for power part of Fourier transform [!] pw_title : str Title for output power NDF ["KAPPA - Fourier - Power"] realin : str,filename NDF for Fourier transform real component [!] realout : str,filename NDF for real part of Fourier transform [!] rl_title : str Title for output real-transform NDF ["KAPPA - Fourier - Real"] shift : bool Locate transform''s origin at centre? [FALSE] title : str Title for output real NDF ["KAPPA - Fourier"] trim : bool Trim output arrays if necessary? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_FOURIER for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/fourier", "fourier", in_, hermout, **kwargs)
[docs]def gausmooth(in_, out, fwhm, **kwargs): """ Smooths a one- to three-dimensional NDF using a Gaussian filter. Runs the command: $KAPPA_DIR/gausmooth . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF fwhm : List[float] Gaussian PSF full-width(s) at half-maximum [2.0] Keyword Arguments ----------------- axes : List[int] Indices of pixel axes spanning the smoothing plane [dyn.] box : List[int] Smoothing box size [!] orient : float Orientation of the elliptical PSF title : str Output title [!] wlim : float Weight limit for good output pixels [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_GAUSMOOTH for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/gausmooth", "gausmooth", in_, out, fwhm, **kwargs)
[docs]def gdclear(*args, **kwargs): """ Clears a graphics device and purges its database entries. Runs the command: $KAPPA_DIR/gdclear . Keyword Arguments ----------------- device : Name of graphics device [Current graphics device] current : bool Clear just the current picture? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_GDCLEAR for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/gdclear", "gdclear", *args, **kwargs)
[docs]def gdnames(*args, **kwargs): """ Shows which graphics devices are available. Runs the command: $KAPPA_DIR/gdnames . Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_GDNAMES for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/gdnames", "gdnames", *args, **kwargs)
[docs]def gdset(device, **kwargs): """ Selects a current graphics device. Runs the command: $KAPPA_DIR/gdset . Arguments --------- device : Graphics device Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_GDSET for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/gdset", "gdset", device=device, **kwargs)
[docs]def gdstate(*args, **kwargs): """ Shows the current status of a graphics device. Runs the command: $KAPPA_DIR/gdstate . Keyword Arguments ----------------- device : Graphics device [Current graphics device] frame : str Co-ordinate Frame to be displayed [!] describe : bool Show a description of the requested Frame? [current value] epoch : float Epoch of observation outline : bool Outline the current picture? [FALSE] report : bool Report results? [TRUE] style : str Plotting style for the outline [current value] Returns ------- comment : str domain : str label : str name : str refnam : str x1 : str x2 : str y1 : str y2 : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_GDSTATE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/gdstate", "gdstate", *args, **kwargs)
[docs]def glitch(in_, out, **kwargs): """ Replaces bad pixels in a 2-d NDF with the local median Runs the command: $KAPPA_DIR/glitch . Arguments --------- `in_` : str,filename Input image out : str,filename Output image Keyword Arguments ----------------- title : str Title for output image [!] incat : str,filename Positions list containing bad pixel positions infile : str,filename File containing the bad pixel positions mode : str Mode to obtain pixel positions [current value] pixpos : str Bad pixel position Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_GLITCH for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/glitch", "glitch", in_, out, **kwargs)
[docs]def globals(*args, **kwargs): """ Displays the values of the KAPPA global parameters. Runs the command: $KAPPA_DIR/globals . Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_GLOBALS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/globals", "globals", *args, **kwargs)
[docs]def hiscom(ndf, **kwargs): """ Adds commentary to the history of an NDF. Runs the command: $KAPPA_DIR/hiscom . Arguments --------- ndf : str,filename NDF to be given commentary Keyword Arguments ----------------- mode : str Method by which to obtain commentary ["Interface"] comment : str Comment line date : str Date associated with comment [!] file : str,filename File containing the commentary wrap : bool Wrap the comments to the maximum width? [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_HISCOM for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/hiscom", "hiscom", ndf, **kwargs)
[docs]def hislist(ndf, **kwargs): """ Lists NDF history records. Runs the command: $KAPPA_DIR/hislist . Arguments --------- ndf : str,filename NDF whose history is to be listed Keyword Arguments ----------------- brief : bool Produce a brief listing? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_HISLIST for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/hislist", "hislist", ndf, **kwargs)
[docs]def hisset(ndf, **kwargs): """ Sets the NDF history update mode. Runs the command: $KAPPA_DIR/hisset . Arguments --------- ndf : str,filename Dataset Keyword Arguments ----------------- mode : str History update mode ["Normal"] ok : bool Erase history? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_HISSET for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/hisset", "hisset", ndf, **kwargs)
[docs]def histat(ndf, **kwargs): """ Computes ordered statistics for an NDF's pixels using an Runs the command: $KAPPA_DIR/histat . Arguments --------- ndf : str,filename Data structure to analyse Keyword Arguments ----------------- comp : str NDF array component to analyse ["Data"] percentiles : List[float] List of percentiles [!] logfile : str,filename File for logging results [!] method : str Method for estimating the mode ["Moments"] numbin : int Number of histogram bins to compute mode [dyn.] Returns ------- maxcoord : List[float] maximum : float maxpos : List[int] maxwcs : str mean : float median : float mincoord : List[float] minimum : float minpos : List[int] minwcs : str mode : float numbad : int numgood : int numpix : int perval : List[float] total : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_HISTAT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/histat", "histat", ndf, **kwargs)
[docs]def histeq(in_, out, **kwargs): """ Performs an histogram equalisation on an NDF. Runs the command: $KAPPA_DIR/histeq . Arguments --------- `in_` : str,filename NDF to be transformed out : str,filename NDF after transformation Keyword Arguments ----------------- numbin : int Number of histogram bins [2048] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_HISTEQ for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/histeq", "histeq", in_, out, **kwargs)
[docs]def histogram(in_, numbin, range, **kwargs): """ Computes an histogram of an NDF's values. Runs the command: $KAPPA_DIR/histogram . Arguments --------- `in_` : str,filename NDF to analyse numbin : int Number of histogram bins [20] range : str Range of values in the histogram [current value] Keyword Arguments ----------------- comp : str NDF array component to analyse ["Data"] logfile : str,filename File for logging results [!] axes : bool Produce annotated axes? [dyn.] clear : bool Is the current picture to be cleared before plotting? [TRUE] cumul : bool Produce a cumulative histogram? [FALSE] device : Name of graphics device [Current graphics device] margin : List[float] Widths of margins around DATA picture [current value] out : str,filename NDF in which to store histogram [!] style : str Plotting style [current value] title : str Title for histogram NDF ["KAPPA - Histogram"] weights : str,filename NDF holding weights [!] weightstep : float Weight corresponding to a single histogram count [1.0] width : float Width of histogram bins [!] xleft : float Axis value at left end of horizontal axis [!] xlog : bool Is the abscissa to be plotted logarithmically? [FALSE] xright : float Axis value at right end of horizontal axis [!] ybot : float Axis value at bottom of vertical axis [!] ylog : bool Is the ordinate to be plotted logarithmically? [FALSE] ytop : float Axis value at top of vertical axis [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_HISTOGRAM for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/histogram", "histogram", in_, numbin, range, **kwargs)
[docs]def interleave(in_, out, expand, **kwargs): """ Forms a higher-resolution NDF by interleaving a set of NDFs. Runs the command: $KAPPA_DIR/interleave . Arguments --------- `in_` : str,filename NDFs to be interleaved out : str,filename NDF after being expanded expand : List[int] Expansion factors Keyword Arguments ----------------- fill : str Filling value of the output array ["Bad"] title : str Title for output NDF [!] trim : bool Trim or pad the input NDFs before interleaving? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_INTERLEAVE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/interleave", "interleave", in_, out, expand, **kwargs)
[docs]def kapversion(*args, **kwargs): """ Checks the package version number. Runs the command: $KAPPA_DIR/kapversion . Keyword Arguments ----------------- compare : str The version string for comparison [!] Returns ------- result : int Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_KAPVERSION for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/kapversion", "kapversion", *args, **kwargs)
[docs]def kstest(in_, out, **kwargs): """ Compares data sets using the Kolmogorov-Smirnov test. Runs the command: $KAPPA_DIR/kstest . Arguments --------- `in_` : str Name of the input files containing data to be compared out : str,filename Name of file to contain consistent output data [!] Keyword Arguments ----------------- limit : float Confidence level at which subsamples are rejected [0.05] comp : str NDF array component to analyse ["Data"] nsample : int Number of subsamples [dyn.] Returns ------- dist : List[float] errmean : float files : List[str] mean : float nkept : int prob : List[float] sigma : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_KSTEST for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/kstest", "kstest", in_, out, **kwargs)
[docs]def laplace(in_, out, **kwargs): """ Performs a Laplacian convolution as an edge detector in a 2-d NDF Runs the command: $KAPPA_DIR/laplace . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF Keyword Arguments ----------------- number : int Number of Laplacians to remove [1] title : str Output title [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LAPLACE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/laplace", "laplace", in_, out, **kwargs)
[docs]def linplot(ndf, **kwargs): """ Draws a line plot of the data values in a one-dimensional NDF. Runs the command: $KAPPA_DIR/linplot . Arguments --------- ndf : str,filename 1-D array to be displayed Keyword Arguments ----------------- comp : str Component to display ["Data"] mode : str Method for displaying the data curve [current value] xleft : str Axis value at left end of horizontal axis [!] xright : str Axis value at right end of horizontal axis [!] ybot : str Axis value at bottom of vertical axis [!] ytop : str Axis value at top of vertical axis [!] device : Name of graphics device [current graphics device] align : bool Align the horizontal axis with the existing plot? [!] alignsys : str Co-ordinate system in which to align old and new plots ["Data"] axes : bool Produce annotated axes? [!] clear : bool Is the current picture to be cleared before plotting? [TRUE] errbar : bool Draw error bars on the graph? [FALSE] freq : int Frequency of plotted error bars [1] key : bool Do you want a key? [!] keystyle : str Plotting style for the key [current value] lmode : str Method for determining default Y bounds [current value] margin : List[float] Widths of margins around DATA picture [current value] marker : int PGPLOT marker type [current value] shape : str Method for displaying the errors [current value] style : str Plotting style for the annotated axes and data curve [current value] useaxis : str The axis to be annotated [!] xmap : str Mapping of X axis onto screen ["Default"] xsigma : float Number of standard deviations for horizontal error bars [current value] ymap : str Mapping of Y axis onto screen ["Linear"] ysigma : float Number of standard deviations for vertical error bars [current value] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LINPLOT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/linplot", "linplot", ndf, **kwargs)
[docs]def listmake(outcat, **kwargs): """ Creates a catalogue holding a positions list. Runs the command: $KAPPA_DIR/listmake . Arguments --------- outcat : str Output positions list Keyword Arguments ----------------- ndf : str,filename Reference NDF [!] mode : str Mode to obtain positions ["Interface"] file : str,filename Text file containing positions catepoch : float Output catalogue epoch catframe : str Output catalogue co-ordinate Frame [!] describe : bool Is the co-ordinate Frame to be described? [Current value] dim : int Number of axes for each position [2] epoch : float Epoch of observation frame : str Co-ordinate Frame in which positions are defined [PIXEL] incat : str,filename Input positions list [!] position : str A position for the output list [!] title : str A title for the output list [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LISTMAKE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/listmake", "listmake", outcat, **kwargs)
[docs]def listshow(incat, **kwargs): """ Reports the positions stored in a positions list. Runs the command: $KAPPA_DIR/listshow . Arguments --------- incat : str,filename Positions list Keyword Arguments ----------------- frame : str Required co-ordinate Frame [!] first : int Lowest position identifier to display [!] last : int Highest position identifier to display [!] plot : str What sort of graphics should be used? ["None"] device : Name of graphics device [The current graphics device] catepoch : float Output catalogue epoch catframe : str Output catalogue co-ordinate Frame [!] close : bool Are polygons to be closed? [Current value] describe : bool Is the co-ordinate Frame to be described? [Current value] epoch : float Epoch of observation geodesic : bool Should polygon edges be geodesic curves? [FALSE] just : str Justification for displayed text strings ["CC"] label : bool Are plotted positions to be labelled? [FALSE] labtype : str Type of label to display [!] logfile : str,filename File to store selected co-ordinates [!] marker : int The PGPLOT type for position markers [current value] name : str Name of picture with which to align positions ["DATA"] outcat : str Output positions list [!] stcscol : str Name of column holding STC-S descriptions ["Shape"] step : int Increment between displayed positions [1] strings : str Strings to mark positions [!] style : str Style for graphics and formatted axis values [current value] Returns ------- dim : int number : int posns : List[float] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LISTSHOW for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/listshow", "listshow", incat, **kwargs)
[docs]def logar(in_, out, base, **kwargs): """ Takes the logarithm (specified base) of an NDF data structure. Runs the command: $KAPPA_DIR/logar . Arguments --------- `in_` : str,filename Input NDF data structure out : str,filename Output NDF base : str Base [Natural] Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LOGAR for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/logar", "logar", in_, out, base, **kwargs)
[docs]def look(ndf, centre, **kwargs): """ Lists pixel values in a one- or two-dimensional NDF. Runs the command: $KAPPA_DIR/look . Arguments --------- ndf : str,filename NDF to examine centre : str Position at the centre of the listing Keyword Arguments ----------------- size : List[int] The dimensions (in pixels) of the area to be listed [7] logfile : str,filename File to store listing in [!] format : str Format for listing ["strips"] comp : str Component to list ["Data"] mode : str Method for specifying the region ["Centre"] again : bool List another region? [FALSE] arddesc : str ARD description for region to be listed ardfile : str,filename ARD file for region to be listed lbound : str Position at the bottom left corner of the listing [!] maxlen : int The line length for the listing [80] style : str Formatting style for data values [current value] ubound : str Position at the top right corner of the listing [!] useaxis : str The axes to be annotated [!] Returns ------- value : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LOOK for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/look", "look", ndf, centre, **kwargs)
[docs]def lucy(in_, psf, out, **kwargs): """ Performs a Richardson-Lucy deconvolution of a 1- or 2-dimensional Runs the command: $KAPPA_DIR/lucy . Arguments --------- `in_` : str,filename The input NDF psf : str,filename An NDF holding the PSF out : str,filename The output NDF Keyword Arguments ----------------- aim : float Target normalised chi-squared [1.0] back : str,filename An NDF holding the background data [!] backval : float Constant-background data value [0.0] chifac : float Target normalised chi-squared [1.0] niter : int Maximum number of iterations to perform [50] sigma : float Standard deviation of the noise [!] snyder : bool Use the Snyder modification? [TRUE] start : str,filename An NDF holding a guess at the restored image [!] thresh : float Truncation fractional threshold of PSF [0.0625] title : str Title for output NDF [!] variance : bool Use variances stored in the input NDF? [!] wlim : float Weight limit for good output pixels [0.001] xcentre : int X pixel index of the PSF centre within the PSF image [!] ycentre : int Y pixel index of the PSF centre within the PSF image [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUCY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/lucy", "lucy", in_, psf, out, **kwargs)
[docs]def lutable(mapping, coltab, lut, **kwargs): """ Manipulates an image-display colour table. Runs the command: $KAPPA_DIR/lutable . Arguments --------- mapping : str Type of scaling between limits coltab : str Kind of colour table lut : str,filename NDF containing input LUT Keyword Arguments ----------------- device : Name of display device [Current image-display device] ndf : str,filename Image for histogram equalisation percentiles : List[float] Percentile limits for the histogram [10,90] shade : float Type of shading full : bool Write to the full colour table? [FALSE] nn : bool Nearest-neighbour mapping? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTABLE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/lutable", "lutable", mapping, coltab, lut, **kwargs)
[docs]def lutbgyrw(*args, **kwargs): """ Loads the BGYRW lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/bgyrw_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTBGYRW for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/bgyrw_lut", "lutbgyrw", *args, **kwargs)
[docs]def lutcol(*args, **kwargs): """ Loads the standard colour lookup table. Runs the command: lutable mapping=linear coltab=colour . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTCOL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=colour", "lutcol", *args, **kwargs)
[docs]def lutcold(*args, **kwargs): """ Loads the cold lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/cold_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTCOLD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/cold_lut", "lutcold", *args, **kwargs)
[docs]def lutcont(*args, **kwargs): """ Loads a lookup table to give the display the appearance of a Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/cont_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTCONT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/cont_lut", "lutcont", *args, **kwargs)
[docs]def lutedit(*args, **kwargs): """ Create or edit an image-display colour lookup table. Runs the command: $KAPPA_DIR/lutedit . Keyword Arguments ----------------- lut : str,filename NDF containing input LUT [!] image : str,filename Image to display device : Name of display device [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTEDIT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/lutedit", "lutedit", *args, **kwargs)
[docs]def lutfc(*args, **kwargs): """ Loads the standard false-colour lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/fc_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTFC for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/fc_lut", "lutfc", *args, **kwargs)
[docs]def lutgrey(*args, **kwargs): """ Loads the standard greyscale lookup table. Runs the command: lutable mapping=linear coltab=grey . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTGREY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=grey", "lutgrey", *args, **kwargs)
[docs]def lutheat(*args, **kwargs): """ Loads the heat lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/heat_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTHEAT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/heat_lut", "lutheat", *args, **kwargs)
[docs]def lutikon(*args, **kwargs): """ Loads the default Ikon lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/ikon_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTIKON for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/ikon_lut", "lutikon", *args, **kwargs)
[docs]def lutneg(*args, **kwargs): """ Loads the standard negative greyscale lookup table. Runs the command: lutable mapping=linear coltab=negative . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTNEG for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=negative", "lutneg", *args, **kwargs)
[docs]def lutramps(*args, **kwargs): """ Loads the coloured-ramps lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/ramps_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTRAMPS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/ramps_lut", "lutramps", *args, **kwargs)
[docs]def lutread(*args, **kwargs): """ Loads an image-display lookup table from an NDF. Runs the command: lutable mapping=linear coltab=external . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] lut : Name of the NDF containing the lookup table as its data array. The LUT must be 2-dimensional, the first dimension being 3, and the second being arbitrary. Linear interpolation is used to compress or expand the colour table if the second dimension is different from the number of unreserved colour indices. Also the LUT's values must lie in the range 0.0--1.0. Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTREAD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external", "lutread", *args, **kwargs)
[docs]def lutsave(lut, **kwargs): """ Saves the current colour table of an image-display device in an Runs the command: $KAPPA_DIR/lutsave . Arguments --------- lut : str,filename Lookup-table NDF Keyword Arguments ----------------- device : Name of display device [Current image display] full : bool Is the full colour-table to be saved? [FALSE] logfile : str,filename Text file in which to store colour-table [!] title : str Title for output NDF ["KAPPA - Lutsave"] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTSAVE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/lutsave", "lutsave", lut, **kwargs)
[docs]def lutspec(*args, **kwargs): """ Loads a spectrum-like lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/spectrum_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTSPEC for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/spectrum_lut", "lutspec", *args, **kwargs)
[docs]def lutview(*args, **kwargs): """ Draws a colour-table key. Runs the command: $KAPPA_DIR/lutview . Keyword Arguments ----------------- mode : str Positioning method ["Cursor"] low : float Value corresponding to lowest colour index [Current display linear-scaling minimum] high : float Value corresponding to highest colour index [Current display linear-scaling maximum] curpic : bool Restrict to the current picture? [FALSE] device : Name of display device [Current image-display device] comp : str Displayed NDF component [Data] epoch : float Epoch of observation frame : str Required co-ordinate Frame ["BASEPIC"] lbound : str Lower bound lut : str,filename NDF containing lookup table [!] ndf : str,filename Displayed image [!] nn : bool Nearest-neighbour mapping of lookup table? [FALSE] style : str Plotting style for the annotation [current value] ubound : str Upper bound Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTVIEW for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/lutview", "lutview", *args, **kwargs)
[docs]def lutwarm(*args, **kwargs): """ Loads the warm lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/warm_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTWARM for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/warm_lut", "lutwarm", *args, **kwargs)
[docs]def lutzebra(*args, **kwargs): """ Loads a pseudo-contour lookup table. Runs the command: lutable mapping=linear coltab=external lut=$KAPPA_DIR/zebra_lut . Keyword Arguments ----------------- device : Name of the image display whose colour table is to be changed. [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_LUTZEBRA for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("lutable mapping=linear coltab=external lut=$KAPPA_DIR/zebra_lut", "lutzebra", *args, **kwargs)
[docs]def makesnr(in_, out, **kwargs): """ Creates a signal-to-noise array from an NDF with defined variances. Runs the command: $KAPPA_DIR/makesnr . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF Keyword Arguments ----------------- minvar : float Minimum usable Variance value [dyn.] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MAKESNR for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/makesnr", "makesnr", in_, out, **kwargs)
[docs]def makesurface(in_, out, **kwargs): """ Creates a two-dimensional NDF from the coefficients of a Runs the command: $KAPPA_DIR/makesurface . Arguments --------- `in_` : str,filename NDF containing coefficients out : str,filename NDF to contain surface Keyword Arguments ----------------- lbound : List[int] Lower bounds of the output NDF [1,1] like : str,filename Template NDF (null for none) [!] title : str Title for the new NDF [!] type : str Data type of output NDF [_DOUBLE] ubound : List[int] Upper bounds of the output NDF [512,512] variance : bool Create a variance error? [FALSE] xlimit : List[float] X co-ordinate limits (lower then upper) ylimit : List[float] Y co-ordinate limits (lower then upper) Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MAKESURFACE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/makesurface", "makesurface", in_, out, **kwargs)
[docs]def manic(in_, out, axes, **kwargs): """ Change the dimensionality of all or part of an NDF. Runs the command: $KAPPA_DIR/manic . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF axes : List[int] Input axis for each output axis Keyword Arguments ----------------- lbound : List[int] Lower bounds for new expanded axes title : str Title for output NDF [!] ubound : List[int] Upper bounds for new expanded axes Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MANIC for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/manic", "manic", in_, out, axes, **kwargs)
[docs]def maths(exp, out, **kwargs): """ Evaluates mathematical expressions applied to NDF data structures. Runs the command: $KAPPA_DIR/maths . Arguments --------- exp : str Expression out : str,filename Output NDF structure Keyword Arguments ----------------- fa : str Sub-expression fb : str Sub-expression fc : str Sub-expression fd : str Sub-expression fe : str Sub-expression ff : str Sub-expression fg : str Sub-expression fh : str Sub-expression fi : str Sub-expression fj : str Sub-expression fk : str Sub-expression fl : str Sub-expression fm : str Sub-expression fn : str Sub-expression fo : str Sub-expression fp : str Sub-expression fq : str Sub-expression fr : str Sub-expression fs : str Sub-expression ft : str Sub-expression fu : str Sub-expression fv : str Sub-expression fw : str Sub-expression fx : str Sub-expression fy : str Sub-expression fz : str Sub-expression ia : str,filename Input NDF structure ib : str,filename Input NDF structure ic : str,filename Input NDF structure id : str,filename Input NDF structure ie : str,filename Input NDF structure `if_` : str,filename Input NDF structure ig : str,filename Input NDF structure ih : str,filename Input NDF structure ii : str,filename Input NDF structure ij : str,filename Input NDF structure ik : str,filename Input NDF structure il : str,filename Input NDF structure im : str,filename Input NDF structure `in_` : str,filename Input NDF structure io : str,filename Input NDF structure ip : str,filename Input NDF structure iq : str,filename Input NDF structure ir : str,filename Input NDF structure `is_` : str,filename Input NDF structure it : str,filename Input NDF structure iu : str,filename Input NDF structure iv : str,filename Input NDF structure iw : str,filename Input NDF structure ix : str,filename Input NDF structure iy : str,filename Input NDF structure iz : str,filename Input NDF structure lbound : List[int] Lower bounds of the output NDF like : str,filename Template NDF (null for none) [!] pa : float Parametric constant pb : float Parametric constant pc : float Parametric constant pd : float Parametric constant pe : float Parametric constant pf : float Parametric constant pg : float Parametric constant ph : float Parametric constant pi : float Parametric constant pj : float Parametric constant pk : float Parametric constant pl : float Parametric constant pm : float Parametric constant pn : float Parametric constant po : float Parametric constant pp : float Parametric constant pq : float Parametric constant pr : float Parametric constant ps : float Parametric constant pt : float Parametric constant pu : float Parametric constant pv : float Parametric constant pw : float Parametric constant px : float Parametric constant py : float Parametric constant pz : float Parametric constant quick : bool Calculate output variance by quick method? [TRUE] title : str Title for output NDF [!] type : str Data type of output NDF [_REAL] ubound : List[int] Upper bounds of the output NDF units : bool Propagate NDF units to output? [FALSE] va : str,filename Input NDF structure for variance variance : bool Calculate output variance? [TRUE] vb : str,filename Input NDF structure for variance vc : str,filename Input NDF structure for variance vd : str,filename Input NDF structure for variance ve : str,filename Input NDF structure for variance vf : str,filename Input NDF structure for variance vg : str,filename Input NDF structure for variance vh : str,filename Input NDF structure for variance vi : str,filename Input NDF structure for variance vj : str,filename Input NDF structure for variance vk : str,filename Input NDF structure for variance vl : str,filename Input NDF structure for variance vm : str,filename Input NDF structure for variance vn : str,filename Input NDF structure for variance vo : str,filename Input NDF structure for variance vp : str,filename Input NDF structure for variance vq : str,filename Input NDF structure for variance vr : str,filename Input NDF structure for variance vs : str,filename Input NDF structure for variance vt : str,filename Input NDF structure for variance vu : str,filename Input NDF structure for variance vv : str,filename Input NDF structure for variance vw : str,filename Input NDF structure for variance vx : str,filename Input NDF structure for variance vy : str,filename Input NDF structure for variance vz : str,filename Input NDF structure for variance Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MATHS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/maths", "maths", exp, out, **kwargs)
[docs]def median(in_, out, **kwargs): """ Smooths a 2-dimensional data array using a weighted median filter. Runs the command: $KAPPA_DIR/median . Arguments --------- `in_` : str,filename Image for filtering with weighted median filter out : str,filename NDF to hold filtered data Keyword Arguments ----------------- mode : int Type of WMF to use, reply -1 -> 7 [0] diff : float Threshold for replacement by median. [dyn.] bound : str Reflect or Replicate at image edge [dyn.] numit : int Number of iterations of filter [dyn.] corner : int Corner value for weighting function [1] centre : int Centre value for weighting function [1] side : int Side value for weighting function [1] iterate : str Specified or Continuous iteration [dyn.] maxit : int Number of iterations before damping [dyn.] medthr : float Fractional threshold for sorted actual median position [dyn.] step : List[int] Stepsize(s) for weighting function [1] title : str Output title [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MEDIAN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/median", "median", in_, out, **kwargs)
[docs]def mfittrend(in_, axis, ranges, out, order, **kwargs): """ Fits independent trends to data lines that are parallel to an Runs the command: $KAPPA_DIR/mfittrend . Arguments --------- `in_` : str,filename Input NDF axis : str Axis of trends [!] ranges : List[str] Co-ordinate ranges (pairs) [!] out : str,filename Output NDF order : int Order of polynomials [3] Keyword Arguments ----------------- auto : bool Automatic selection of fitting ranges? [FALSE] clip : List[float] Clipping standard deviations to reject outliers for automatic ranges [2,2,2.5,3] fittype : str Type of the fit ["Polynomial"] forest : bool Does the data contain any lineforests? [FALSE] hnumbin : int Number of bins for histogram to determine the mode [dyn.] interpol : bool Use a interpolation spline? [FALSE] knots : int Number of interior knots (1-11) [4] mask : str,filename NDF for the feature mask [!] method : str Method to define masked regions in automatic mode ["Single"] modifyin : bool Modify the input NDF [FALSE] numbin : int Number of bins for automatic feature rejection [32] posknot : List[str] Co-ordinates of knots [!] propbad : bool Propagate bad input values to the returned fit? [TRUE] rmsclip : float Clipping standard deviation to reject fit r.m.s. outliers [!] section : str Section to be averaged to determine fitting ranges [!] subtract : bool Subtract trends [FALSE] title : str Title for output NDF [!] variance : bool Use variances as weights [TRUE] Returns ------- aranges : List[int] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MFITTREND for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/mfittrend", "mfittrend", in_, axis, ranges, out, order, **kwargs)
[docs]def mlinplot(ndf, **kwargs): """ Draws a multi-line plot of the data values in a two-dimensional Runs the command: $KAPPA_DIR/mlinplot . Arguments --------- ndf : str,filename Image to be plotted Keyword Arguments ----------------- comp : str Component to plot [dyn.] lnindx : str Select lines to plot mode : str Method for displaying the data curve [current value] xleft : str Axis value at left end of horizontal axis [!] xright : str Axis value at right end of horizontal axis [!] ybot : str Axis value at bottom of vertical axis [!] ytop : str Axis value at top of vertical axis [!] device : Name of display device [current graphics device] absaxs : int Dimension of the NDF to use as abscissa [1] axes : bool Produce annotated axes? [!] clear : bool Is the current picture to be cleared before plotting? [TRUE] errbar : bool Draw error bars on the graph? [FALSE] freq : int Frequency of plotted error bars [1] key : bool Plot a key of the offsets? [TRUE] keypos : List[float] Horizontal and vertical position of key [current value] keystyle : str Plotting style for the key [current value] labels : str Labels for each curve [!] linlab : bool Should a label be included within each curve [TRUE] margin : List[float] Widths of margins around DATA picture [current value] marker : int PGPLOT marker type [current value] offset : List[float] Offset value for each line pens : str Pen definitions for each curve [!] sigma : float Number of standard deviations for vertical error bars [current value] space : str Method to offset the lines ["Average"] style : str Plotting style for the annotated axes and data curves [current value] useaxis : str The axis to be annotated [!] ylog : bool Is the logarithm of the data to be displayed? [FALSE] zmark : bool Should zero point markers be drawn? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MLINPLOT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/mlinplot", "mlinplot", ndf, **kwargs)
[docs]def mstats(in_, out, **kwargs): """ Calculate statistics over a group of data arrays or points. Runs the command: $KAPPA_DIR/mstats . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF Keyword Arguments ----------------- estimator : str Method for estimating collapsed pixel values ["Mean"] clip : float Clipping standard deviation [3.0] comp : str Component to analyse ["Data"] pos : str Position at which to calculate statistics single : bool Statistics at a single point? [FALSE] title : str Title for output NDF ["KAPPA - Mstats"] trim : bool Trim output NDF to common overlap? [TRUE] variance : bool Process the variance array? [TRUE] wlim : float Weight limit for good output pixels [0.3] Returns ------- mean : float median : float var : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MSTATS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/mstats", "mstats", in_, out, **kwargs)
[docs]def mult(in1, in2, out, **kwargs): """ Multiplies two NDF data structures. Runs the command: $KAPPA_DIR/mult . Arguments --------- in1 : str,filename First input NDF in2 : str,filename Second input NDF out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_MULT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/mult", "mult", in1, in2, out, **kwargs)
[docs]def native(object, **kwargs): """ Converts an HDS object to native machine data representation. Runs the command: $KAPPA_DIR/native . Arguments --------- object : UNIVERSAL HDS object to convert Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NATIVE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/native", "native", object, **kwargs)
[docs]def ndfcompare(in1, in2, **kwargs): """ Compares a pair of NDFs for equivalence. Runs the command: $KAPPA_DIR/ndfcompare . Arguments --------- in1 : str,filename The first NDF to compare in2 : str,filename The second NDF to compare Keyword Arguments ----------------- report : str Text file in which to store the report [!] accdat : str Maximum difference allowed between DATA values ["1E-6 R"] accpos : float Maximum allowed positional difference in pixels [0.2] accvar : str Maximum difference allowed between VARIANCE values ["1E-6 R"] case : bool Case sensitive string comparisons? [TRUE] comp : str List of NDF components to check for existence [!] dotests : List[int] The initial list of tests to perform [!] nbad : str Maximum difference in bad pixel counts ["0.001 R"] skiptests : List[int] The list of tests to skip [15] white : bool Ignore leading and traing spaces in string comparisons? [FALSE] Returns ------- similar : bool Object to store result of comparison Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NDFCOMPARE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ndfcompare", "ndfcompare", in1, in2, **kwargs)
[docs]def ndfcompress(in_, out, **kwargs): """ Compresses an NDF so that it occupies less disk space. Runs the command: $KAPPA_DIR/ndfcompress . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF Keyword Arguments ----------------- method : str Compression method [DELTA] dscale : float Scale factor for Data component [!] dzero : float Zero offset for Data component [!] scaledtype : str Data type for scaled values [current value] vscale : float Scale factor for VARIANCE component [!] vzero : float Zero offset for VARIANCE component [!] zaxis : int Index of compression axis [0] zminratio : float Minimum acceptable compression ratio [1.0] ztype : str Data type for difference values [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NDFCOMPRESS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ndfcompress", "ndfcompress", in_, out, **kwargs)
[docs]def ndfcopy(in_, out, **kwargs): """ Copies an NDF (or NDF section) to a new location. Runs the command: $KAPPA_DIR/ndfcopy . Arguments --------- `in_` : str,filename Input NDF structure out : str,filename Output NDF structure Keyword Arguments ----------------- comp : str Array component containing data values ["Data"] exten : bool Modify shape of extension NDFs? [FALSE] like : str,filename NDF to use as a shape template [!] likewcs : bool Use the template WCS shape? [FALSE] title : str Title for output NDF [!] trim : bool Remove insignificant output pixel axes? [FALSE] trimbad : bool Remove any border of bad pixels? [FALSE] trimwcs : bool Remove surplus output WCS axes? [TRUE] useaxis : str The WCS axes to retain in the output [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NDFCOPY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ndfcopy", "ndfcopy", in_, out, **kwargs)
[docs]def ndfecho(ndf, **kwargs): """ Displays a group of NDF names. Runs the command: $KAPPA_DIR/ndfecho . Arguments --------- ndf : str,filename A group of existing NDFs Keyword Arguments ----------------- mod : str The NDFs to be listed [!] first : int Index of first NDF to display [!] last : int Index of last NDF to display [dyn.] show : str The information to display about each NDF ["Path"] abspath : bool Convert relative NDF paths to absolute? [FALSE] exists : bool Only display paths for existing and accessible NDFs? [FALSE] logfile : str Log file [!] pattern : str Pattern matching template [!] Returns ------- nmatch : int size : int value : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NDFECHO for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ndfecho", "ndfecho", ndf, **kwargs)
[docs]def ndftrace(ndf, **kwargs): """ Displays the attributes of an NDF data structure. Runs the command: $KAPPA_DIR/ndftrace . Arguments --------- ndf : str,filename NDF structure to examine Keyword Arguments ----------------- fullaxis : bool Display full axis information? [FALSE] fullframe : bool Display full co-ordinate Frame information? [FALSE] fullwcs : bool Display full WCS information? [FALSE] Returns ------- aend : List[float] aform : List[str] alabel : List[str] amono : List[bool] anorm : List[bool] astart : List[float] atype : List[str] aunits : List[str] avariance : List[bool] axis : bool bad : bool badbits : str current : int dims : List[int] extname : List[str] exttype : List[str] fdim : List[int] fdomain : List[str] flabel : List[str] flbnd : List[float] form : str fpixscale : List[str] ftitle : List[str] fubnd : List[float] funit : List[str] history : bool label : str lbound : List[int] ndim : int nextn : int nframe : int quality : bool scale : float sctype : str title : str type : str ubound : List[int] units : str variance : bool wcs : bool width : List[bool] zero : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NDFTRACE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/ndftrace", "ndftrace", ndf, **kwargs)
[docs]def noglobals(*args, **kwargs): """ Resets the KAPPA global parameters. Runs the command: $KAPPA_DIR/noglobals . Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NOGLOBALS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/noglobals", "noglobals", *args, **kwargs)
[docs]def nomagic(in_, out, repval, **kwargs): """ Replaces all occurrences of magic value pixels in an NDF array Runs the command: $KAPPA_DIR/nomagic . Arguments --------- `in_` : str,filename NDF from which magic values are to be removed out : str,filename NDF without magic values repval : float The value to replace the magic value Keyword Arguments ----------------- sigma : float The standard deviation of the replacement values [!] comp : str Component(s) to process ["Data"] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NOMAGIC for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/nomagic", "nomagic", in_, out, repval, **kwargs)
[docs]def normalize(in1, in2, out, **kwargs): """ Normalises one NDF to a similar NDF by calculating a scale factor Runs the command: $KAPPA_DIR/normalize . Arguments --------- in1 : str,filename The NDF to be normalised in2 : str,filename The NDF to define the normalization out : str,filename The output NDF Keyword Arguments ----------------- axes : bool Produce annotated axes? [dyn.] clear : bool Should graphics workstation be cleared? [TRUE] datarange : List[float] Data range [!] device : Name of graphics device [Current graphics device] drawmark : bool Draw a central marker for each bin? [TRUE] drawwidth : bool Draw a width bar for each bin? [TRUE] loop : bool Loop over each row or column of IN1? [FALSE] margin : List[float] Widths of margins around DATA picture [current value] marker : int PGPLOT marker type [current value] minpix : int Minimum number of good pixels in a bin [2] nbin : int Number of bins in the fit [50] niter : int Number of rejection iterations [dyn.] nsigma : float Number of standard deviations to reject data at [dyn.] outcorr : str,filename NDF to hold correlation coeff. for each row/column [!] outoffset : str,filename NDF to hold offset for each row/column [!] outslope : str,filename NDF to hold slope for each row/column [!] pcrange : List[float] Percentage range for auto-scaling [dyn.] style : str Plotting style [current value] title : str A title for the output NDF [!] xleft : float Axis value at left end of horizontal axis [!] xright : float Axis value at right end of horizontal axis [!] ybot : float Axis value at bottom of vertical axis [!] ytop : float Axis value at top of vertical axis [!] zeroff : bool Should the fit offset be forced to zero? [FALSE] Returns ------- corr : float offset : float slope : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NORMALIZE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/normalize", "normalize", in1, in2, out, **kwargs)
[docs]def numb(in_, value, **kwargs): """ Counts the number of elements of an NDF with values or absolute Runs the command: $KAPPA_DIR/numb . Arguments --------- `in_` : str,filename Input image value : float Test value Keyword Arguments ----------------- comp : str Array component to process ["Data"] above : bool Count above threshold? [TRUE] abs : bool Test absolute array values? [FALSE] Returns ------- number : int Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_NUMB for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/numb", "numb", in_, value, **kwargs)
[docs]def oddeven(in_, out, **kwargs): """ Removes odd-even defects from a one-dimensional NDF. Runs the command: $KAPPA_DIR/oddeven . Arguments --------- `in_` : str,filename NDF to be smoothed out : str,filename Smoothed NDF Keyword Arguments ----------------- thresh : float Maximum difference of adjacent array values [!] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ODDEVEN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/oddeven", "oddeven", in_, out, **kwargs)
[docs]def outline(*args, **kwargs): """ Draws an outline of a 2-d NDF. Runs the command: contour clear=n mode=bounds penrot=y . Keyword Arguments ----------------- axes : TRUE if labelled and annotated axes are to be drawn around the outline, showing the current co-ordinate Frame of the supplied NDF. The appearance of the axes can be controlled using the STYLE parameter. [TRUE] device : The plotting device. [current image-display device] labpos : Specifies the position at which to place a label identifying the input NDF within the plot. The label is drawn parallel to the first pixel axis. Two values should be supplied for LABPOS. The first value specifies the distance in millimetres along the first pixel axis from the centre of the bottom left pixel to the left edge of the label. The second value specifies the distance in millimetres along the second pixel axis from the centre of the bottom left pixel to the baseline of the label. If a null (!) value is given, no label is produced. The appearance of the label can be set by using the STYLE parameter (for instance "Size(strings)=2"). [current value] margin : List[] The widths of the margins to leave around the outline for axis annotation. The widths should be given as fractions of the corresponding dimension of the current picture. The actual margins used may be increased to preserve the aspect ratio of the DATA picture. Four values may be given, in the order; bottom, right, top, left. If fewer than four values are given, extra values are used equal to the first supplied value. If these margins are too narrow any axis annotation may be clipped. If a null (!) value is supplied, the value used is 0.15 (for all edges) if annotated axes are being produced, and zero otherwise. See also parameter KEYPOS. [current value] ndf : NDF structure containing the 2-dimensional image to be contoured. style : A group of attribute settings describing the plotting style to use for the contours and annotated axes. A comma-separated list of strings should be given in which each string is either an attribute setting, or the name of a text file preceded by an up-arrow character "^". Such text files should contain further comma-separated lists which will be read and interpreted in the same manner. Attribute settings are applied in the order in which they occur within the list, with later settings over-riding any earlier settings given for the same attribute. Each individual attribute setting should be of the form: <name>=<value> where <name> is the name of a plotting attribute, and <value> is the value to assign to the attribute. Default values will be used for any unspecified attributes. All attributes will be defaulted if a null value (!) is supplied. See section "Plotting Attributes" in SUN/95 for a description of the available attributes. Any unrecognised attributes are ignored (no error is reported). The appearance of the contours is controlled by the attributes Colour(Curves), Width(Curves), etc (the synonym Contours may be used in place of Curves). The contour appearance established in this way may be modified using parameters PENS, PENROT and DASHED. [current value] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_OUTLINE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("contour clear=n mode=bounds penrot=y", "outline", *args, **kwargs)
[docs]def outset(in_, out, centre, diam, **kwargs): """ Mask pixels inside or outside a specified circle in a Runs the command: $KAPPA_DIR/outset . Arguments --------- `in_` : str,filename NDF to be masked out : str,filename Masked NDF centre : str Centre of circular aperture diam : str Diameter of circular aperture Keyword Arguments ----------------- comp : str NDF array component to mask ["Data"] const : str New value for masked pixels ["bad"] inside : bool Mask the inside of the ARD region? [FALSE] title : str Title for output NDF [!] useaxis : str The current Frame axes to be used [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_OUTSET for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/outset", "outset", in_, out, centre, diam, **kwargs)
[docs]def paldef(*args, **kwargs): """ Loads the default palette to a colour table. Runs the command: $KAPPA_DIR/paldef . Keyword Arguments ----------------- device : Image-display device [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PALDEF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/paldef", "paldef", *args, **kwargs)
[docs]def palentry(palnum, colour, **kwargs): """ Enters a colour into an image display's palette. Runs the command: $KAPPA_DIR/palentry . Arguments --------- palnum : int Number of the palette entry to be modified colour : List[str] New palette colour Keyword Arguments ----------------- device : Image-display device [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PALENTRY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/palentry", "palentry", palnum, colour, **kwargs)
[docs]def palread(palette, **kwargs): """ Fills the palette of a colour table from an NDF. Runs the command: $KAPPA_DIR/palread . Arguments --------- palette : str,filename NDF containing the palette of reserved colours Keyword Arguments ----------------- device : Image-display device [Current image-display device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PALREAD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/palread", "palread", palette, **kwargs)
[docs]def palsave(palette, **kwargs): """ Saves the current palette of a colour table to an NDF. Runs the command: $KAPPA_DIR/palsave . Arguments --------- palette : str,filename NDF to save the palette of reserved colours Keyword Arguments ----------------- device : Image-display device [Current image-display device] title : str Title for the palette NDF ["KAPPA - Palsave"] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PALSAVE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/palsave", "palsave", palette, **kwargs)
[docs]def parget(parname, applic, **kwargs): """ Obtains the value or values of an application parameter. Runs the command: $KAPPA_DIR/parget . Arguments --------- parname : str Parameter name applic : str Task name Keyword Arguments ----------------- object : UNIV Object whose value to return vector : bool Display vector as comma-separated list in square brackets? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PARGET for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/parget", "parget", parname, applic, **kwargs)
[docs]def paste(in_, p1, **kwargs): """ Pastes a series of NDFs upon each other. Runs the command: $KAPPA_DIR/paste . Arguments --------- `in_` : str,filename Base NDF structure p1 : str,filename NDF structure to paste Keyword Arguments ----------------- p2 : str,filename NDF structure to paste [!] p3 : str,filename NDF structure to paste [!] p4 : str,filename NDF structure to paste [!] p5 : str,filename NDF structure to paste [!] p6 : str,filename NDF structure to paste [!] p7 : str,filename NDF structure to paste [!] p8 : str,filename NDF structure to paste [!] p9 : str,filename NDF structure to paste [!] p10 : str,filename NDF structure to paste [!] p11 : str,filename NDF structure to paste [!] p12 : str,filename NDF structure to paste [!] p13 : str,filename NDF structure to paste [!] p14 : str,filename NDF structure to paste [!] p15 : str,filename NDF structure to paste [!] p16 : str,filename NDF structure to paste [!] p17 : str,filename NDF structure to paste [!] p18 : str,filename NDF structure to paste [!] p19 : str,filename NDF structure to paste [!] p20 : str,filename NDF structure to paste [!] p21 : str,filename NDF structure to paste [!] p22 : str,filename NDF structure to paste [!] p23 : str,filename NDF structure to paste [!] p24 : str,filename NDF structure to paste [!] p25 : str,filename NDF structure to paste [!] confine : bool Bounds of output NDF confined to principal input NDF? [FALSE] out : str,filename Output NDF structure shift : List[int] Incremental shift of pixel origin between input NDFs [!] title : str Title for output NDF [!] transp : bool Are pasted bad values transparent? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PASTE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/paste", "paste", in_, p1, **kwargs)
[docs]def permaxes(in_, out, perm, **kwargs): """ Permute an NDF's pixel axes. Runs the command: $KAPPA_DIR/permaxes . Arguments --------- `in_` : str,filename Input NDF data structure out : str,filename Output NDF data structure perm : List[int] Input axis for each output axis Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PERMAXES for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/permaxes", "permaxes", in_, out, perm, **kwargs)
[docs]def picbase(*args, **kwargs): """ Selects the BASE picture from the graphics database. Runs the command: piclist picnum=1 . Keyword Arguments ----------------- device : The graphics workstation. [The current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICBASE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("piclist picnum=1", "picbase", *args, **kwargs)
[docs]def piccur(*args, **kwargs): """ Uses a graphics cursor to change the current picture. Runs the command: $KAPPA_DIR/piccur . Keyword Arguments ----------------- device : Name of graphics device [The current graphics device] name : str Name of pictures to be selected [!] single : bool Allow only a single position to be supplied? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICCUR for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/piccur", "piccur", *args, **kwargs)
[docs]def picdata(*args, **kwargs): """ Selects the last DATA picture from the graphics database. Runs the command: piclist name=data picnum=last . Keyword Arguments ----------------- device : The graphics workstation. [The current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICDATA for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("piclist name=data picnum=last", "picdata", *args, **kwargs)
[docs]def picdef(*args, **kwargs): """ Defines a new graphics-database FRAME picture or an array of Runs the command: $KAPPA_DIR/picdef . Keyword Arguments ----------------- mode : str Which option is required ? ["Cursor"] fraction : List[float] Linear fractions of the picture to form the new picture [dyn.] xpic : int Number of pictures per line of the array ypic : int Number of pictures per column of the array aspect : float Aspect ratio of the new picture [!] current : bool Is the current picture to enclose the new picture? [FALSE] device : Name of graphics device [Current graphics device] fill : float Linear filling factor [1.0] labelno : int Label number of the bottom-left picture in the array [1] lbound : List[float] Lower bound outline : bool Mark the new picture with a box? [TRUE] prefix : str Label prefix. Type ! to prevent labelling [!] size : List[float] Dimensions of the new picture in centimetres [!] ubound : List[float] Upper bound Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICDEF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/picdef", "picdef", *args, **kwargs)
[docs]def picempty(*args, **kwargs): """ Finds the first empty FRAME picture in the graphics database. Runs the command: $KAPPA_DIR/picempty . Keyword Arguments ----------------- device : Name of graphics device [The current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICEMPTY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/picempty", "picempty", *args, **kwargs)
[docs]def picentire(*args, **kwargs): """ Finds the first unobscured and unobscuring FRAME picture in the Runs the command: $KAPPA_DIR/picentire . Keyword Arguments ----------------- device : Name of graphics device [The current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICENTIRE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/picentire", "picentire", *args, **kwargs)
[docs]def picframe(*args, **kwargs): """ Selects the last FRAME picture from the graphics database. Runs the command: piclist name=frame picnum=last . Keyword Arguments ----------------- device : The graphics workstation. [The current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICFRAME for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("piclist name=frame picnum=last", "picframe", *args, **kwargs)
[docs]def picgrid(*args, **kwargs): """ Creates an array of FRAME pictures Runs the command: picdef mode=array fraction=1.0 prefix="" . Keyword Arguments ----------------- current : TRUE if the new pictures are to lie within the current picture, otherwise the new pictures can lie anywhere within the BASE picture. In other words, when CURRENT is TRUE the current picture is the reference picture, and when it is FALSE the BASE is the reference picture. [FALSE] device : The graphics device. [Current graphics device] fill : The linear filling factor for the array. In other words the fractional size (applied to both co-ordinates) of the new picture within each of the XPIC * YPIC abutted sections of the picture being sub-divided. Each new picture is located centrally within the section. A filling factor of 1.0 means that the pictures in the array abut. Smaller factors permit a gap between the pictures. For example, FILL = 0.9 would give a gap between the created pictures of 10 per cent of the height and width of each picture, with exterior borders of 5 per cent. FILL must lie between 0.1 and 1.0. [1.0] labelno : The number used to form the label for the first (bottom-left) picture. It cannot be negative. [1] outline : If TRUE, a box that delimits the new picture is drawn. [TRUE] xpic : The number of new pictures to be formed horizontally in the BASE picture. The total number of new pictures is XPIC * YPIC. The value must lie in the range 1--20. The suggested default is 2. ypic : The number of new pictures to be formed vertically in the BASE picture. The total number of new pictures is XPIC * YPIC. The value must lie in the range 1--20. The suggested default is 2. The suggested default is the value of parameter XPIC. Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICGRID for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("picdef mode=array fraction=1.0 prefix=""", "picgrid", *args, **kwargs)
[docs]def picin(*args, **kwargs): """ Finds the attributes of a picture interior to the current picture. Runs the command: $KAPPA_DIR/picin . Keyword Arguments ----------------- name : str Name of interior picture ["DATA"] device : Graphics device [Current graphics device] frame : str Co-ordinate Frame to be displayed [!] current : bool Include current picture in search? [FALSE] describe : bool Is the co-ordinate Frame to be described? [FALSE] epoch : float Epoch of observation report : bool Report results? [TRUE] Returns ------- comment : str domain : str label : str pname : str refnam : str x1 : str x2 : str y1 : str y2 : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICIN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/picin", "picin", *args, **kwargs)
[docs]def piclabel(label, **kwargs): """ Labels the current graphics-database picture. Runs the command: $KAPPA_DIR/piclabel . Arguments --------- label : str Label to be given to the current picture Keyword Arguments ----------------- device : Name of graphics device [Current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICLABEL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/piclabel", "piclabel", label, **kwargs)
[docs]def piclast(*args, **kwargs): """ Selects the last picture from the graphics datalast. Runs the command: piclist picnum=last . Keyword Arguments ----------------- device : The graphics workstation. [The current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICLAST for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("piclist picnum=last", "piclast", *args, **kwargs)
[docs]def piclist(*args, **kwargs): """ Lists the pictures in the graphics database for a device. Runs the command: $KAPPA_DIR/piclist . Keyword Arguments ----------------- name : str Name of pictures to be selected [!] logfile : str,filename File to store list of pictures [!] device : Name of graphics device [The current graphics device] picnum : str Number of new current picture [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICLIST for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/piclist", "piclist", *args, **kwargs)
[docs]def picsel(label, **kwargs): """ Selects a graphics-database picture by its label. Runs the command: $KAPPA_DIR/picsel . Arguments --------- label : str Label of the picture to be selected Keyword Arguments ----------------- device : Name of graphics device [Current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICSEL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/picsel", "picsel", label, **kwargs)
[docs]def pictrans(posin, **kwargs): """ Transforms a graphics position from one picture co-ordinate Frame Runs the command: $KAPPA_DIR/pictrans . Arguments --------- posin : str Position to be transformed Keyword Arguments ----------------- framein : str Input co-ordinate Frame [!] frameout : str Output co-ordinate Frame ["BASEPIC"] device : Name of graphics device [The current graphics device] epochin : float Epoch of input position epochout : float Epoch of output position Returns ------- bound : bool posout : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICTRANS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/pictrans", "pictrans", posin, **kwargs)
[docs]def picvis(*args, **kwargs): """ Finds the first unobscured FRAME picture in the graphics database. Runs the command: $KAPPA_DIR/picvis . Keyword Arguments ----------------- device : Name of graphics device [The current graphics device] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICVIS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/picvis", "picvis", *args, **kwargs)
[docs]def picxy(*args, **kwargs): """ Creates a new FRAME picture defined by co-ordinate bounds Runs the command: picdef mode=xy fraction=1.0 . Keyword Arguments ----------------- current : TRUE if the new pictures are to lie within the current picture, otherwise the new pictures can lie anywhere within the BASE picture. In other words, when CURRENT is TRUE the current picture is the reference picture, and when it is FALSE the base is the reference picture. [FALSE] device : The graphics device. [Current graphics device] lbound : List[] Co-ordinates of the lower bound that defines the new picture. The suggested default is the bottom-left of the current picture. outline : If TRUE, a box that delimits the new picture is drawn. [TRUE] ubound : List[] Co-ordinates of the upper bound that defines the new picture. The suggested default is the top-right of the current picture. Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PICXY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("picdef mode=xy fraction=1.0", "picxy", *args, **kwargs)
[docs]def pixdupe(in_, out, expand, **kwargs): """ Expands an NDF by pixel duplication. Runs the command: $KAPPA_DIR/pixdupe . Arguments --------- `in_` : str,filename NDF to be expanded out : str,filename NDF after being expanded expand : List[int] Expansion factors Keyword Arguments ----------------- imask : List[int] Indices of good pixel in mask [!] mask : str,filename Mask NDF [!] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PIXDUPE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/pixdupe", "pixdupe", in_, out, expand, **kwargs)
[docs]def pluck(in_, axes, out, **kwargs): """ Plucks slices from an NDF at arbitrary positions. Runs the command: $KAPPA_DIR/pluck . Arguments --------- `in_` : str,filename Input NDF axes : List[str] Indices of WCS axes to be retained in the output NDF [!] out : str,filename Output NDF Keyword Arguments ----------------- method : str Re-sampling method [current value] mode : str Mode used to obtain positions of slices [current value] coin : str,filename Text file containing initial positions container : bool Store the NDF slices in a single HDS container file? [FALSE] describe : bool Is the co-ordinate Frame to be described? [current value] incat : str,filename Catalogue containing fixed co-ordinates params : List[float] Auxiliary resampling parameters pos : List[str] Position of slice title : str Title for output NDF [!] tol : float Tolerance for linear transformation approximation [0.05] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PLUCK for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/pluck", "pluck", in_, axes, out, **kwargs)
[docs]def profile(in_, out, start, finish, **kwargs): """ Creates a 1-dimensional profile through an N-dimensional NDF. Runs the command: $KAPPA_DIR/profile . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF start : str Position at the start of the profile finish : str Position at the end of the profile Keyword Arguments ----------------- nsamp : int Number of samples required along the profile [!] catepoch : float Output catalogue epoch catframe : str Output catalogue co-ordinate Frame [!] geodesic : bool Use geodesic curves for the profile? [FALSE] incat : str,filename Positions list holding co-ordinates defining the profile mode : str Method to use to determine the sample positions ["Curve"] outcat : str Output positions list to hold sample positions [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PROFILE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/profile", "profile", in_, out, start, finish, **kwargs)
[docs]def provadd(ndf, parent, **kwargs): """ Stores provenance information in an NDF. Runs the command: $KAPPA_DIR/provadd . Arguments --------- ndf : str,filename NDF to be modified parent : str,filename Parent NDF Keyword Arguments ----------------- creator : str Name of software that created the modified NDF [!] isroot : bool Ignore any provenance within the parent NDF? [FALSE] moretext : str Group of keyword=value strings giving extra information about the parent [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PROVADD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/provadd", "provadd", ndf, parent, **kwargs)
[docs]def provmod(ndf, **kwargs): """ Modifies provenance information for an NDF. Runs the command: $KAPPA_DIR/provmod . Arguments --------- ndf : str,filename NDF to be modified Keyword Arguments ----------------- ancestor : str The indices of the ancestors to be modified ["ALL"] path : str Substitutions for the PATH field [!] creator : str Substitutions for the CREATOR field [!] date : str Substitutions for the DATE field [!] moretext : str Group of keyword=value strings giving extra information about the ancestor [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PROVMOD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/provmod", "provmod", ndf, **kwargs)
[docs]def provrem(ndf, pattern, **kwargs): """ Removes selected provenance information from an NDF. Runs the command: $KAPPA_DIR/provrem . Arguments --------- ndf : str,filename NDF to be modified pattern : str Pattern matching template Keyword Arguments ----------------- item : str Item of provenance information to check ["PATH"] ancestor : str The indices of the ancestors to be removed [!] hide : bool Hide the ancestors rather than deleting them? [FALSE] remove : bool Remove the specified ancestors? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PROVREM for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/provrem", "provrem", ndf, pattern, **kwargs)
[docs]def provshow(ndf, **kwargs): """ Displays provenance information for an NDF. Runs the command: $KAPPA_DIR/provshow . Arguments --------- ndf : str,filename The input NDF Keyword Arguments ----------------- show : str The ancestors to be displayed ["All"] dotfile : str,filename Filename in which to store graph in dot format [!] hide : bool Exclude any hidden ancestors? [dyn.] history : bool Show history for each ancestor NDF? [FALSE] inext : str Integer identifier for parent to display, or UP parents : str,filename Filename in which to store direct parents [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PROVSHOW for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/provshow", "provshow", ndf, **kwargs)
[docs]def psf(in_, incat, **kwargs): """ Determines the parameters of a model star profile by fitting star Runs the command: $KAPPA_DIR/psf . Arguments --------- `in_` : str,filename NDF containing star images incat : str,filename Positions list containing star positions Keyword Arguments ----------------- device : Name of graphics device [current graphics device] out : str,filename NDF to contain the PSF [!] cut : float Output PSF threshold [!] range : float Number of star-profile widths for profile fitting [4.0] isize : int Side length of square for forming marginal profiles [15] poscols : int Star co-ordinate columns [!] axes : bool Produce annotated axes? [dyn.] clear : bool Is the current picture to be cleared before plotting? [TRUE] cofile : str,filename File of x-y positions gauss : bool Fit a two-dimensional Gaussian? [FALSE] logfile : str,filename Log file for results [!] margin : List[float] Widths of margins around DATA picture [current value] marker : int PGPLOT marker type [current value] minor : bool Plot profile along minor axis? [TRUE] norm : bool Should the PSF be normalized to a peak value of unity? [TRUE] profout : str,filename NDF to contain the fitted profile [!] style : str Plotting style [current value] title : str Title for output NDF ["KAPPA - PSF"] useaxis : str The current Frame axes to be used [!] xleft : float Axis value at left end of horizontal axis [!] xright : float Axis value at right end of horizontal axis [!] ybot : float Axis value at bottom of vertical axis [!] ytop : float Axis value at top of vertical axis [!] Returns ------- amp1 : float Object to contain the amplitude of the first star axisr : float Object to contain the axis ratio of the star images centre : str Object to contain the first PSF position fwhm : float Object to contain the FWHM of the star images gamma : float Object to contain the fall-off parameter of the star images orient : float Object to contain the orientation of the star images total : float Object to contain the total flux of the fitted profile xcen : str Object to contain the first star x position ycen : str Object to contain the first star y position Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_PSF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/psf", "psf", in_, incat, **kwargs)
[docs]def qualtobad(in_, out, **kwargs): """ Sets selected NDF pixels bad on the basis of Quality. Runs the command: $KAPPA_DIR/qualtobad . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF Keyword Arguments ----------------- qexp : str Quality expression [ANY] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_QUALTOBAD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/qualtobad", "qualtobad", in_, out, **kwargs)
[docs]def regionmask(in_, region, out, **kwargs): """ Applies a mask to a region of an NDF. Runs the command: $KAPPA_DIR/regionmask . Arguments --------- `in_` : str,filename NDF to be masked region : str,filename Text file holding Region out : str,filename Masked NDF Keyword Arguments ----------------- const : str New value for masked pixels ["Bad"] inside : bool Mask the inside of the region? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_REGIONMASK for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/regionmask", "regionmask", in_, region, out, **kwargs)
[docs]def regrid(in_, out, **kwargs): """ Applies a geometrical transformation to an NDF. Runs the command: $KAPPA_DIR/regrid . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF Keyword Arguments ----------------- method : str Re-sampling method [current value] axes : List[int] The pixel axes to be regridded [!] conserve : bool Conserve flux? [dyn.] lbound : List[int] Lower bounds of the output NDF [!] mapping : str,filename A file containing the Mapping, or null [!] norm : bool Normalise output values? [TRUE] params : List[float] Auxiliary resampling parameters rebin : bool Create output pixel values by rebinning input pixels? [current value] scale : List[float] Additional scaling factors [!] title : str Output NDF title [!] tol : float Tolerance for linear transformation approximation [0.05] ubound : List[int] Upper bounds of the output NDF [!] wlim : float Minimum weight for valid output pixels [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_REGRID for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/regrid", "regrid", in_, out, **kwargs)
[docs]def remqual(ndf, qnames, **kwargs): """ Remove specified quality definitions from an NDF. Runs the command: $KAPPA_DIR/remqual . Arguments --------- ndf : str,filename NDFs from which to remove quality information qnames : str Quality names to be removed Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_REMQUAL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/remqual", "remqual", ndf, qnames, **kwargs)
[docs]def reshape(in_, out, shape, **kwargs): """ Reshapes an NDF, treating its arrays as vectors. Runs the command: $KAPPA_DIR/reshape . Arguments --------- `in_` : str,filename NDF to be reshaped out : str,filename Reshaped NDF shape : List[int] Shape of the output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] vectorize : bool Vectorize the arrays? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_RESHAPE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/reshape", "reshape", in_, out, shape, **kwargs)
[docs]def rift(in_, scalar, out, section, **kwargs): """ Adds a scalar to a section of an NDF data structure to correct Runs the command: $KAPPA_DIR/rift . Arguments --------- `in_` : str,filename Input NDF data structure scalar : float Value to be added out : str,filename Output NDF section : str Section to which to add a constant Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_RIFT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/rift", "rift", in_, scalar, out, section, **kwargs)
[docs]def rotate(in_, out, angle, **kwargs): """ Rotates a two-dimensional NDF about its centre through any angle. Runs the command: $KAPPA_DIR/rotate . Arguments --------- `in_` : str,filename NDF to be rotated out : str,filename Rotated NDF angle : float Number of degrees clockwise rotation, or null Keyword Arguments ----------------- axes : List[int] Indices of pixel axes spanning the rotation plane [dyn.] nnmeth : bool Do you want to use the nearest-neighbour method? [FALSE] quality : bool Propagate QUALITY (using nearest-neighbour method)? [FALSE] title : str Title for output NDF [!] useaxis : str The axes defining north and east [!] variance : bool Use variance in the weighting? [!] Returns ------- angleused : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ROTATE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/rotate", "rotate", in_, out, angle, **kwargs)
[docs]def scatter(in1, in2, **kwargs): """ Displays a scatter plot between data in two NDFs. Runs the command: $KAPPA_DIR/scatter . Arguments --------- in1 : str,filename NDF for horizontal axis in2 : str,filename NDF for vertical axis Keyword Arguments ----------------- comp1 : str Component to display on horizontal axis ["Data"] comp2 : str Component to display on vertical axis ["Data"] device : Name of graphics device [Current graphics device] axes : bool Produce annotated axes? [dyn.] clear : bool Should graphics workstation be cleared? [TRUE] compress : List[int] Compression factors [1] margin : List[float] Widths of margins around DATA picture [current value] marker : int PGPLOT marker type [current value] perc1 : List[float] Percentile range for horizontal axis [current value] perc2 : List[float] Percentile range for vertical axis [current value] style : str Plotting style [current value] xleft : float Axis value at left end of horizontal axis [!] xright : float Axis value at right end of horizontal axis [!] ybot : float Axis value at bottom of vertical axis [!] ytop : float Axis value at top of vertical axis [!] Returns ------- corr : float npix : int Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SCATTER for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/scatter", "scatter", in1, in2, **kwargs)
[docs]def segment(in1, in2, out, **kwargs): """ Copies polygonal segments from one NDF into another. Runs the command: $KAPPA_DIR/segment . Arguments --------- in1 : str,filename NDF holding data to be put inside the polygon in2 : str,filename NDF holding data to be put outside the polygon [!] out : str,filename Output NDF Keyword Arguments ----------------- coords : str Co-ordinates of next polygon vertex device : Name of graphics device [Current graphics device] incat1 : str,filename Catalogue holding co-ordinates defining polygon 1 incat10 : str,filename Catalogue holding co-ordinates defining polygon 10 incat11 : str,filename Catalogue holding co-ordinates defining polygon 11 incat12 : str,filename Catalogue holding co-ordinates defining polygon 12 incat13 : str,filename Catalogue holding co-ordinates defining polygon 13 incat14 : str,filename Catalogue holding co-ordinates defining polygon 14 incat15 : str,filename Catalogue holding co-ordinates defining polygon 15 incat16 : str,filename Catalogue holding co-ordinates defining polygon 16 incat17 : str,filename Catalogue holding co-ordinates defining polygon 17 incat18 : str,filename Catalogue holding co-ordinates defining polygon 18 incat19 : str,filename Catalogue holding co-ordinates defining polygon 19 incat2 : str,filename Catalogue holding co-ordinates defining polygon 2 incat20 : str,filename Catalogue holding co-ordinates defining polygon 20 incat3 : str,filename Catalogue holding co-ordinates defining polygon 3 incat4 : str,filename Catalogue holding co-ordinates defining polygon 4 incat5 : str,filename Catalogue holding co-ordinates defining polygon 5 incat6 : str,filename Catalogue holding co-ordinates defining polygon 6 incat7 : str,filename Catalogue holding co-ordinates defining polygon 7 incat8 : str,filename Catalogue holding co-ordinates defining polygon 8 incat9 : str,filename Catalogue holding co-ordinates defining polygon 9 logfile : str,filename File to store co-ordinates of polygon vertices [!] marker : int The PGPLOT type for vertex markers [current value] maxpoly : int Maximum number of polygons [!] minpoly : int Minimum number of polygons [1] mode : str Mode used to obtain polygon vertices [current value] plot : str What sort of graphics should be used? [current value] poly1 : str,filename File holding co-ordinates defining polygon 1 poly10 : str,filename File holding co-ordinates defining polygon 10 poly11 : str,filename File holding co-ordinates defining polygon 11 poly12 : str,filename File holding co-ordinates defining polygon 12 poly13 : str,filename File holding co-ordinates defining polygon 13 poly14 : str,filename File holding co-ordinates defining polygon 14 poly15 : str,filename File holding co-ordinates defining polygon 15 poly16 : str,filename File holding co-ordinates defining polygon 16 poly17 : str,filename File holding co-ordinates defining polygon 17 poly18 : str,filename File holding co-ordinates defining polygon 18 poly19 : str,filename File holding co-ordinates defining polygon 19 poly2 : str,filename File holding co-ordinates defining polygon 2 poly20 : str,filename File holding co-ordinates defining polygon 20 poly3 : str,filename File holding co-ordinates defining polygon 3 poly4 : str,filename File holding co-ordinates defining polygon 4 poly5 : str,filename File holding co-ordinates defining polygon 5 poly6 : str,filename File holding co-ordinates defining polygon 6 poly7 : str,filename File holding co-ordinates defining polygon 7 poly8 : str,filename File holding co-ordinates defining polygon 8 poly9 : str,filename File holding co-ordinates defining polygon 9 quality : bool Should quality values be copied to the output NDF? [TRUE] style : str Style for graphics [current value] useaxis : str Two axes to span the plane of the supplied polygons [!] variance : bool Should variance values be copied to the output NDF? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SEGMENT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/segment", "segment", in1, in2, out, **kwargs)
[docs]def setaxis(ndf, dim, mode, **kwargs): """ Sets values for an axis array component within an NDF data Runs the command: $KAPPA_DIR/setaxis . Arguments --------- ndf : str,filename Data structure dim : int Dimension of axis to modify mode : str Type of modification Keyword Arguments ----------------- comp : str Axis array component to modify ["Data"] exprs : str Expression file : str,filename Text file containing replacement axis values index : int Pixel index of the element like : str,filename NDF containing axis structures to copy [!] newval : str New value for the array element type : str Data type of the modified array component [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETAXIS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setaxis", "setaxis", ndf, dim, mode, **kwargs)
[docs]def setbad(ndf, **kwargs): """ Sets new bad-pixel flag values for an NDF. Runs the command: $KAPPA_DIR/setbad . Arguments --------- ndf : str,filename Data structure Keyword Arguments ----------------- value : bool New bad-pixel flag value [!] data : bool Process the data array? [TRUE] modify : bool Modify the NDF? [TRUE] variance : bool Process the variance array? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETBAD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setbad", "setbad", ndf, **kwargs)
[docs]def setbb(ndf, bb, **kwargs): """ Sets a new value for the quality bad-bits mask of an NDF. Runs the command: $KAPPA_DIR/setbb . Arguments --------- ndf : str,filename Data structure to modify bb : str New bad-bits mask value Keyword Arguments ----------------- `and_` : bool Perform bit-wise AND with existing mask value? [FALSE] `or_` : bool Perform bit-wise OR with existing mask value? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETBB for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setbb", "setbb", ndf, bb, **kwargs)
[docs]def setbound(ndf, **kwargs): """ Sets new bounds for an NDF. Runs the command: $KAPPA_DIR/setbound . Arguments --------- ndf : str,filename Data structure to be modified Keyword Arguments ----------------- like : str,filename Template NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETBOUND for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setbound", "setbound", ndf, **kwargs)
[docs]def setext(ndf, xname, option, cname, **kwargs): """ Manipulates the contents of a specified NDF extension. Runs the command: $KAPPA_DIR/setext . Arguments --------- ndf : str,filename NDF containing extension xname : str Extension name [FITS] option : str Option to modify or examine the extension cname : str Component name Keyword Arguments ----------------- ctype : str Component type cvalue : str Component value loop : bool Run in looping mode? [TRUE] newname : str New component name ok : bool Do you still wish to proceed ? (Y/N) [FALSE] shape : List[int] Shape of the component [1] xtype : str Extension type [EXT] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETEXT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setext", "setext", ndf, xname, option, cname, **kwargs)
[docs]def setlabel(ndf, label, **kwargs): """ Sets a new label for an NDF data structure. Runs the command: $KAPPA_DIR/setlabel . Arguments --------- ndf : str,filename Data structure label : str New NDF label Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETLABEL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setlabel", "setlabel", ndf, label, **kwargs)
[docs]def setmagic(in_, out, repval, **kwargs): """ Replaces all occurrences of a given value in an NDF array with Runs the command: $KAPPA_DIR/setmagic . Arguments --------- `in_` : str,filename NDF in which values are to be flagged bad out : str,filename NDF containing flagged values repval : float The value to be replaced by the bad flag Keyword Arguments ----------------- comp : str Component(s) to process ["Data"] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETMAGIC for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setmagic", "setmagic", in_, out, repval, **kwargs)
[docs]def setnorm(ndf, dim, **kwargs): """ Sets a new value for one or all of an NDF's axis-normalisation Runs the command: $KAPPA_DIR/setnorm . Arguments --------- ndf : str,filename Data structure dim : int Dimension of axis to modify Keyword Arguments ----------------- anorm : bool New normalisation flag Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETNORM for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setnorm", "setnorm", ndf, dim, **kwargs)
[docs]def setorigin(ndf, origin, **kwargs): """ Sets a new pixel origin for an NDF. Runs the command: $KAPPA_DIR/setorigin . Arguments --------- ndf : str,filename Data structure origin : List[int] New pixel origin value(s) Keyword Arguments ----------------- like : str,filename Template NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETORIGIN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setorigin", "setorigin", ndf, origin, **kwargs)
[docs]def setqual(ndf, qname, comment, mask, **kwargs): """ Assign a specified quality to selected pixels within an NDF. Runs the command: $KAPPA_DIR/setqual . Arguments --------- ndf : str,filename NDF in which to store quality information qname : str Quality name comment : str A short description of the assigned quality mask : str,filename NDF which defines the selected pixels Keyword Arguments ----------------- ardfile : str,filename ARD file [ardfile.dat] function : str Function to be performed by SETQUAL ["HS"] like : str,filename NDF from which quality information should be copied [!] list : str A list of pixel indices qvalue : int Quality value (0-255) [!] readonly : bool Flag that the quality name cannot be removed? [FALSE] select : str How do you want to identified select pixels? ["Mask"] xname : str NDF extension name [QUALITY_NAMES] xtype : str NDF extension type [dyn.] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETQUAL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setqual", "setqual", ndf, qname, comment, mask, **kwargs)
[docs]def setsky(ndf, positions, coords, epoch, **kwargs): """ Stores new WCS information within an NDF. Runs the command: $KAPPA_DIR/setsky . Arguments --------- ndf : str,filename NDF to have astrometry information appended positions : str A group of corresponding sky and image co-ordinates coords : str Sky co-ordinate system epoch : float Epoch of the data [1994.0D0] Keyword Arguments ----------------- projtype : str Projection type [!] lon : str Longitude of the reference point [!] lat : str Latitude of the reference point [!] refcode : str Location of the reference point [!] pixelsize : List[str] Size of the pixels at the reference point [!] orient : str Orientation of the image y-axis from north measured via east [!] tilt : str Tilt of the celestial sphere prior to projection ["0.0"] logfile : str The name of a log file [!] iras90 : bool Create an IRAS90 astrometry structure? [!] pixelref : List[str] Pixel co-ordinates of the reference position [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETSKY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setsky", "setsky", ndf, positions, coords, epoch, **kwargs)
[docs]def settitle(ndf, title, **kwargs): """ Sets a new title for an NDF data structure. Runs the command: $KAPPA_DIR/settitle . Arguments --------- ndf : str,filename Data structure title : str New NDF title Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETTITLE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/settitle", "settitle", ndf, title, **kwargs)
[docs]def settype(ndf, type, **kwargs): """ Sets a new numeric type for the data and variance components of Runs the command: $KAPPA_DIR/settype . Arguments --------- ndf : str,filename Data structure type : str New numeric type Keyword Arguments ----------------- complex : bool NDF to hold complex values? [!] data : bool Set a new type for the data component? [TRUE] variance : bool Set a new type for the VARIANCE component? [TRUE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETTYPE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/settype", "settype", ndf, type, **kwargs)
[docs]def setunits(ndf, units, **kwargs): """ Sets a new units value for an NDF data structure. Runs the command: $KAPPA_DIR/setunits . Arguments --------- ndf : str,filename Data structure units : str New NDF units Keyword Arguments ----------------- modify : bool Modify the pixel values? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETUNITS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setunits", "setunits", ndf, units, **kwargs)
[docs]def setvar(ndf, variance, **kwargs): """ Set new values for the VARIANCE component of an NDF data Runs the command: $KAPPA_DIR/setvar . Arguments --------- ndf : str,filename Data structure variance : str Variance expression [DATA] Keyword Arguments ----------------- comp : str Array component containing variance values ["Data"] `from_` : str,filename NDF containing existing variance values [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SETVAR for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/setvar", "setvar", ndf, variance, **kwargs)
[docs]def shadow(in_, out, **kwargs): """ Enhances edges in a 2-dimensional NDF using a shadow effect. Runs the command: $KAPPA_DIR/shadow . Arguments --------- `in_` : str,filename NDF to be enhanced out : str,filename NDF after being enhanced Keyword Arguments ----------------- shift : List[int] Shift in x-y indices [1,1] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SHADOW for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/shadow", "shadow", in_, out, **kwargs)
[docs]def showqual(ndf, **kwargs): """ Displays the quality names defined in an NDF. Runs the command: $KAPPA_DIR/showqual . Arguments --------- ndf : str,filename The input NDF Keyword Arguments ----------------- count : bool Is a count of pixels holding each quality required? [NO] Returns ------- qnames : List[str] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SHOWQUAL for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/showqual", "showqual", ndf, **kwargs)
[docs]def slide(in_, out, abs, **kwargs): """ Realigns an NDF using a translation. Runs the command: $KAPPA_DIR/slide . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF abs : List[float] Absolute translation vector Keyword Arguments ----------------- method : str Interpolation method [current value] fid : List[float] Co-ordinates of fiducial point obj : float Co-ordinates of standard object params : List[float] Auxiliary resampling parameters stype : str Shift type ["Absolute"] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SLIDE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/slide", "slide", in_, out, abs, **kwargs)
[docs]def sqorst(in_, out, factors, **kwargs): """ Squashes or stretches an NDF. Runs the command: $KAPPA_DIR/sqorst . Arguments --------- `in_` : str,filename Input NDF out : str,filename Output NDF factors : List[float] Expansion factors for each axis Keyword Arguments ----------------- axis : int Index of axis to squash or stretch [!] conserve : bool Conserve flux whilst resampling? [FALSE] lbound : List[int] Lower pixel index bounds for output NDF [!] method : str Re-sampling method ["Auto"] mode : str Method of specifying output NDF shape ["Factors"] params : List[float] Auxiliary resampling parameters pixscale : str Pixel scale for each WCS axis title : str Title for output NDF [!] ubound : List[int] Upper pixel index bounds for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SQORST for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/sqorst", "sqorst", in_, out, factors, **kwargs)
[docs]def stats(ndf, **kwargs): """ Computes simple statistics for an NDF's pixels. Runs the command: $KAPPA_DIR/stats . Arguments --------- ndf : str,filename Data structure to analyse Keyword Arguments ----------------- comp : str NDF array component to analyse ["Data"] clip : List[float] Clipping levels [!] logfile : str,filename File for logging results [!] order : bool Report order statistics? [FALSE] percentiles : List[float] List of percentiles [!] Returns ------- kurtosis : float maxcoord : List[float] maximum : float maxpos : List[int] maxwcs : str mean : float median : float mincoord : List[float] minimum : float minpos : List[int] minwcs : str numbad : int numgood : int numpix : int perval : List[float] sigma : float skewness : float total : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_STATS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/stats", "stats", ndf, **kwargs)
[docs]def sub(in1, in2, out, **kwargs): """ Subtracts one NDF data structure from another. Runs the command: $KAPPA_DIR/sub . Arguments --------- in1 : str,filename First input NDF in2 : str,filename Second input NDF out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SUB for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/sub", "sub", in1, in2, out, **kwargs)
[docs]def substitute(in_, out, oldval, newval, **kwargs): """ Replaces all occurrences of a given value in an NDF array with Runs the command: $KAPPA_DIR/substitute . Arguments --------- `in_` : str,filename NDF in which values are to be substituted out : str,filename NDF containing substituted values oldval : float The value to be replaced newval : float New value to substitute Keyword Arguments ----------------- comp : str Component(s) to process ["Data"] title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SUBSTITUTE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/substitute", "substitute", in_, out, oldval, newval, **kwargs)
[docs]def surfit(in_, out, **kwargs): """ Fits a polynomial or bi-cubic spline surface to two-dimensional Runs the command: $KAPPA_DIR/surfit . Arguments --------- `in_` : str,filename Image to be fitted out : str,filename Fitted image Keyword Arguments ----------------- auto : bool Automatic evaluation? [TRUE] bindim : List[int] Dimensions of the bins used to estimate the local background [!] clip : List[float] Clipping standard deviations during binning [2,3] estimator : str Estimator for the binning [!] evaluate : str Method of evaluation of the fitted output array [INTERPOLATE] fitclip : List[float] Clipping rms errors for the fitted bins [!] fittype : str Fitting method [SPLINE] genvar : bool Generate output variances from fitting errors? [FALSE] knots : List[int] Number of interior knots (1-11) [4] logfile : str,filename Filename to store fitting results [!] order : List[int] Orders of the polynomials along each direction [3] thrhi : float Upper threshold cutoff before binning [!] thrlo : float Lower threshold cutoff before binning [!] title : str Title for surface fit [!] wlim : float Fraction of good pixels for bin to be included [!] Returns ------- rms : float Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_SURFIT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/surfit", "surfit", in_, out, **kwargs)
[docs]def thresh(in_, out, thrlo, thrhi, newlo, newhi, **kwargs): """ Edits an NDF to replace values between or outside given limits Runs the command: $KAPPA_DIR/thresh . Arguments --------- `in_` : str,filename NDF to have thresholds applied out : str,filename NDF to hold data after application of thresholds thrlo : float Lower threshold cutoff thrhi : float Higher threshold cutoff newlo : str New value for pixels below lower threshold newhi : str New value for pixels above upper threshold Keyword Arguments ----------------- comp : str Array component to process ["Data"] title : str Title for output NDF [!] Returns ------- numhi : int numlo : int numrange : int numsame : int Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_THRESH for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/thresh", "thresh", in_, out, thrlo, thrhi, newlo, newhi, **kwargs)
[docs]def trandat(freename, ndf, **kwargs): """ Converts free-format text data into an NDF. Runs the command: $KAPPA_DIR/trandat . Arguments --------- freename : str,filename Free-format data file ndf : str,filename Output NDF Keyword Arguments ----------------- poscols : List[int] Co-ordinate columns [1,2] valcol : int Data value column [3] pscale : List[float] Pixel-to-pixel distances [!] dtype : str Type of the data values ['_REAL'] title : str Title for output NDF ["KAPPA - Trandat"] auto : bool Automatic calculation of co-ordinates? [FALSE] bad : bool Initialise array with bad pixels? [TRUE] lbound : List[int] Pixel lower bounds of the output NDF [!] poffset : List[float] Data co-ordinates at pixel co-ordinates origin [!] quantum : int Work array increment [2048] shape : List[int] Shape of the output NDF Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_TRANDAT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/trandat", "trandat", freename, ndf, **kwargs)
[docs]def trig(in_, trigfunc, out, **kwargs): """ Performs a trigonometric transformation on a NDF. Runs the command: $KAPPA_DIR/trig . Arguments --------- `in_` : str,filename Input NDF data structure trigfunc : str Trig function out : str,filename Output NDF Keyword Arguments ----------------- title : str Title for output NDF [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_TRIG for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/trig", "trig", in_, trigfunc, out, **kwargs)
[docs]def vecplot(ndf1, ndf2, **kwargs): """ Plots a two-dimensional vector map. Runs the command: $KAPPA_DIR/vecplot . Arguments --------- ndf1 : str,filename NDF giving vector magnitudes ndf2 : str,filename NDF giving vector orientations Keyword Arguments ----------------- comp : str Component to plot vector magnitudes ["Data"] step : int Increment in pixels between adjacent vectors [!] vscale : float Data value for a 1-centimetre vector [!] arrow : float Fractional size of arrow heads [current value] just : str Vector justification ["Centre"] device : Name of graphics device [Current graphics device] angrot : float Angle by which to rotate the vectors (in degrees) [0.0] axes : bool Are annotated axes to be drawn? [TRUE] clear : bool Is the current picture to be cleared before plotting? [TRUE] fill : bool Fill the plotting area? [FALSE] key : bool Do you want a key showing the vector scale? [TRUE] keypos : List[float] Horizontal and vertical position of key [current value] keystyle : str Plotting style for the key [current value] keyvec : float Key vector magnitude [!] margin : List[float] Widths of margins around DATA picture [current value] style : str Plotting style for the annotated axes and vectors [current value] useaxis : str The axes to be annotated [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_VECPLOT for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/vecplot", "vecplot", ndf1, ndf2, **kwargs)
[docs]def wcsadd(ndf, **kwargs): """ Creates a Mapping and optionally adds a new co-ordinate Frame into Runs the command: $KAPPA_DIR/wcsadd . Arguments --------- ndf : str,filename The NDF in which to store the new Frame, or null Keyword Arguments ----------------- frame : str An existing co-ordinate Frame [!] domain : str The Domain name for the new Frame maptype : str Type of mapping to use ["LINEAR"] attrs : str Attributes for new Frame [!] centre : List[float] Centre (X,Y) co-ordinates for distortion [0,0] diag : List[float] Diagonal matrix coefficients disco : float Pincusion distortion coefficient epoch : float Epoch of observation forexp : str Forward transformation expressions frmtype : str Type of co-ordinate frame to add [!] invexp : str Inverse transformatijon expressions mapin : str File containing AST Mapping mapout : str File to contain output AST Mapping [!] naxes : int Number of input and output axes refndf : str,filename An NDF from which to copy the required Frame retain : bool Retain the original current Frame in the modified NDF? [FALSE] shift : List[float] Translation coefficients simpfi : bool Simplify forward plus inverse to unit mapping? [TRUE] simpif : bool Simplify inverse plus forward to unit mapping? [TRUE] tr : List[float] Co-efficients of a linear transformation [!] transfer : bool Transfer set attributes from basis Frame to new Frame? [dyn.] zoom : float Scaling factor Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSADD for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcsadd", "wcsadd", ndf, **kwargs)
[docs]def wcsalign(in_, out, lbnd, ubnd, **kwargs): """ Aligns a group of NDFs using World Co-ordinate System information. Runs the command: $KAPPA_DIR/wcsalign . Arguments --------- `in_` : str,filename The input images out : str,filename Output images lbnd : List[int] Lower pixel index bounds for output images ubnd : List[int] Upper pixel index bounds for output images Keyword Arguments ----------------- ref : str,filename The reference image [!] abort : bool Abort after first failure? [FALSE] acc : float Positional accuracy in pixels [0.05] alignref : bool Align using the WCS attributes of the reference? [FALSE] conserve : bool Conserve flux? [dyn.] insitu : bool Modify input NDFs in-situ? [FALSE] maxpix : int Scale size for mappings (in pixels) [1000] method : str Interpolation method [current value] params : List[float] Interpolation parameters [dyn.] rebin : bool Create output pixel values by rebinning input pixels? [current value] refcat : str,filename Positions list defining required WCS [!] wlim : float Minimum weight for valid output pixels [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSALIGN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcsalign", "wcsalign", in_, out, lbnd, ubnd, **kwargs)
[docs]def wcsattrib(ndf, **kwargs): """ Manages attribute values associated with the WCS component of an Runs the command: $KAPPA_DIR/wcsattrib . Arguments --------- ndf : str,filename The NDF to be read or modified Keyword Arguments ----------------- mode : str Operation to perform [GET] name : str Attribute name newval : str Attribute value remap : bool Modify mappings to accommodate new attribute value? [TRUE] setting : str List of attribute settings Returns ------- state : bool value : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSATTRIB for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcsattrib", "wcsattrib", ndf, **kwargs)
[docs]def wcscopy(ndf, like, **kwargs): """ Copies WCS information from one NDF to another. Runs the command: $KAPPA_DIR/wcscopy . Arguments --------- ndf : str,filename The NDF to be modified like : str,filename An NDF containing WCS information Keyword Arguments ----------------- tr : List[float] Co-efficients of a linear transformation [!] confirm : bool Should replacement of any existing WCS component be confirmed? [TRUE] ok : bool Replace the existing WCS component? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSCOPY for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcscopy", "wcscopy", ndf, like, **kwargs)
[docs]def wcsframe(ndf, **kwargs): """ Change the current co-ordinate Frame in the WCS component of an NDF. Runs the command: $KAPPA_DIR/wcsframe . Arguments --------- ndf : str,filename The NDF to be modified Keyword Arguments ----------------- frame : str Required co-ordinate Frame [!] epoch : float Epoch of observation Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSFRAME for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcsframe", "wcsframe", ndf, **kwargs)
[docs]def wcsmosaic(in_, out, **kwargs): """ Tiles a group of NDFs using World Co-ordinate System information. Runs the command: $KAPPA_DIR/wcsmosaic . Arguments --------- `in_` : str,filename The input images out : str,filename Output image Keyword Arguments ----------------- lbnd : List[int] Lower pixel index bounds for output image [!] ubnd : List[int] Upper pixel index bounds for output image [!] ref : str,filename The reference image [!] acc : float Positional accuracy in pixels [0.05] alignref : bool Align using the WCS attributes of the reference? [FALSE] conserve : bool Conserve flux whilst rebinning? [TRUE] genvar : bool Generate output variances from input spread? [FALSE] maxpix : int Scale size for mappings (in pixels) [1000] method : str Interpolation method [current value] norm : bool Normalise output values? [TRUE] params : List[float] Interpolation parameters [dyn.] variance : bool Use input variances to weight data? [FALSE] weights : str Weights for each NDF [!] wlim : float Minimum weight for valid output pixels [1.0E-10] Returns ------- flbnd : List[float] fubnd : List[float] lbound : List[int] ubound : List[int] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSMOSAIC for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcsmosaic", "wcsmosaic", in_, out, **kwargs)
[docs]def wcsremove(ndf, frames, **kwargs): """ Remove co-ordinate Frames from the WCS component of an NDF. Runs the command: $KAPPA_DIR/wcsremove . Arguments --------- ndf : str,filename The NDF to be modified frames : List[str] The indices of the Frames to be removed Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSREMOVE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcsremove", "wcsremove", ndf, frames, **kwargs)
[docs]def wcsshow(ndf, object, **kwargs): """ Examines the internal structure of an AST Object. Runs the command: $KAPPA_DIR/wcsshow . Arguments --------- ndf : str,filename Data structure object : HDS object Keyword Arguments ----------------- logfile : str Log file [!] newwcs : str Group expression giving new WCS FrameSet [!] full : int Level of detail in output (-1,0,+1) [current value] quiet : bool Run without displaying Object structure? [!] cat : str,filename Catalogue or positions list [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSSHOW for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcsshow", "wcsshow", ndf, object, **kwargs)
[docs]def wcsslide(ndf, abs, **kwargs): """ Applies a translational correction to the WCS in an NDF. Runs the command: $KAPPA_DIR/wcsslide . Arguments --------- ndf : str,filename NDF to modify abs : List[float] Absolute translation vector Keyword Arguments ----------------- fid : str Co-ordinates of fiducial point obj : str Co-ordinates of standard object stype : str Shift type ["Absolute"] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSSLIDE for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcsslide", "wcsslide", ndf, abs, **kwargs)
[docs]def wcstran(ndf, posin, **kwargs): """ Transform a position from one NDF co-ordinate Frame to another. Runs the command: $KAPPA_DIR/wcstran . Arguments --------- ndf : str,filename The input NDF posin : str Position to be transformed Keyword Arguments ----------------- framein : str Input co-ordinate Frame [PIXEL] frameout : str Output co-ordinate Frame [!] epochin : float Epoch of input position epochout : float Epoch of output position skydeg : int No. of decimal places for formatted sky axis degree values [0] Returns ------- posout : str Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WCSTRAN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wcstran", "wcstran", ndf, posin, **kwargs)
[docs]def wiener(in_, psf, out, xcentre, ycentre, **kwargs): """ Applies a Wiener filter to a 1- or 2-dimensional array. Runs the command: $KAPPA_DIR/wiener . Arguments --------- `in_` : str,filename The input NDF psf : str,filename An NDF holding the PSF out : str,filename The output NDF xcentre : int X pixel index of the PSF centre within the PSF image ycentre : int Y pixel index of the PSF centre within the PSF image Keyword Arguments ----------------- model : str,filename An NDF holding the model image [!] pmodel : float Constant power per pixel in model image [!] pnoise : float Constant noise power per pixel [!] quiet : bool Is the model devoid of noise? [!] thresh : float Truncation fractional threshold of PSF [0.0625] title : str Title for output NDF [!] wlim : float Weight limit for good output pixels [0.001] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_WIENER for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/wiener", "wiener", in_, psf, out, xcentre, ycentre, **kwargs)
[docs]def zaplin(in_, out, **kwargs): """ Replaces regions in a two-dimensional NDF by bad values or by Runs the command: $KAPPA_DIR/zaplin . Arguments --------- `in_` : str,filename Image to be modified out : str,filename Image after being modified Keyword Arguments ----------------- title : str Title for output image [!] colin : str,filename Filename containing the line/column limits colout : str,filename Filename to store the line/column limits [!] columns : str Bounds on axis 1 of the area to be replaced device : Name of graphics device [Current graphics device] lincol : str Lines, Columns or Region? [Lines] lines : str Bounds on axis 2 of the area to be replaced marker : int The PGPLOT type for markers [current value] mode : str Mode to obtain area limits [current value] noise : bool [FALSE] plot : str What sort of graphics should be used? [current value] style : str Style for graphics [current value] useaxis : str The two current Frame axes to be used [!] zaptype : str Type of zapping ["Linear"] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun95.htx/sun95.html?xref_ZAPLIN for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$KAPPA_DIR/zaplin", "zaplin", in_, out, **kwargs)