starlink-pywrapper
latest
  • Overview of this package
  • starlink.wrapper
  • starlink.utilities
  • starlink.atools
  • starlink.ccdpack
  • starlink.convert
  • starlink.cupid
  • starlink.figaro
  • starlink.fluxes
  • starlink.kappa
  • starlink.polpack
  • starlink.smurf
  • starlink.picard
starlink-pywrapper
  • Docs »
  • starlink package
  • Edit on GitHub

starlink package¶

Submodules¶

starlink.atools module¶

Runs commands from the Starlink ATOOLS 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)

starlink.atools.astaddframe(this, **kwargs)[source]¶

Add a Frame to a FrameSet to define a new coordinate system.

Runs the command: $ATOOLS_DIR/astaddframe .

Parameters:

this (str) – The input FrameSet

Keyword Arguments:
 
  • iframe (str) – The index or Domain of the basis Frame within the FrameSet [!]
  • map (str,filename) – The Mapping from the basis Frame to the new Frame
  • frame (str,filename) – The Frame to add to the FrameSet
  • result (str) – The modified FrameSet
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astaddvariant(this, map, name, result, **kwargs)[source]¶

Store a new variant Mapping for the current Frame in a FrameSet.

Runs the command: $ATOOLS_DIR/astaddvariant .

Parameters:
  • this (str) – The input FrameSet
  • map (str,filename) – The Mapping from current Frame to new variant Frame
  • name (str) – The name for the new variant Mapping
  • result (str) – The modified FrameSet
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astangle(this, a, b, c, **kwargs)[source]¶

Calculate the angle subtended by two points at a third point

Runs the command: $ATOOLS_DIR/astangle .

Parameters:
  • this (str) – The input Frame
  • a (List[float]) – Coords at first point
  • b (List[float]) – Coords at second point
  • c (List[float]) – Coords at third point
Keyword Arguments:
 
  • degs (bool) – Report answer in degrees? [FALSE]
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astbox(frame, form, point1, point2, unc, **kwargs)[source]¶

Create a Box.

Runs the command: $ATOOLS_DIR/astbox .

Parameters:
  • frame (str,filename) – The Frame in which the Box is defined
  • form (int) – Specify the Box by opposite corners?
  • point1 (str) – Centre or corner axis values
  • point2 (str) – Corner axis values
  • unc (str) – The uncertainty Region
Keyword Arguments:
 
  • options (str) – Options for the Box [!]
  • result (str) – Name of file in which to store the Box
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astchebydomain(this, **kwargs)[source]¶

Returns the bounding box of the domain of a ChebyMap.

Runs the command: $ATOOLS_DIR/astchebydomain .

Parameters:

this (str) – The input ChebyMap

Keyword Arguments:
 
  • forward (bool) – Use the forward transformation? [TRUE]
  • fmt (str) – Format for output text file [AST]
Returns:

  • lbnd (List[float])
  • ubnd (List[float])

starlink.atools.astchebymap(*args, **kwargs)[source]¶

Create a ChebyMap.

Runs the command: $ATOOLS_DIR/astchebymap .

Keyword Arguments:
 
  • nin (int) – Number of input coordinates [1]
  • nout (int) – Number of output coordinates [1]
  • coeff_f (str) – Group of coefficients for the forward transformation
  • coeff_i (str) – Group of coefficients for the inverse transformation
  • lbndf (float) – Lower bounds of input box
  • ubndf (float) – Upper bounds of input box
  • lbndi (float) – Lower bounds of output box
  • ubndi (float) – Upper bounds of output box
  • options (str) – Options for the ChebyMap [!]
  • result (str) – Name of file in which to store the ChebyMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astcircle(frame, form, centre, point, unc, **kwargs)[source]¶

Create a Circle.

Runs the command: $ATOOLS_DIR/astcircle .

Parameters:
  • frame (str,filename) – The Frame in which the Circle is defined
  • form (int) – Parameter form
  • centre (List[float]) – Centre coords
  • point (List[float]) – Circumference position or radius
  • unc (str) – The uncertainty Region
Keyword Arguments:
 
  • options (str) – Options for the Circle [!]
  • result (str) – Name of file in which to store the Circle
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astclear(this, attrib, result, **kwargs)[source]¶

Clear attribute values for an Object.

Runs the command: $ATOOLS_DIR/astclear .

Parameters:
  • this (str) – The input Object
  • attrib (str) – The attribute to clear
  • result (str) – Name of file or NDF in which to store the modified Object
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astcmpframe(frame1, frame2, **kwargs)[source]¶

Create a CmpFrame.

Runs the command: $ATOOLS_DIR/astcmpframe .

Parameters:
  • frame1 (str) – The first component Frame
  • frame2 (str) – The second component Frame
Keyword Arguments:
 
  • options (str) – Options for the CmpFrame [!]
  • result (str) – Name of file in which to store the CmpFrame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astcmpmap(map1, map2, series, **kwargs)[source]¶

Create a CmpMap.

Runs the command: $ATOOLS_DIR/astcmpmap .

Parameters:
  • map1 (str) – The first component Mapping
  • map2 (str) – The second component Mapping
  • series (bool) – Combine the Mappings in series?
Keyword Arguments:
 
  • options (str) – Options for the CmpMap [!]
  • result (str) – Name of file in which to store the CmpMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astcmpregion(region1, region2, oper, **kwargs)[source]¶

Create a CmpRegion.

Runs the command: $ATOOLS_DIR/astcmpregion .

Parameters:
  • region1 (str) – The first component Region
  • region2 (str) – The second component Region
  • oper (str) – The boolean operator
Keyword Arguments:
 
  • options (str) – Options for the CmpRegion [!]
  • result (str) – Name of file in which to store the CmpRegion
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astconvert(from_, to, **kwargs)[source]¶

Determine how to convert between two coordinate systems.

Runs the command: $ATOOLS_DIR/astconvert .

Parameters:
  • from_ (str) – The source Frame or FrameSet
  • to (str) – The destination Frame or FrameSet
Keyword Arguments:
 
  • domainlist (str) – A comma-separated search list of domains [!]
  • result (str) – Name of file in which to store the FrameSet
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astconvex(*args, **kwargs)[source]¶

Create a new Polygon representing the convex hull of a 2D data grid.

Runs the command: $ATOOLS_DIR/astconvex .

Keyword Arguments:
 
  • value (str) – The value that defines the pixels to be included [BAD]
  • oper (str) – Operation defining the pixels to be included [EQ]
  • array (str,filename) – The input NDF
  • result (str) – Name of file in which to store the Polygon
  • current (bool) – Map the Polygon into current Frame of the NDF? [FALSE]
  • fmt (str) – Format for output text file [“AST”]
Returns:

nvert (int)

starlink.atools.astcopy(this, result, **kwargs)[source]¶

Copy an AST Object.

Runs the command: $ATOOLS_DIR/astcopy .

Parameters:
  • this (str) – The input Object
  • result (str) – The output Object
Keyword Arguments:
 
  • class_ (str) – Class of output object [“Object”]
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astdistance(this, point1, point2, **kwargs)[source]¶

Calculate the distance between two points in a Frame

Runs the command: $ATOOLS_DIR/astdistance .

Parameters:
  • this (str) – The input Frame
  • point1 (List[float]) – Coords at first point
  • point2 (List[float]) – Coords at second point
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

Returns:

distance (float)

starlink.atools.astdownsize(this, maxerr, maxvert, result, **kwargs)[source]¶

Reduce the number of vertices in a Polygon.

Runs the command: $ATOOLS_DIR/astdownsize .

Parameters:
  • this (str) – The input Polygon
  • maxerr (float) – Maximum error between old and new Polygons
  • maxvert (int) – Maximum number of vertices in new Polygon
  • result (str) – The new Polygon
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astdsbframe(*args, **kwargs)[source]¶

Create a DSBSpecFrame.

Runs the command: $ATOOLS_DIR/astdsbframe .

Keyword Arguments:
 
  • options (str) – Options for the DSBSpecFrame [!]
  • result (str) – Name of file in which to store the DSBSpecFrame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astellipse(frame, form, centre, point1, point2, unc, **kwargs)[source]¶

Create a Ellipse.

Runs the command: $ATOOLS_DIR/astellipse .

Parameters:
  • frame (str,filename) – The Frame in which the Ellipse is defined
  • form (int) – Parameter form
  • centre (List[float]) – Centre coords
  • point1 (List[float]) – Coords at axis end or axis lengths
  • point2 (List[float]) – Coords at a point on ellipse of position angle
  • unc (str) – The uncertainty Region
Keyword Arguments:
 
  • options (str) – Options for the Ellipse [!]
  • result (str) – Name of file in which to store the Ellipse
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astfindframe(target, template, **kwargs)[source]¶

Find a coordinate system with specified characteristics.

Runs the command: $ATOOLS_DIR/astfindframe .

Parameters:
  • target (str) – The target Frame or FrameSet
  • template (str) – The template Frame
Keyword Arguments:
 
  • domainlist (str) – A comma-separated search list of domains [!]
  • result (str) – Name of file in which to store the FrameSet
  • fmt (str) – Format for output text file [“AST”]
Returns:

iframe (int)

starlink.atools.astfluxframe(*args, **kwargs)[source]¶

Create a FluxFrame.

Runs the command: $ATOOLS_DIR/astfluxframe .

Keyword Arguments:
 
  • specval (DOUBLE) – The spectral position at which flux values are measured [!]
  • specfrm (str) – The SpecFrame to which SPECVAL refers
  • options (str) – Options for the FluxFrame [!]
  • result (str) – Name of file in which to store the FluxFrame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astformat(this, axis, value, **kwargs)[source]¶

Format coordinate values for a Frame axis

Runs the command: $ATOOLS_DIR/astformat .

Parameters:
  • this (str) – The Frame
  • axis (int) – Index of Frame axis to use
  • value (str) – Group of numerical axis values
Keyword Arguments:
 
  • result (str) – Name of output text file to hold formatted values [!]
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astframe(*args, **kwargs)[source]¶

Create a Frame.

Runs the command: $ATOOLS_DIR/astframe .

Keyword Arguments:
 
  • naxes (int) – The number of axes in the Frame [2]
  • options (str) – Options for the Frame [!]
  • result (str) – Name of file in which to store the Frame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astframeset(frame, **kwargs)[source]¶

Create a FrameSet.

Runs the command: $ATOOLS_DIR/astframeset .

Parameters:

frame (str,filename) – A Frame to store in the FrameSet

Keyword Arguments:
 
  • options (str) – Options for the FrameSet [!]
  • result (str) – Name of file or NDF in which to store the FrameSet
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astfromhds(object, keymap, **kwargs)[source]¶

Create a KeyMap containing the contents of an HDS object.

Runs the command: $ATOOLS_DIR/astfromhds .

Parameters:
  • object (UNIV) – Input HDS object
  • keymap (str) – The new KeyMap
Keyword Arguments:
 

fmt (str) – Format for output text file [AST]

starlink.atools.astget(this, attrib, **kwargs)[source]¶

Get an attribute value for an Object.

Runs the command: $ATOOLS_DIR/astget .

Parameters:
  • this (str) – The input Object
  • attrib (str) – The attribute to examine
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

Returns:

value (str)

starlink.atools.astgetactunit(this, **kwargs)[source]¶

Get the value of the ActiveUnit flag for a rame.

Runs the command: $ATOOLS_DIR/astgetactunit .

Parameters:this (str) – The input Frame
Keyword Arguments:
 fmt (str) – Format for output text file [“AST”]
Returns:value (bool)
starlink.atools.astgetframe(this, **kwargs)[source]¶

Obtain a specified Frame in a FrameSet

Runs the command: $ATOOLS_DIR/astgetframe .

Parameters:

this (str) – The input FrameSet

Keyword Arguments:
 
  • iframe (str) – The index or Domain of the required Frame [!]
  • result (str) – Name of file in which to store the Frame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astgetmapping(this, **kwargs)[source]¶

Obtain a Mapping that converts between two Frames in a FrameSet.

Runs the command: $ATOOLS_DIR/astgetmapping .

Parameters:

this (str) – The input FrameSet

Keyword Arguments:
 
  • iframe1 (str) – The index or Domain of the input-end Frame [!]
  • iframe2 (str) – The index or Domain of the output-end Frame [!]
  • result (str) – Name of file in which to store the Mapping
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astgetrefpos(this, **kwargs)[source]¶

Get the reference position for a SpecFrame.

Runs the command: $ATOOLS_DIR/astgetrefpos .

Parameters:

this (str) – The input SpecFrame

Keyword Arguments:
 
  • frm (str) – The input SkyFrame [!]
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astgetregbounds(this, **kwargs)[source]¶

Returns the bounding box of Region.

Runs the command: $ATOOLS_DIR/astgetregbounds .

Parameters:this (str) – The input Region
Keyword Arguments:
 fmt (str) – Format for output text file [“AST”]
Returns:
  • lbnd (List[float])
  • ubnd (List[float])
starlink.atools.astgetregframe(this, result, **kwargs)[source]¶

Obtain the Frame represented by a Region.

Runs the command: $ATOOLS_DIR/astgetregframe .

Parameters:
  • this (str) – The input Region
  • result (str) – Name of file in which to store the Frame
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astgetunc(this, **kwargs)[source]¶

Obtain uncertainty information from a Region.

Runs the command: $ATOOLS_DIR/astgetunc .

Parameters:

this (str) – The input Region

Keyword Arguments:
 
  • def_ (bool) – Return default uncertainty if non defined? [TRUE]
  • result (str) – The uncertainty Region
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astinterval(frame, lbnd, ubnd, unc, **kwargs)[source]¶

Create a Interval.

Runs the command: $ATOOLS_DIR/astinterval .

Parameters:
  • frame (str,filename) – The Frame in which the Interval is defined
  • lbnd (str) – Lower axis bounds
  • ubnd (str) – Upper axis bounds
  • unc (str) – The uncertainty Region
Keyword Arguments:
 
  • options (str) – Options for the Interval [!]
  • result (str) – Name of file in which to store the Interval
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astinvert(this, result, **kwargs)[source]¶

Invert a Mapping.

Runs the command: $ATOOLS_DIR/astinvert .

Parameters:
  • this (str) – The input Mapping
  • result (str) – Name of file in which to store the inverted Mapping
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astlinearapprox(this, lbndin, ubndin, **kwargs)[source]¶

Find a linear approximation to a mapping

Runs the command: $ATOOLS_DIR/astlinearapprox .

Parameters:
  • this (str) – The input Mapping
  • lbndin (List[float]) – Lower bounds of input region
  • ubndin (List[float]) – Upper bounds of input region
Keyword Arguments:
 
  • tol (float) – Deviation from linearity [1]
  • fmt (str) – Format for output text file [“AST”]
Returns:

fit (List[float])

starlink.atools.astlutmap(lut, **kwargs)[source]¶

Create a LutMap.

Runs the command: $ATOOLS_DIR/astlutmap .

Parameters:

lut (str) – Group of numerical look up table values

Keyword Arguments:
 
  • start (float) – Input coordinate value for first LUT entry [0.0]
  • inc (float) – Increment in input coordinate value between LUT entries [1.0]
  • options (str) – Options for the LutMap [!]
  • result (str) – Name of file in which to store the LutMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astmapbox(this, lbndin, ubndin, **kwargs)[source]¶

Find a bounding box for a Mapping.

Runs the command: $ATOOLS_DIR/astmapbox .

Parameters:
  • this (str) – The input Mapping
  • lbndin (List[float]) – Lower bounds of input box
  • ubndin (List[float]) – Upper bounds of input box
Keyword Arguments:
 
  • forward (bool) – Use the forward transformation? [TRUE]
  • coordout (int) – Index of output axis for which bounds are required
  • fmt (str) – Format for output text file [“AST”]
Returns:

  • lbndout (float)
  • ubndout (float)
  • xl (List[float])
  • xu (List[float])

starlink.atools.astmapregion(this, map, frame, result, **kwargs)[source]¶

Transform a Region into a new Frame using a given Mapping

Runs the command: $ATOOLS_DIR/astmapregion .

Parameters:
  • this (str) – The input Region
  • map (str,filename) – The Mapping from the original Frame to the new Frame
  • frame (str,filename) – The Frame for the new Region
  • result (str) – The mapped Region
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astmapsplit(this, in_, **kwargs)[source]¶

Split a Mapping up into parallel component Mappings.

Runs the command: $ATOOLS_DIR/astmapsplit .

Parameters:
  • this (str) – The input Mapping
  • in_ (List[int]) – The indices of the required inputs
Keyword Arguments:
 
  • map (str) – Name of file in which to store the output Mapping
  • fmt (str) – Format for output text file [“AST”]
Returns:

out (List[int])

starlink.atools.astmask(this, map, **kwargs)[source]¶

Mask a region of a data grid.

Runs the command: $ATOOLS_DIR/astmask .

Parameters:
  • this (str) – The input Region
  • map (str) – The Mapping from pixel coords to Region coords
Keyword Arguments:
 
  • inside (bool) – Modify pixels inside the supplied Region? [TRUE]
  • val (str) – The value used to flag values in the output NDF [BAD]
  • in_ (str,filename) – The input NDF
  • out (str,filename) – The output NDF
  • fmt (str) – Format for output text file [“AST”]
Returns:

result (int)

starlink.atools.astmatchaxes(frm1, frm2, **kwargs)[source]¶

Find any corresponding axes in two Frames.

Runs the command: $ATOOLS_DIR/astmatchaxes .

Parameters:
  • frm1 (str) – The first Frame
  • frm2 (str) – The second Frame
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

Returns:

axes (List[int])

starlink.atools.astmathmap(*args, **kwargs)[source]¶

Create a MathMap.

Runs the command: $ATOOLS_DIR/astmathmap .

Keyword Arguments:
 
  • nin (int) – The number of input coordinates in the MathMap [2]
  • nout (int) – The number of output coordinates in the MathMap [2]
  • fwd (str) – Group of forward expressions
  • inv (str) – Group of inverse expressions
  • options (str) – Options for the MathMap [!]
  • result (str) – Name of file in which to store the MathMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astmatrixmap(*args, **kwargs)[source]¶

Create a MatrixMap.

Runs the command: $ATOOLS_DIR/astmatrixmap .

Keyword Arguments:
 
  • nin (int) – The number of input coordinates (columns) in the MatrixMap [2]
  • nout (int) – The number of output coordinates (rows) in the MatrixMap [2]
  • form (int) – The form of the MatrixMap [0]
  • matrix (List[float]) – The matrix elements [0]
  • options (str) – Options for the MatrixMap [!]
  • result (str) – Name of file in which to store the MatrixMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astmirrorvars(this, **kwargs)[source]¶

Make the current Frame in a FrameSet mirror the variant Mappings

Runs the command: $ATOOLS_DIR/astmirrorvars .

Parameters:

this (str) – The input FrameSet

Keyword Arguments:
 
  • iframe (str) – The index or Domain of the variant Frame to mirror [!]
  • result (str) – The modified FrameSet
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astnegate(this, result, **kwargs)[source]¶

Negate the area represented by a Region.

Runs the command: $ATOOLS_DIR/astnegate .

Parameters:
  • this (str) – The input Region
  • result (str) – Name of file in which to store the negated Region
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astoutline(*args, **kwargs)[source]¶

Create a new Polygon outling values in a 2D NDF.

Runs the command: $ATOOLS_DIR/astoutline .

Keyword Arguments:
 
  • value (str) – The value that defines the pixels to be outlined [BAD]
  • oper (str) – Operation defining the pixels to be outlined [EQ]
  • array (str,filename) – The input NDF
  • maxerr (float) – The maximum allowed positional error in the polygon [0.0]
  • maxvert (int) – The maximum number of vertices in the polygon [10]
  • inside (List[int]) – Pixel indices of a point in the polygon [!]
  • result (str) – Name of file in which to store the Polygon
  • current (bool) – Map the Polygon into current Frame of the NDF? [FALSE]
  • fmt (str) – Format for output text file [“AST”]
Returns:

nvert (int)

starlink.atools.astoverlap(this, that, **kwargs)[source]¶

Test if two regions overlap each other.

Runs the command: $ATOOLS_DIR/astoverlap .

Parameters:
  • this (str) – The first Region
  • that (str) – The second Region
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

Returns:

result (int)

starlink.atools.astpcdmap(disco, pcdcen, **kwargs)[source]¶

Create a PcdMap.

Runs the command: $ATOOLS_DIR/astpcdmap .

Parameters:
  • disco (float) – The distortion coefficient
  • pcdcen (List[float]) – The coordinates of the centre of the distortion
Keyword Arguments:
 
  • options (str) – Options for the PcdMap [!]
  • result (str) – Name of file in which to store the PcdMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astpermaxes(this, perm, result, **kwargs)[source]¶

Permute the axis order in a Frame.

Runs the command: $ATOOLS_DIR/astpermaxes .

Parameters:
  • this (str) – The input Frame or FrameSet
  • perm (List[int]) – The new axis order
  • result (str) – The modified Frame or FrameSet
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astpermmap(inperm, outperm, constants, **kwargs)[source]¶

Create a PermMap.

Runs the command: $ATOOLS_DIR/astpermmap .

Parameters:
  • inperm (List[int]) – Output axes for each input axis
  • outperm (List[int]) – Input axes for each output axis
  • constants (float) – Constant values for unattached axes
Keyword Arguments:
 
  • options (str) – Options for the PermMap [!]
  • result (str) – Name of file in which to store the PermMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astpickaxes(this, axes, **kwargs)[source]¶

Create a new Frame by picking axes from an existing one.

Runs the command: $ATOOLS_DIR/astpickaxes .

Parameters:
  • this (str) – The input Frame or FrameSet
  • axes (List[int]) – The indices of the required axes
Keyword Arguments:
 
  • map (str) – The Mapping from old to new Frame [!]
  • result (str) – The new Frame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astpolygon(frame, xin, yin, unc, **kwargs)[source]¶

Create a Polygon.

Runs the command: $ATOOLS_DIR/astpolygon .

Parameters:
  • frame (str,filename) – The Frame in which the Polygon is defined
  • xin (str) – Group of numerical X axis values
  • yin (str) – Group of numerical Y axis values
  • unc (str) – The uncertainty Region
Keyword Arguments:
 
  • options (str) – Options for the Polygon [!]
  • result (str) – Name of file in which to store the Polygon
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astpolymap(*args, **kwargs)[source]¶

Create a PolyMap.

Runs the command: $ATOOLS_DIR/astpolymap .

Keyword Arguments:
 
  • nin (int) – Number of input coordinates [1]
  • nout (int) – Number of output coordinates [1]
  • coeff_f (str) – Group of coefficients for the forward transformation
  • coeff_i (str) – Group of coefficients for the inverse transformation
  • options (str) – Options for the PolyMap [!]
  • result (str) – Name of file in which to store the PolyMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astpolytran(this, forward, acc, maxacc, maxorder, lbnd, ubnd, result, **kwargs)[source]¶

Fit a PolyMap inverse or forward transformation.

Runs the command: $ATOOLS_DIR/astpolytran .

Parameters:
  • this (str) – The input PolyMap
  • forward (bool) – Replace the forward transformation?
  • acc (float) – The target accuracy
  • maxacc (float) – The maximum allowed accuracy
  • maxorder (int) – The maximum polynomial order
  • lbnd (List[float]) – Lower bounds of fitting box
  • ubnd (List[float]) – Upper bounds of fitting box
  • result (str) – Name of file in which to store the new PolyMap
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astprism(region1, region2, **kwargs)[source]¶

Create a Prism.

Runs the command: $ATOOLS_DIR/astprism .

Parameters:
  • region1 (str) – The Region to be extruded
  • region2 (str) – The Region defining the extent of the extrusion
Keyword Arguments:
 
  • options (str) – Options for the Prism [!]
  • result (str) – Name of file in which to store the Prism
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astquadapprox(this, lbnd, ubnd, **kwargs)[source]¶

Obtain a quadratic approximation to a 2D Mapping.

Runs the command: $ATOOLS_DIR/astquadapprox .

Parameters:
  • this (str) – The input Mapping
  • lbnd (List[float]) – Lower bounds of input region
  • ubnd (List[float]) – Upper bounds of input region
Keyword Arguments:
 
  • nx (int) – Number of points to place along the first input axis [10]
  • ny (int) – Number of points to place along the second input axis [10]
  • fmt (str) – Format for output text file [“AST”]
Returns:

  • fit (List[float])
  • rms (float)

starlink.atools.astrate(this, at, ax1, ax2, **kwargs)[source]¶

Calculate the rate of change of a Mapping output

Runs the command: $ATOOLS_DIR/astrate .

Parameters:
  • this (str) – The input Mapping
  • at (List[float]) – Input position at which rate of change is to be determined
  • ax1 (int) – Index of output axis for which rate of change is required
  • ax2 (int) – Index of input axis for which is to be varied
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

Returns:

rate (float)

starlink.atools.astratemap(map, ax1, ax2, **kwargs)[source]¶

Create a RateMap.

Runs the command: $ATOOLS_DIR/astratemap .

Parameters:
  • map (str) – The encapsulated Mapping
  • ax1 (int) – Mapping output for which rate of change is required
  • ax2 (int) – Mapping input to be varied
Keyword Arguments:
 
  • options (str) – Options for the RateMap [!]
  • result (str) – Name of file in which to store the RateMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astremapframe(this, **kwargs)[source]¶

Modify a Frame’s relationship to other Frames in a FrameSet.

Runs the command: $ATOOLS_DIR/astremapframe .

Parameters:

this (str) – The input FrameSet

Keyword Arguments:
 
  • iframe (str) – The index or Domain of the Frame to be re-mapped [!]
  • map (str,filename) – The Mapping from the original to the new Frame
  • result (str) – The modified FrameSet
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astremoveframe(this, **kwargs)[source]¶

Remove a Frame from a FrameSet.

Runs the command: $ATOOLS_DIR/astremoveframe .

Parameters:

this (str) – The input FrameSet

Keyword Arguments:
 
  • iframe (str) – The index or Domain of the Frame to be removed [!]
  • result (str) – The modified FrameSet
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astremoveregion(this, result, **kwargs)[source]¶

Remove any Regions from a Mapping.

Runs the command: $ATOOLS_DIR/astremoveregion .

Parameters:
  • this (str) – The input Mapping
  • result (str) – Name of file in which to store the modified Mapping
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astselectormap(reg1, reg2, **kwargs)[source]¶

Create a SelectorMap.

Runs the command: $ATOOLS_DIR/astselectormap .

Parameters:
  • reg1 (str) – The first Region
  • reg2 (str) – The second Region
Keyword Arguments:
 
  • options (str) – Options for the SelectorMap [!]
  • result (str) – Name of file in which to store the SelectorMap
  • badval (str) – Output value to use for bad input values
  • fmt (str) – Format for output text file [“AST”]
  • reg10 (str) – Region number 10 [!]
  • reg11 (str) – Region number 11 [!]
  • reg12 (str) – Region number 12 [!]
  • reg13 (str) – Region number 13 [!]
  • reg14 (str) – Region number 14 [!]
  • reg15 (str) – Region number 15 [!]
  • reg16 (str) – Region number 16 [!]
  • reg17 (str) – Region number 17 [!]
  • reg18 (str) – Region number 18 [!]
  • reg19 (str) – Region number 19 [!]
  • reg20 (str) – Region number 20 [!]
  • reg21 (str) – Region number 21 [!]
  • reg22 (str) – Region number 22 [!]
  • reg23 (str) – Region number 23 [!]
  • reg24 (str) – Region number 24 [!]
  • reg25 (str) – Region number 25 [!]
  • reg3 (str) – Region number 3 [!]
  • reg4 (str) – Region number 4 [!]
  • reg5 (str) – Region number 5 [!]
  • reg6 (str) – Region number 6 [!]
  • reg7 (str) – Region number 7 [!]
  • reg8 (str) – Region number 8 [!]
  • reg9 (str) – Region number 9 [!]
starlink.atools.astset(this, attrib, value, result, **kwargs)[source]¶

Set an attribute value for an Object.

Runs the command: $ATOOLS_DIR/astset .

Parameters:
  • this (str) – The input Object
  • attrib (str) – The attribute to set
  • value (str) – The new attribute value
  • result (str) – Name of file or NDF in which to store the modified Object
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astsetactunit(this, value, result, **kwargs)[source]¶

Set the ActiveUnit flag for a Frame.

Runs the command: $ATOOLS_DIR/astsetactunit .

Parameters:
  • this (str) – The input Frame
  • value (bool) – The new ActiveUnit value
  • result (str) – Name of file or NDF in which to store the modified Frame
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astsetrefpos(this, **kwargs)[source]¶

Set the reference position for a SpecFrame.

Runs the command: $ATOOLS_DIR/astsetrefpos .

Parameters:

this (str) – The input SpecFrame

Keyword Arguments:
 
  • frm (str) – The input SkyFrame [!]
  • lon (str) – The formatted celestial longitude [0 0 0]
  • lat (str) – The formatted celestial latitude [0 0 0]
  • result (str) – Name of file in which to store the modified SpecFrame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astsfluxframe(frame1, frame2, **kwargs)[source]¶

Create a SpecFluxFrame.

Runs the command: $ATOOLS_DIR/astsfluxframe .

Parameters:
  • frame1 (str) – The SpecFrame
  • frame2 (str) – The FluxFrame
Keyword Arguments:
 
  • options (str) – Options for the SpecFluxFrame [!]
  • result (str) – Name of file in which to store the SpecFluxFrame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astshiftmap(*args, **kwargs)[source]¶

Create a ShiftMap.

Runs the command: $ATOOLS_DIR/astshiftmap .

Keyword Arguments:
 
  • ncoord (int) – The number of coordinates for the ShiftMap [2]
  • shift (List[float]) – Values to add onto each coordinate axis
  • options (str) – Options for the ShiftMap [!]
  • result (str) – Name of file in which to store the ShiftMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astshow(*args, **kwargs)[source]¶

Runs the command: $ATOOLS_DIR/astshow.tcl .

starlink.atools.astshowmesh(this, format, ttl, **kwargs)[source]¶

Display a mesh of points covering the surface of a Region.

Runs the command: $ATOOLS_DIR/astshowmesh .

Parameters:
  • this (str) – The Region
  • format (bool) – Format the displayed axis values?
  • ttl (str) – Title to display before the table of axis values
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astsimplify(this, result, **kwargs)[source]¶

Simplify a Mapping.

Runs the command: $ATOOLS_DIR/astsimplify .

Parameters:
  • this (str) – The input Mapping
  • result (str) – Name of file in which to store the simplified Mapping
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

starlink.atools.astskyframe(*args, **kwargs)[source]¶

Create a SkyFrame.

Runs the command: $ATOOLS_DIR/astskyframe .

Keyword Arguments:
 
  • options (str) – Options for the SkyFrame [!]
  • result (str) – Name of file in which to store the SkyFrame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astspecframe(*args, **kwargs)[source]¶

Create a SpecFrame.

Runs the command: $ATOOLS_DIR/astspecframe .

Keyword Arguments:
 
  • options (str) – Options for the SpecFrame [!]
  • result (str) – Name of file in which to store the SpecFrame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astsphmap(*args, **kwargs)[source]¶

Create a SphMap.

Runs the command: $ATOOLS_DIR/astsphmap .

Keyword Arguments:
 
  • options (str) – Options for the SphMap [!]
  • result (str) – Name of file in which to store the SphMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astswitchmap(fsmap, ismap, routemap1, routemap2, **kwargs)[source]¶

Create a SwitchMap.

Runs the command: $ATOOLS_DIR/astswitchmap .

Parameters:
  • fsmap (str) – The forward selector Mapping
  • ismap (str) – The inverse selector Mapping
  • routemap1 (str) – The first route Mapping
  • routemap2 (str) – The second route Mapping
Keyword Arguments:
 
  • options (str) – Options for the SwitchMap [!]
  • result (str) – Name of file in which to store the SwitchMap
  • fmt (str) – Format for output text file [“AST”]
  • iarcfile (str) – IARC output file [!]
  • routemap10 (str) – Route Mapping number 10 [!]
  • routemap11 (str) – Route Mapping number 11 [!]
  • routemap12 (str) – Route Mapping number 12 [!]
  • routemap13 (str) – Route Mapping number 13 [!]
  • routemap14 (str) – Route Mapping number 14 [!]
  • routemap15 (str) – Route Mapping number 15 [!]
  • routemap16 (str) – Route Mapping number 16 [!]
  • routemap17 (str) – Route Mapping number 17 [!]
  • routemap18 (str) – Route Mapping number 18 [!]
  • routemap19 (str) – Route Mapping number 19 [!]
  • routemap20 (str) – Route Mapping number 20 [!]
  • routemap21 (str) – Route Mapping number 21 [!]
  • routemap22 (str) – Route Mapping number 22 [!]
  • routemap23 (str) – Route Mapping number 23 [!]
  • routemap24 (str) – Route Mapping number 24 [!]
  • routemap25 (str) – Route Mapping number 25 [!]
  • routemap3 (str) – Route Mapping number 3 [!]
  • routemap4 (str) – Route Mapping number 4 [!]
  • routemap5 (str) – Route Mapping number 5 [!]
  • routemap6 (str) – Route Mapping number 6 [!]
  • routemap7 (str) – Route Mapping number 7 [!]
  • routemap8 (str) – Route Mapping number 8 [!]
  • routemap9 (str) – Route Mapping number 9 [!]
starlink.atools.asttest(this, attrib, **kwargs)[source]¶

Test if an Object attribute value is set.

Runs the command: $ATOOLS_DIR/asttest .

Parameters:
  • this (str) – The input Object
  • attrib (str) – The attribute to test
Keyword Arguments:
 

fmt (str) – Format for output text file [“AST”]

Returns:

value (bool)

starlink.atools.asttimeframe(*args, **kwargs)[source]¶

Create a TimeFrame.

Runs the command: $ATOOLS_DIR/asttimeframe .

Keyword Arguments:
 
  • options (str) – Options for the TimeFrame [!]
  • result (str) – Name of file in which to store the TimeFrame
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.asttohds(keymap, object, **kwargs)[source]¶

Copy the contents of a KeyMap to a new HDS object.

Runs the command: $ATOOLS_DIR/asttohds .

Parameters:
  • keymap (str) – The input KeyMap
  • object (UNIV) – HDS object to create
starlink.atools.asttran1(this, xin, **kwargs)[source]¶

Use a Mapping to transform a set of position in one dimension.

Runs the command: $ATOOLS_DIR/asttran1 .

Parameters:
  • this (str) – The input Mapping
  • xin (str) – Group of numerical axis values
Keyword Arguments:
 
  • forward (bool) – Use the forward transformation? [TRUE]
  • xout (str) – Name of output text file to hold axis values [!]
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.asttran2(this, xin, yin, **kwargs)[source]¶

Use a Mapping to transform a set of position in two dimensions.

Runs the command: $ATOOLS_DIR/asttran2 .

Parameters:
  • this (str) – The input Mapping
  • xin (str) – Group of numerical X axis values
  • yin (str) – Group of numerical Y axis values
Keyword Arguments:
 
  • forward (bool) – Use the forward transformation? [TRUE]
  • xout (str) – Name of output text file to hold X axis values [!]
  • yout (str) – Name of output text file to hold Y axis values [!]
  • fmt (str) – Format for output text file [“AST”]
Returns:

  • xval (float)
  • yval (float)

starlink.atools.asttrangrid(this, lbnd, ubnd, **kwargs)[source]¶

Transform a grid of positions

Runs the command: $ATOOLS_DIR/asttrangrid .

Parameters:
  • this (str) – The input Mapping
  • lbnd (List[int]) – Lower pixel index bounds of output NDF
  • ubnd (List[int]) – Upper pixel index bounds of output NDF
Keyword Arguments:
 
  • tol (float) – Maximum tolerable geometrical distortion [0.0]
  • maxpix (int) – Initial scale size in input grid points [100]
  • forward (bool) – Use the forward transformation? [TRUE]
  • result (str,filename) – The NDF containing the transformed positions
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.asttranmap(map1, map2, **kwargs)[source]¶

Create a TranMap.

Runs the command: $ATOOLS_DIR/asttranmap .

Parameters:
  • map1 (str) – The first component Mapping
  • map2 (str) – The second component Mapping
Keyword Arguments:
 
  • options (str) – Options for the TranMap [!]
  • result (str) – Name of file in which to store the TranMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.asttrann(this, **kwargs)[source]¶

Transform N-dimensional coordinates.

Runs the command: $ATOOLS_DIR/asttrann .

Parameters:

this (str) – The input Mapping

Keyword Arguments:
 
  • incols (List[int]) – The columns containing the input axis values [!]
  • in_ (str,filename) – The NDF containing the input positions
  • forward (bool) – Use the forward transformation? [TRUE]
  • outcols (List[int]) – The columns to receive the output axis values [dyn.]
  • out (str,filename) – The NDF containing the transformed positions
  • fmt (str) – Format for output text file [“AST”]
  • posin (str) – Group of numerical input axis values [!]
  • posout (str) – Name of output text file to hold axis values [!]
starlink.atools.astunformat(this, axis, value, **kwargs)[source]¶

Read a formatted coordinate value for a Frame axis

Runs the command: $ATOOLS_DIR/astunformat .

Parameters:
  • this (str) – The Frame
  • axis (int) – Index of Frame axis to use
  • value (str) – Group of formatted axis values
Keyword Arguments:
 
  • result (str) – Name of output text file to hold unformatted values [!]
  • fmt (str) – Format for output text file [“AST”]
Returns:

dval (float)

starlink.atools.astunitmap(*args, **kwargs)[source]¶

Create a UnitMap.

Runs the command: $ATOOLS_DIR/astunitmap .

Keyword Arguments:
 
  • ncoord (int) – The number of input and output coordinates in the UnitMap [2]
  • options (str) – Options for the UnitMap [!]
  • result (str) – Name of file in which to store the UnitMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astwcsmap(ncoord, type, lonax, latax, **kwargs)[source]¶

Create a WcsMap.

Runs the command: $ATOOLS_DIR/astwcsmap .

Parameters:
  • ncoord (int) – The number of inputs and outputs
  • type (str) – The FITS-WCS projection code
  • lonax (int) – The index of the longitude axis
  • latax (int) – The index of the latitude axis
Keyword Arguments:
 
  • options (str) – Options for the WcsMap [!]
  • result (str) – Name of file in which to store the WcsMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astwinmap(*args, **kwargs)[source]¶

Create a WinMap.

Runs the command: $ATOOLS_DIR/astwinmap .

Keyword Arguments:
 
  • ncoord (int) – The number of coordinates for the WinMap [2]
  • ina (List[float]) – Coords of corner A in input coordinate system
  • inb (List[float]) – Coords of corner B in input coordinate system
  • outa (List[float]) – Coords of corner A in output coordinate system
  • outb (List[float]) – Coords of corner B in output coordinate system
  • options (str) – Options for the WinMap [!]
  • result (str) – Name of file in which to store the WinMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.astzoommap(*args, **kwargs)[source]¶

Create a ZoomMap.

Runs the command: $ATOOLS_DIR/astzoommap .

Keyword Arguments:
 
  • ncoord (int) – The number of coordinates for the ZoomMap [2]
  • zoom (float) – Zoom factor
  • options (str) – Options for the ZoomMap [!]
  • result (str) – Name of file in which to store the ZoomMap
  • fmt (str) – Format for output text file [“AST”]
starlink.atools.atlhelp(*args, **kwargs)[source]¶

Display information about ATOOLS.

Runs the command: $ATOOLS_DIR/atlhelp .

Keyword Arguments:
 
  • topic (str) – Help topic [” “]
  • subtopic (str) – Help subtopic [” “]
  • subsubtopic (str) – Help subsubtopic [” “]
  • subsubsubtopic (str) – Help subsubsubtopic [” “]
  • fmt (str) – Format for output text file [AST]

starlink.ccdpack module¶

Runs commands from the Starlink CCDPACK 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)

starlink.ccdpack.astexp(in_, astfile, outdomain, **kwargs)[source]¶

Exports coordinate system information from images

Runs the command: $CCDPACK_DIR/astexp .

Parameters:
  • in_ (str) – NDFs containing coordinate information
  • astfile (str) – File containing AST frameset information
  • outdomain (str) – Registration domain name in AST file [CCD_EXPORT]
Keyword Arguments:
 
  • baseframe (str) – Frame in NDFs to use as Base frame in AST file [PIXEL]
  • baseepoch (float) – Base frame epoch of observation
  • fitsid (str) – FITS header keyword to identify frameset
  • fitsrot (str) – FITS header keyword for additional rotation [!]
  • idtype (str) – Type of frameset identifier (SET,FITSID,INDEX) [INDEX]
  • indices (List[int]) – List of sequence values for INDEX frameset identifiers [!]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • outtitle (str) – Title of exported output frame [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_ASTEXP for full documentation of this command in the latest Starlink release

starlink.ccdpack.astimp(in_, astfile, indomain, **kwargs)[source]¶

Imports coordinate system information into NDFs from AST files.

Runs the command: $CCDPACK_DIR/astimp .

Parameters:
  • in_ (str) – NDFs to modify
  • astfile (str,filename) – File containing AST frameset information
  • indomain (str) – Domain name for Current import frames [!]
Keyword Arguments:
 
  • fitsrot (str) – FITS keyword for additional rotation angle [!]
  • indices (List[int]) – List of sequence values for INDEX frameset identifiers [!]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • rot (float) – Additional rotation angle [0]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_ASTIMP for full documentation of this command in the latest Starlink release

starlink.ccdpack.calcor(in_, out, cal, expose, **kwargs)[source]¶

Subtracts a scaled dark or flash calibration image from a series of images.

Runs the command: $CCDPACK_DIR/calcor .

Parameters:
  • in_ (str) – List of input NDFs
  • out (str) – List of output NDFs
  • cal (str) – NDF containing the Dark or Flash calibration data [Global calibration image]
  • expose (str) – Exposure times for input NDFs
Keyword Arguments:
 
  • preserve (bool) – Do you want to preserve the input type [TRUE]
  • title (str) – Title for the output NDF [Output from CALCOR]
  • keepin (bool) – Do not delete input NDFs [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • saturation (float) – Saturation value [1.0D6]
  • setsat (bool) – Saturated data set to a non-BAD value [FALSE]
  • type (str) – Frame type of input NDFs (NONE,DARK,FLASH) [NONE]
  • useext (bool) – Use NDF extension information [FALSE]
  • useset (bool) – Use Set header information? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_CALCOR for full documentation of this command in the latest Starlink release

starlink.ccdpack.ccdalign(in_, **kwargs)[source]¶

Aligns images graphically by interactive object selection.

Runs the command: $CCDPACK_DIR/ccdalign .

Parameters:

in_ (str) – List of NDFs for display

Keyword Arguments:
 
  • continue_ (bool) – Continue processing [FALSE]
  • extras (bool) – Input extra frames in same sky position as IN list? [FALSE]
  • fittype (, 1-5) – Transformation type [5]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • markstyle (str) – String giving style of markers to plot [“”]
  • maxcanv (int) – Maximum X or Y dimension of scrolled display region [1280]
  • more (str) – Additional frames in the sky same position [!]
  • percentiles (List[float]) – Display percentiles [2,98]
  • refndf (str) – Additional reference frame [!]
  • useset (bool) – Group lists by Set membership? [FALSE]
  • winx (int) – Width of display window in pixels [450]
  • winy (int) – Height of display window in pixels [600]
  • zoom (float) – Number of screen pixels per NDF pixel [1]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_CCDALIGN for full documentation of this command in the latest Starlink release

starlink.ccdpack.ccdclear(*args, **kwargs)[source]¶

Clears CCDPACK global parameters.

Runs the command: $CCDPACK_DIR/ccdclear .

Keyword Arguments:
 
  • byname (bool) – Clear parameters by specific name [FALSE]
  • logfile (str) – Name of CCDPACK logfile [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • names (str) – Parameter names

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_CCDCLEAR for full documentation of this command in the latest Starlink release

starlink.ccdpack.ccdedit(mode, in_, **kwargs)[source]¶

Edits CCDPACK image extensions.

Runs the command: $CCDPACK_DIR/ccdedit .

Parameters:
  • mode (str) – Editing mode (ALIST,ERASE,TRANSFORM,INVERT) [ALIST]
  • in_ (str) – List of NDFs
Keyword Arguments:
 
  • class_ (List[str]) – Transformation classifications
  • classify (bool) – Add classifications [FALSE]
  • 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
  • fittype (, 1-5) – Type of linear transform (1-5) [5]
  • fixwcs (bool) – Erase CCD_SET coordinate frames from WCS component too? [TRUE]
  • 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
  • inlist (str) – Names of position lists to associate
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • name (str) – Name of extension component
  • 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
  • tr (List[float]) – Linear transformation coefficients (6) [PA,PB,PC,PD,PE,PF]
  • transform (TRN) – Transformation structure
  • trtype (str) – Transformation type [COEFF]
  • xfor (str) – Expression for X forward mapping
  • xinv (str) – Expression for X inverse mapping
  • yfor (str) – Expression for Y forward mapping
  • yinv (str) – Expression for Y inverse mapping

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_CCDEDIT for full documentation of this command in the latest Starlink release

starlink.ccdpack.ccdndfac(*args, **kwargs)[source]¶

Accesses a list of images and writes their names to a file.

Runs the command: $CCDPACK_DIR/ccdndfac .

Keyword Arguments:
 
  • namelist (str) – Name of output file for NDF namelist [CCDNDFAC.LIS]
  • echo (bool) – Echo NDF names to user [TRUE]
  • in_ (str) – List of NDFs [!]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • maxndf (int) – Maximum number of NDFs to access [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_CCDNDFAC for full documentation of this command in the latest Starlink release

starlink.ccdpack.ccdnote(note, **kwargs)[source]¶

Adds a note to the current CCDPACK log file.

Runs the command: $CCDPACK_DIR/ccdnote .

Parameters:

note (str) –

Keyword Arguments:
 
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_CCDNOTE for full documentation of this command in the latest Starlink release

starlink.ccdpack.ccdsetup(*args, **kwargs)[source]¶

Sets the CCDPACK global parameters.

Runs the command: $CCDPACK_DIR/ccdsetup .

Keyword Arguments:
 
  • adc (float) – Number of electrons per ADU [!]
  • bounds (List[int]) – Pixel indices of bias strips (in pairs) [!]
  • byset (bool) – Set up values specific to one Set Index? [FALSE]
  • deferred (float) – Deferred charge (ADUs) [!]
  • direction (str) – Readout direction (X or Y) [!]
  • extent (List[int]) – Useful CCD region (xmin,xmax,ymin,ymax) [!]
  • genvar (bool) – Do you want to generate variance estimates [TRUE]
  • index (int) – Set Index values these parameters are specific to
  • logfile (str) – logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • mask (str) – Mask data file [!]
  • ndfnames (bool) – Associate position lists with NDF names [TRUE]
  • preserve (bool) – Do you want to preserve your input data types [TRUE]
  • restore (bool) – Use a setup restoration file [FALSE]
  • restorefile (str) – Setup restoration file [CCDPACK_SETUP.DAT]
  • rnoise (float) – Readout noise (ADUs) [!]
  • saturate (bool) – Look for saturated pixels [FALSE]
  • saturation (float) – Saturation value [1.0D6]
  • save (bool) – Save CCD parameters for future restoration [FALSE]
  • savefile (str) – File to store CCD parameters [CCDPACK_SETUP.DAT]
  • setsat (bool) – Set saturated pixels to saturation value [FALSE]
  • useset (bool) – Use CCDPACK Set headers if available [FALSE]
Returns:

maskname (str) – Private parameter

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_CCDSETUP for full documentation of this command in the latest Starlink release

starlink.ccdpack.ccdshow(*args, **kwargs)[source]¶

Displays the value of the CCDPACK global parameters.

Runs the command: $CCDPACK_DIR/ccdshow .

Keyword Arguments:
 
  • logfile (str) – logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • save (bool) – Save CCD parameters for future restoration [FALSE]
  • savefile (str) – File to store CCD parameters [CCDPACK_SETUP.DAT]
  • useset (bool) – [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_CCDSHOW for full documentation of this command in the latest Starlink release

starlink.ccdpack.debias(in_, out, bias, **kwargs)[source]¶

Performs the debiassing and initial preparation of CCD data.

Runs the command: $CCDPACK_DIR/debias .

Parameters:
  • in_ (str) – List of input NDFs
  • out (str) – List of output NDFs
  • bias (str) – Master bias NDF [Global master bias or !]
Keyword Arguments:
 
  • bounds (List[int]) – Pixel indices of bias strips (in pairs)
  • rnoise (float) – Readout noise (ADUs) [Dynamic default or 1.0]
  • adc (float) – Number of electrons per ADU [1.0]
  • mask (str) – Mask data file [!]
  • badbits (, 1-255) – BADBITS mask value [1]
  • boxsize (List[int]) – Box side sizes for smoothing bias strips [15,15]
  • cmode (str) – Clean up mode (Weight,Box or Sigma) [BOX]
  • deferred (float) – Deferred charge (ADUs) [0.0]
  • direction (str) – Readout direction ( X or Y ) [X]
  • expand (bool) – Convert input ADUs to electrons on output [Default is TRUE if input data is not an unsigned data type otherwise FALSE.]
  • extent (List[int]) – Useful CCD region (xmin,xmax,ymin,ymax)
  • fixorigin (bool) – Set origin of output NDFs to 1,1 [FALSE]
  • fmode (str) – Fit type (Plane or Line or Global) [LINE]
  • genvar (bool) – Do you want to generate variance estimates [FALSE]
  • getbias (bool) – Get a master bias NDF via BIAS parameter [TRUE]
  • getmask (bool) – Get a defect mask via MASK parameter [TRUE]
  • keepin (bool) – Do not delete input NDFs [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • nsigma (float) – Number of sigmas to clip at [4.0]
  • offset (bool) – Offset the bias values to zero [TRUE]
  • preserve (bool) – Do you want to preserve the input type [TRUE]
  • saturate (bool) – Look for saturated data [FALSE]
  • saturation (float) – Saturation value [1.0D6]
  • setbad (bool) – Set output pixels BAD [TRUE]
  • setsat (bool) – Set saturated pixels to the saturation value [FALSE]
  • smode (str) – Mode to fit data (Linear or Constant) [CONSTANT]
  • title (str) – Title for the output NDFs [Output from DEBIAS]
  • usecon (bool) – Do you want to supply a global zero level [FALSE]
  • useext (bool) – Use NDF extension information [FALSE]
  • useset (bool) – Use Set header information? [FALSE]
  • wmode (str) – Weighting mode (Linear, Exp or None) [LINEAR]
  • zero (float) – Global zero point value [0.0]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_DEBIAS for full documentation of this command in the latest Starlink release

starlink.ccdpack.drawndf(in_, **kwargs)[source]¶

Draws aligned images or outlines on a graphics display.

Runs the command: $CCDPACK_DIR/drawndf .

Parameters:

in_ (str) – List of input NDFs

Keyword Arguments:
 
  • device – Name of device [Current display device]
  • axes (bool) – Are annotated axes to be plotted? [dyn.]
  • clear (bool) – Clear display device [TRUE]
  • extent (List[int]) – Useful CCD region (xmin,xmax,ymin,ymax)
  • image (bool) – Plot images as well as outlines? [FALSE]
  • labname (bool) – Label images with their names? [TRUE]
  • labnum (bool) – Label images with their numbers? [FALSE]
  • labopaque (bool) – Use opaque background for text labels? [TRUE]
  • labpos (str) – Label positioning (2 characters each Near Centre or Far) [NN]
  • labup (bool) – Write text upright on graphics device? [FALSE]
  • lines (bool) – Draw image outlines? [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • origin (bool) – Draw marker at image origins? [TRUE]
  • penrot (bool) – Use a different pen for each outline? [FALSE]
  • percentiles (, 0-100) – Lower and upper percentiles for image display [2,98]
  • style (str) – Style specification for plot appearance [“”]
  • trim (bool) – Restrict to useful image area using EXTENT? [FALSE]
  • useext (bool) – Use NDF extension information for EXTENT area? [TRUE]
  • useset (bool) – Rotate pens by Set membership? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_DRAWNDF for full documentation of this command in the latest Starlink release

starlink.ccdpack.drizzle(in_, out, **kwargs)[source]¶

Mosaics images using the drizzling algorithm.

Runs the command: $CCDPACK_DIR/drizzle .

Parameters:
  • in_ (str) – List of input NDFs
  • out (str) – Output mosaic NDF
Keyword Arguments:
 
  • cmpvar (bool) – Use variance during inter-comparison? [TRUE]
  • correct (str) – File containing corrections [!]
  • genvar (bool) – Write variance component in output NDF? [TRUE]
  • listin (bool) – List input NDF names? [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • mapvar (bool) – Use inverse variance maps as weights? [FALSE]
  • maxit (int) – Maximum number of inter-comparison iterations [20]
  • multi (float) – Linear scaling of output/input pixels [1.5]
  • optov (int) – Optimum number of overlaps per NDF [3]
  • pixfrac (float) – Pixel fraction (size of “drop”) [0.9]
  • preserve (bool) – Preserve input data type? [TRUE]
  • ref (str) – Reference NDF [!]
  • scale (bool) – Adjust scale-factors? [FALSE]
  • skysup (float) – Sky noise suppression factor [dyn.]
  • title (str) – Title for output mosaic [Output from DRIZZLE]
  • tmpfile (str) – Temporary NDF filename [*_tmp]
  • tols (float) – Fractional scale-factor tolerance [0.001]
  • tolz (float) – Zero-point tolerance [0.05]
  • usevar (bool) – Use inverse mean image variances as weights? [TRUE]
  • zero (bool) – Adjust zero-points? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_DRIZZLE for full documentation of this command in the latest Starlink release

starlink.ccdpack.findcent(in_, outlist, **kwargs)[source]¶

Centroids image features.

Runs the command: $CCDPACK_DIR/findcent .

Parameters:
  • in_ (str) – Input NDF names
  • outlist (str) – Output position list names [*.cent]
Keyword Arguments:
 
  • autoscale (bool) – Adjust centroid parameters to image scale [FALSE]
  • inlist (str) – Input position list names
  • isize (int) – Size of search box [9]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • maxiter (int) – Maximum number of refining iterations [3]
  • maxshift (float) – Maximum shift in position [5.5]
  • namelist (str) – Output filename listing [FINDCENT.LIS]
  • ndfnames (bool) – Position list names are located in NDF extensions [TRUE]
  • positive (bool) – Features have positive signal [TRUE]
  • toler (float) – Positional tolerance in centroid [0.05]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_FINDCENT for full documentation of this command in the latest Starlink release

starlink.ccdpack.findobj(in_, minpix, outlist, **kwargs)[source]¶

Locates and centroids image features.

Runs the command: $CCDPACK_DIR/findobj .

Parameters:
  • in_ (str) – Name of input NDFs
  • minpix (int) – Minimum number of pixels per group [6]
  • outlist (str) – Results file names [*.DAT]
Keyword Arguments:
 
  • autothresh (bool) – Use automatic threshold values [TRUE]
  • binfrac (float) – Fraction of counts in one bin (percent) [2.5]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • namelist (str) – Name of output filenames listing [FINDOBJ.LIS]
  • nsigma (float) – Standard deviations above detection threshold [5]
  • override (bool) – Continue if errors occur when detecting objects [FALSE]
  • oversamp (int) – Histogram oversampling factor [5]
  • percentile (float) – Percentile for detection threshold [96]
  • thresh (float) – Detection threshold [Dynamic default]
  • touch (bool) – May pixel groups touch the edges of array [FALSE]
  • useper (bool) – Use percentiles to estimate threshold [TRUE]
Returns:

counts (int) – Private output parameter

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_FINDOBJ for full documentation of this command in the latest Starlink release

starlink.ccdpack.findoff(inlist, error, outlist, **kwargs)[source]¶

Performs pattern-matching between position lists related by simple offsets.

Runs the command: $CCDPACK_DIR/findoff .

Parameters:
  • inlist (str) – Names of position lists
  • error (float) – Error in positions (pixels) [1.0]
  • outlist (str) – Names for output position lists
Keyword Arguments:
 
  • complete (float) – Minimum completeness level [0.5]
  • failsafe (bool) – Perform SLOW algorithm if FAST fails [TRUE]
  • fast (bool) – Perform FAST algorithm [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • maxdisp (float) – Maximum displacement relative to initial placing (pixels) [!]
  • minmatch (int) – Minimum number of positions required for match [3]
  • minsep (float) – Minimum distance between positions [Dynamic – 5.0*ERROR]
  • namelist (str) – Name of output filenames listing [FINDOFF.LIS]
  • ndfnames (bool) – Position list names in NDF extensions [TRUE]
  • override (bool) – Continue if solution is incomplete [TRUE]
  • restrict (bool) – Restrict possible matches to apparently overlapping zones [FALSE]
  • usecomp (bool) – Use completeness as weight [TRUE]
  • useset (bool) – Group lists by Set membership? [FALSE]
  • usewcs (bool) – Use NDF World Coordinate System extension if it exists [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_FINDOFF for full documentation of this command in the latest Starlink release

starlink.ccdpack.flatcor(in_, out, flat, **kwargs)[source]¶

Divides a series of images by a flatfield

Runs the command: $CCDPACK_DIR/flatcor .

Parameters:
  • in_ (str) – List of input NDFs
  • out (str) – List of output NDFs
  • flat (str) – Flatfield NDF [Global flatfield]
Keyword Arguments:
 
  • keepin (bool) – Do not delete input NDFs [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • preserve (bool) – Do you want to preserve the input type [TRUE]
  • saturation (float) – Saturation value [1.0D6]
  • setsat (bool) – Has saturated data been set to a non-BAD value [FALSE]
  • title (str) – Title for the output NDF [Output from FLATCOR]
  • useset (bool) – Use Set header information? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_FLATCOR for full documentation of this command in the latest Starlink release

starlink.ccdpack.idicurs(in_, **kwargs)[source]¶

Views and writes position lists interactively.

Runs the command: $CCDPACK_DIR/idicurs .

Parameters:

in_ (str) – NDFs to be viewed

Keyword Arguments:
 
  • centroid (bool) – Centroid each position added to image? [TRUE]
  • inext (bool) – Get initial position list from NDF extension? [FALSE]
  • inlist (str) – Input position list
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • markstyle (str) – String giving style of markers to plot [“showindex=1”]
  • maxcanv (int) – Maximum X or Y dimension of scrolled display region [1280]
  • outlist (str) – Output file for positions
  • overwrite (bool) – Use the same position list file for read and write? [FALSE]
  • percentiles (List[float]) – Display percentiles [2,98]
  • readlist (bool) – Use initial position list? [FALSE]
  • useset (bool) – Group images by Set membership? [FALSE]
  • verbose (bool) – Log all marked positions? [TRUE]
  • winx (int) – Width of display window in pixels [450]
  • winy (int) – Height of display window in pixels [600]
  • writelist (bool) – Write marked positions to list file? [FALSE]
  • zoom (float) – Number of screen pixels per NDF pixel [1]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_IDICURS for full documentation of this command in the latest Starlink release

starlink.ccdpack.import_(in_, table, **kwargs)[source]¶

Imports FITS information into images

Runs the command: $CCDPACK_DIR/import .

Parameters:
  • in_ (str) – List of input NDFs
  • table (str) – Import control table [‘import.tab’]
Keyword Arguments:
 
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • namelist (str) – Input NDF name list [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_IMPORT for full documentation of this command in the latest Starlink release

starlink.ccdpack.makebias(in_, out, rnoise, method, **kwargs)[source]¶

Produces a master from a set of bias frames.

Runs the command: $CCDPACK_DIR/makebias .

Parameters:
  • in_ (str) – List of input NDFs
  • out (str) – Output NDF
  • rnoise (float) – Readout noise (ADUs) [Dynamically derived value]
  • method (str) – Data combination method [MEDIAN]
Keyword Arguments:
 
  • alpha (float) – Trim fraction [0.2]
  • genvar (bool) – Do you want to generate a variance component [FALSE]
  • keepin (bool) – Do not delete input NDFs [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • max (float) – Maximum allowed value [100.0]
  • min (float) – Minimum allowed value [-100.0]
  • minpix (int) – Minimum number of contributing pixels per output pixel [1]
  • niter (int) – Number of clipping iterations [7]
  • preserve (bool) – Preserve input NDF data type [TRUE]
  • sigmas (float) – Clipping limit (standard deviations) [4]
  • title (str) – Title for the output NDF [Output from MAKEBIAS]
  • useext (bool) – Use NDF extension information [FALSE]
  • useset (bool) – Use Set header information? [FALSE]
  • zero (bool) – Make average of output data zero [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_MAKEBIAS for full documentation of this command in the latest Starlink release

starlink.ccdpack.makecal(in_, expose, out, method, **kwargs)[source]¶

Produces a dark or pre-flash calibration image.

Runs the command: $CCDPACK_DIR/makecal .

Parameters:
  • in_ (str) – List of input NDFs
  • expose (str) – Input NDF exposure times
  • out (str) – Output NDF name
  • method (str) – Data combination method [MEDIAN]
Keyword Arguments:
 
  • alpha (float) – Trim fraction [0.2]
  • keepin (bool) – Do not delete input NDFs [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • max (float) – Maximum allowed value
  • min (float) – Minimum allowed value
  • minpix (int) – Minimum number of contributing pixels per output pixel [1]
  • niter (int) – Number of clipping iterations [7]
  • sigmas (float) – Clipping limit (standard deviations) [4.0]
  • title (str) – Title for the output NDF [Output from MAKECAL]
  • type (str) – Frame type of input NDFs (NONE,DARK,FLASH) [NONE]
  • useext (bool) – Use NDF extension information [FALSE]
  • useset (bool) – Use Set header information? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_MAKECAL for full documentation of this command in the latest Starlink release

starlink.ccdpack.makeflat(in_, out, method, **kwargs)[source]¶

Produces a flatfield calibration image.

Runs the command: $CCDPACK_DIR/makeflat .

Parameters:
  • in_ (str) – List of input NDFs
  • out (str) – Output NDF name [TRUE]
  • method (str) – Data combination method [MEDIAN]
Keyword Arguments:
 
  • alpha (float) – Trim fraction [0.2]
  • boxsize (List[int]) – Sizes of box filter sides [15,15]
  • clean (bool) – Clean input images of defects [TRUE]
  • gamma (float) – Number of standard deviations to reject at [3.0]
  • genvar (bool) – Generate output variance information? [FALSE]
  • iter (int) – Number of rejecting iterations [3]
  • keepin (bool) – Do not delete input NDFs [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • max (float) – Maximum allowed value
  • min (float) – Minimum allowed value
  • minpix (int) – Minimum number of contributing pixels per output pixel [1]
  • niter (int) – Number of clipping iterations [7]
  • norm (bool) – Normalise the output data to mean of one [TRUE]
  • sigmas (float) – Clipping limit (standard deviations) [4.0]
  • title (str) – Title for the output NDF [Output from MAKEFLAT]
  • useset (bool) – Use Set headers if available? [FALSE]
  • usevar (bool) – Use variance during data combination? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_MAKEFLAT for full documentation of this command in the latest Starlink release

starlink.ccdpack.makemos(in_, out, **kwargs)[source]¶

Make a mosaic by combining and (optionally) normalising a set of images.

Runs the command: $CCDPACK_DIR/makemos .

Parameters:
  • in_ (str) – List of input NDFs
  • out (str,filename) – Output mosaic NDF
Keyword Arguments:
 
  • alpha (float) – Trimming fraction [0.2]
  • cmpvar (bool) – Use variance during inter-comparison? [TRUE]
  • correct (str) – File containing corrections [!]
  • genvar (bool) – Generate output variance information? [dyn.]
  • listin (bool) – List input NDF names? [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write output to (Logfile,Terminal,Neither,Both) [BOTH]
  • max (float) – Maximum data value [Maximum real value]
  • maxit (int) – Maximum number of inter-comparison iterations [20]
  • method (str) – Data combination method [MEDIAN]
  • min (float) – Minimum data value [Minimum real value]
  • modify (bool) – Modify input NDFs? [FALSE]
  • niter (int) – Number of mode refining iterations [7]
  • optov (int) – Optimum number of overlaps per NDF [3]
  • preserve (bool) – Preserve input data type? [TRUE]
  • ref (str) – Reference NDF [!]
  • scale (bool) – Adjust scale-factors? [FALSE]
  • sigmas (float) – Clipping limit (standard deviations) [4.0]
  • skysup (float) – Sky noise suppression factor [dyn.]
  • title (str) – Title for output mosaic [Output from MAKEMOS]
  • tols (float) – Fractional scale-factor tolerance [0.001]
  • tolz (float) – Zero-point tolerance [0.05]
  • usevar (bool) – Use variance during data combination? [TRUE]
  • weights (List[float]) – NDF weighting factors [!]
  • zero (bool) – Adjust zero-points? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_MAKEMOS for full documentation of this command in the latest Starlink release

starlink.ccdpack.makeset(in_, mode, **kwargs)[source]¶

Writes Set header information to images.

Runs the command: $CCDPACK_DIR/makeset .

Parameters:
  • in_ (str) – NDFs to group into a Set
  • mode (str) – Set header write mode (LIST,CONTAINER,FITS, or SPLIT) [LIST]
Keyword Arguments:
 
  • addwcs (bool) – Add a CCD_SET aligned coordinate frame? [TRUE]
  • astfile (str) – Name of file containing exported AST framesets [!]
  • fitsindex (str) – FITS header keyword indicating Set Index
  • fitsname (str) – FITS header keyword giving Set Name
  • indexvals (List[str]) – Mapping of FITINDEX card value to Set Index value
  • indices (List[int]) – List of Set INDEX attributes for successive NDFs [!]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • name (str) – Set NAME attributes [*]
  • out (str) – HDS container files to contain output Sets
  • sections (List[str]) – NDF section specifiers for split sections [!]
  • setsize (int) – Number of NDFs in each generated Set [dynamic]
  • xstart (List[int]) – Start positions of split sections in X direction
  • ystart (List[int]) – Start positions of split sections in Y direction

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_MAKESET for full documentation of this command in the latest Starlink release

starlink.ccdpack.pairndf(in_, outlist, **kwargs)[source]¶

Aligns images graphically by drag and drop.

Runs the command: $CCDPACK_DIR/pairndf .

Parameters:
  • in_ (str) – List of NDFs
  • outlist (str) – Names for output lists [*.DAT]
Keyword Arguments:
 
  • percentiles (List[float]) – Display percentiles [2,98]
  • chooser (bool) – Preview 2 images in chooser widget before alignment? [FALSE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • markstyle1 (str) – String giving style of markers to plot on left image [“shape=plus”]
  • markstyle2 (str) – String giving style of markers to plot on right image [“shape=circle”]
  • maxcanv (int) – Maximum X or Y dimension of scrolled display region [1280]
  • override (bool) – Continue if solution is incomplete? [TRUE]
  • prevx (int) – Width of NDF preview display in pixels [350]
  • prevy (int) – Height of NDF preview display in pixels [350]
  • toler (float) – Object de-duplicating tolerance in pixels [0.5]
  • useset (bool) – Group NDFs by Set Name attribute? [FALSE]
  • winx (int) – Width of aligner window in pixels [800]
  • winy (int) – Height of aligner window in pixels [400]
  • zoom (float) – Number of screen pixels per NDF pixel [1]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_PAIRNDF for full documentation of this command in the latest Starlink release

starlink.ccdpack.plotlist(inlist, **kwargs)[source]¶

Draws position markers on a graphics display.

Runs the command: $CCDPACK_DIR/plotlist .

Parameters:

inlist (str) – Input list

Keyword Arguments:
 
  • device – Name of device [Current display device]
  • clear (bool) – Clear display device [FALSE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • msize (float) – Marker size (multiple of default) [2.5]
  • mtype (int) – Marker type (0-31) -ve uses ids [2]
  • ndfnames (bool) – Position list names in NDF extensions [TRUE]
  • palnum (int) – Pen number [3]
  • thick (int) – Thickness of markers [1]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_PLOTLIST for full documentation of this command in the latest Starlink release

starlink.ccdpack.present(*args, **kwargs)[source]¶

Presents a list of images to CCDPACK.

Runs the command: $CCDPACK_DIR/present .

Keyword Arguments:
 
  • adc (float) – Number of electrons per ADU [!]
  • adddark (bool) – Add dark exposure times to NDFs [dyn.]
  • addflash (bool) – Add pre-flash exposure times to NDFs [dyn.]
  • bias (str) – Bias frame names [!]
  • biasvalue (float) – Nominal bias value (ADUs) [!]
  • bounds (List[int]) – Pixel indices of bias strips (in pairs) [!]
  • dark (str) – Dark frame names [!]
  • darktime (float) – Dark count exposure time [!]
  • deferred (float) – Deferred charge (ADUs) [!]
  • direction (str) – Readout direction (X or Y) [!]
  • extent (List[int]) – Useful CCD region (xmin,xmax,ymin,ymax) [!]
  • filter (str) – Filter type [Current value]
  • flash (str) – Pre-flash frame names [!]
  • flashtime (float) – Pre-flash exposure time [!]
  • flat (str) – Flatfield names [!]
  • ftype (str) – Frame type [Current value]
  • in_ (str) – List of NDF names [*]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • masterbias (str) – Name of master bias [!]
  • masterdark (str) – Name of master dark [!]
  • masterflash (str) – Name of master flash [!]
  • masterflat (str) – Master flatfield names [!]
  • masters (bool) – Do you have some master calibration frames [FALSE]
  • modify (bool) – Modify existing extension items [TRUE]
  • multientry (bool) – Does input list contain frame types and factors [FALSE]
  • namelist (str) – Input NDF name list [!]
  • onedarktime (bool) – Use one dark count exposure time [FALSE]
  • onefilter (bool) – Use one filter type [FALSE]
  • oneflashtime (bool) – Use one pre-flash exposure time [FALSE]
  • rnoise (float) – Readout noise (ADUs) [!]
  • saturation (float) – Data saturation value (ADUs) [!]
  • simple (bool) – Do input NDFs already have frame types [FALSE]
  • target (str) – Target frame names [!]
  • zeroed (bool) – Does the MASTER_BIAS frame have a mean of zero [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_PRESENT for full documentation of this command in the latest Starlink release

starlink.ccdpack.reduce(*args, **kwargs)[source]¶

Automatic CCD data reduction facility (command-line version).

Runs the command: $CCDPACK_DIR/reduce .

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_REDUCE for full documentation of this command in the latest Starlink release

starlink.ccdpack.register(inlist, fittype, refpos, **kwargs)[source]¶

Determines transformations between lists of positions.

Runs the command: $CCDPACK_DIR/register .

Parameters:
  • inlist (str) – Names of position list files
  • fittype (, 1-6) – Type of fit to be performed (1-6) [5]
  • refpos (int) – Position of reference set [1]
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
  • full (bool) – Perform a full transformation [FALSE]
  • fv (str) – Sub-expression
  • fw (str) – Sub-expression
  • fx (str) – Sub-expression
  • fy (str) – Sub-expression
  • fz (str) – Sub-expression
  • in_ (str) – List of NDFs to contain new coordinate systems
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • ndfnames (bool) – Position list names in NDF extensions [TRUE]
  • outdomain (str) – Name of registration frame domain [CCD_REG]
  • outref (str) – Name of extended reference set [!]
  • pa (float) – Initial guess at parameter value [1.0d0]
  • pb (float) – Initial guess at parameter value [1.0d0]
  • pc (float) – Initial guess at parameter value [1.0d0]
  • pd (float) – Initial guess at parameter value [1.0d0]
  • pe (float) – Initial guess at parameter value [1.0d0]
  • pf (float) – Initial guess at parameter value [1.0d0]
  • pg (float) – Initial guess at parameter value [1.0d0]
  • ph (float) – Initial guess at parameter value [1.0d0]
  • pi (float) – Initial guess at parameter value [1.0d0]
  • pj (float) – Initial guess at parameter value [1.0d0]
  • pk (float) – Initial guess at parameter value [1.0d0]
  • pl (float) – Initial guess at parameter value [1.0d0]
  • placein (str) – Put new frames in SINGLE NDF or one EACH per list? [EACH]
  • pm (float) – Initial guess at parameter value [1.0d0]
  • pn (float) – Initial guess at parameter value [1.0d0]
  • po (float) – Initial guess at parameter value [1.0d0]
  • pp (float) – Initial guess at parameter value [1.0d0]
  • pq (float) – Initial guess at parameter value [1.0d0]
  • pr (float) – Initial guess at parameter value [1.0d0]
  • ps (float) – Initial guess at parameter value [1.0d0]
  • pt (float) – Initial guess at parameter value [1.0d0]
  • pu (float) – Initial guess at parameter value [1.0d0]
  • pv (float) – Initial guess at parameter value [1.0d0]
  • pw (float) – Initial guess at parameter value [1.0d0]
  • px (float) – Initial guess at parameter value [1.0d0]
  • py (float) – Initial guess at parameter value [1.0d0]
  • pz (float) – Initial guess at parameter value [1.0d0]
  • simpfi (bool) – Can forward followed by inverse be simplified to unit? [TRUE]
  • simpif (bool) – Can inverse followed by forward be simplified to unit? [TRUE]
  • toler (float) – Convergence tolerance [0.001]
  • useset (bool) – Group lists using Set header information? [FALSE]
  • usewcs (bool) – Offsets are in Current coordinate frame? [TRUE]
  • wcsfile (str,filename) – Name of NDF to contain all new coordinate systems
  • xfor (str) – Forward X transformation
  • xinv (str) – Inverse X transformation
  • yfor (str) – Forward Y transformation
  • yinv (str) – Inverse Y transformation

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_REGISTER for full documentation of this command in the latest Starlink release

starlink.ccdpack.schedule(*args, **kwargs)[source]¶

Schedules an automated CCDPACK reduction.

Runs the command: $CCDPACK_DIR/schedule .

Keyword Arguments:
 
  • in_ (str) – Names of input NDFs [*]
  • script (str) – Name of output script [schedule.”stype”]
  • stype (str) – Type of output script [CSH]
  • darkext (str) – Extension of names output after dark correction [-dk]
  • debias (int) – Debiassing method
  • debiasext (str) – Extension of names output from DEBIAS [-db]
  • execute (bool) – Execute the command procedure [FALSE]
  • exelogfile (str) – Name of output script [SCHEDULE.LOG]
  • flashext (str) – Extension of names output after flash correction [-dk]
  • flatext (str) – Extension of names output after flatfielding [-flt]
  • interp (int) – Interpolation method
  • irflats (bool) – Using TARGETS as possible flatfields [FALSE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • masterbias (str) – Name of master bias NDF [MASTER_BIAS]
  • masterdark (str) – Name of master dark NDF [MASTER_DARK]
  • masterflash (str) – Name of master pre-flash NDF [MASTER_FLASH]
  • masterflat (str) – Prefix name for master flats NDF [MASTER_FLAT]
  • spacesave (str) – Save disk space (none,some,lots) [NONE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_SCHEDULE for full documentation of this command in the latest Starlink release

starlink.ccdpack.showset(in_, **kwargs)[source]¶

Outputs image Set header information.

Runs the command: $CCDPACK_DIR/showset .

Parameters:

in_ (str) – NDFs to consider for output

Keyword Arguments:
 
  • index (str) – Acceptable Set Index values
  • indexlike (str) – Template NDFs for Set Index value
  • listby (str) – Primary sort key (INDEX, NAME or NONE) [NAME]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • name (str) – Allowed Set Name values
  • namelike (str) – Template NDFs for Set Name value
  • namelist (str) – Output file for selected NDFs [showset.lis]
  • pickindex (str) – Selection criteria for Set Index (ALL,EQUAL,LIKE) [ALL]
  • pickname (str) – Selection criteria for Set Name (ALL,EQUAL,LIKE) [ALL]
  • setless (bool) – Include NDFs with no Set headers? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_SHOWSET for full documentation of this command in the latest Starlink release

starlink.ccdpack.tranlist(inlist, outlist, trtype, **kwargs)[source]¶

Transform lists of positions.

Runs the command: $CCDPACK_DIR/tranlist .

Parameters:
  • inlist (str) – Names of input position lists
  • outlist (str) – Names for output lists
  • trtype (str) – Transformation type [COEFF]
Keyword Arguments:
 
  • epochin (float) – Source frame epoch of observation [Dynamic]
  • epochout (float) – Destination frame epoch of observation [Dynamic]
  • 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
  • forward (bool) – Use forward transformation [TRUE]
  • fp (str) – Sub-expression
  • fq (str) – Sub-expression
  • fr (str) – Sub-expression
  • framein (str) – Source coordinate frame [PIXEL]
  • frameout (str) – Destination coordinate frame [!]
  • 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
  • inext (bool) – Locate transform structure in NDF extensions [TRUE]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • namelist (str) – Name of output filenames listing [TRANLIST.LIS]
  • ndfnames (bool) – Position list names in NDF extensions [TRUE]
  • 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
  • tr (List[float]) – Linear transformation coefficients (6) [PA,PB,PC,PD,PE,PF]
  • transform (TRN) – Transformation structure
  • wcsfile (str,filename) – NDF containing WCS component
  • xfor (str) – X mapping expression
  • yfor (str) – Y mapping expression

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_TRANLIST for full documentation of this command in the latest Starlink release

starlink.ccdpack.tranndf(in_, **kwargs)[source]¶

Transforms a list of images by resampling.

Runs the command: $CCDPACK_DIR/tranndf .

Parameters:

in_ (str) – List of NDFs

Keyword Arguments:
 
  • out (str) – Output NDF
  • method (str) – Re-sampling method [NEAREST]
  • conserve (bool) – Conserve flux? [TRUE]
  • inext (bool) – Locate transform structure in NDF extensions [TRUE]
  • lbound (List[float]) – Lower bounds of the output NDFs [Dynamic default]
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • shape (str) – Method used to get bounds of output NDFs [AUTO]
  • title (str) – Title for the output NDFs [Output from TRANNDF]
  • transform (TRN) – Transformation structure
  • ubound (List[float]) – Upper bounds of the output NDFs [Dynamic default]
  • usewcs (bool) – Use AST framesets [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_TRANNDF for full documentation of this command in the latest Starlink release

starlink.ccdpack.wcsedit(in_, mode, frame, **kwargs)[source]¶

Modifies or examines WCS components of a set of images.

Runs the command: $CCDPACK_DIR/wcsedit .

Parameters:
  • in_ (str) – NDFs with WCS components to be accessed
  • mode (str) – Action to perform (CURRENT,ADD,REMOVE,SET,SHOW) [CURRENT]
  • frame (str) – Basis frame in WCS component [!]
Keyword Arguments:
 
  • coeffs (List[float]) – Coefficients to define mapping
  • domain (str) – Name of new domain [CCD_WCSEDIT]
  • epoch (float) – Epoch of basis frame
  • forexp (str) – MathMap forward mapping expressions
  • invert (bool) – Use inverse mapping? [FALSE]
  • invexp (str) – MathMap inverse mapping expressions
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • maptype (str) – Type of mapping (UNIT,LINEAR,PINCUSHION,MATH) [UNIT]
  • namelist (str) – Output file name for list of successfully accessed images [WCSEDIT.LIS]
  • set (str) – String for setting frame attributes
  • simpfi (bool) – Simplify forward followed by inverse to unit? [TRUE]
  • simpif (bool) – Simplify inverse followed by forward to unit? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_WCSEDIT for full documentation of this command in the latest Starlink release

starlink.ccdpack.wcsreg(in_, domains, **kwargs)[source]¶

Aligns images using multiple attached coordinate systems

Runs the command: $CCDPACK_DIR/wcsreg .

Parameters:
  • in_ (str) – NDFs to align
  • domains (List[str]) – Ordered list of domains to align by [!]
Keyword Arguments:
 
  • logfile (str) – Logfile name [CCDPACK.LOG]
  • logto (str) – Write log to (Logfile,Terminal,Neither,Both) [BOTH]
  • namelist (str) – Name of successfully registered files listing [wcsreg.lis]
  • outdomain (str) – Name of output alignment frame domain [CCD_WCSREG]
  • override (bool) – Continue when not all NDFs can be aligned [FALSE]
  • refpos (int) – Position of reference set [1]
  • useset (bool) – Should Set information (CCD_SET frames) take precedence? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_WCSREG for full documentation of this command in the latest Starlink release

starlink.ccdpack.xreduce(*args, **kwargs)[source]¶

Starts the automated CCD data reduction GUI.

Runs the command: $CCDPACK_DIR/xreduce .

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun139.htx/sun139.html?xref_XREDUCE for full documentation of this command in the latest Starlink release

starlink.convert module¶

Runs commands from the Starlink CONVERT 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)

starlink.convert.ascii2ndf(in_, out, **kwargs)[source]¶

Converts a text file to an NDF.

Runs the command: $CONVERT_DIR/ascii2ndf .

Parameters:
  • in_ (str,filename) – ASCII file
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • comp (str) – Array component to copy from the ASCII file [“Data”]
  • skip (int) – Number of records to skip [0]
  • shape (int) – Shape of the output NDF
  • type (str) – Interim data type required [dyn.]
  • fits (bool) – Read a FITS header from the ASCII file? [FALSE]
  • maxlen (int) – Maximum length in bytes of text-file records [512]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_ASCII2NDF for full documentation of this command in the latest Starlink release

starlink.convert.ast2ndf(*args, **kwargs)[source]¶

Converts an Asterix data cube into a simple NDF.

Runs the command: $CONVERT_DIR/ast2ndf .

Keyword Arguments:
 
  • in_ (str) – input Asterix file:
  • out (str,filename) – output cube:

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_AST2NDF for full documentation of this command in the latest Starlink release

starlink.convert.da2ndf(in_, out, **kwargs)[source]¶

Converts a direct-access unformatted file to an NDF.

Runs the command: $CONVERT_DIR/da2ndf .

Parameters:
  • in_ (str,filename) – Direct-access unformatted file
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • comp (str) – Array component to copy from the unformatted file [“Data”]
  • noperec (int) – Number of data values per unformatted record
  • shape (int) – Shape of the output NDF
  • type (str) – NDF data type required [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_DA2NDF for full documentation of this command in the latest Starlink release

starlink.convert.dst2ndf(in_, out, **kwargs)[source]¶

Converts a Figaro (Version 2) DST file to an NDF.

Runs the command: $CONVERT_DIR/dst2ndf .

Parameters:
  • in_ (str) – Name of Figaro (.DST) file to be converted
  • out (str,filename) – Name of output NDF
Keyword Arguments:
 

form (str) – Storage form of the NDF data and variance arrays [“Simple”]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_DST2NDF for full documentation of this command in the latest Starlink release

starlink.convert.fits2ndf(in_, out, **kwargs)[source]¶

Converts FITS files into NDFs.

Runs the command: $CONVERT_DIR/fits2ndf .

Parameters:
  • in_ (str) – Input FITS file(s)
  • out (str) – Output NDF data structure(s)
Keyword Arguments:
 
  • fmtcnv (str) – Apply BSCALE and BZERO to data values in the FITS file(s)? [“TRUE”]
  • logfile (str,filename) – Filename to store FITS headers [!]
  • container (bool) – Create a container file? [FALSE]
  • encodings (str) – FITS keywords to use when creating NDF WCS components [!]
  • extable (str,filename) – Table of extension specifiers [!]
  • proexts (bool) – Propagate the extensions of the FITS file? [TRUE]
  • profits (bool) – Create a NDF extension called FITS to store the headers? [TRUE]
  • type (str) – HDS data type of NDF [!]
  • wcsattrs (str) – Attributes for WCS conversion [!]
  • wcscomp (str) – Destination for world c-ordinate information [“WCS”]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_FITS2NDF for full documentation of this command in the latest Starlink release

starlink.convert.ircam2ndf(in_, prefix, obs, **kwargs)[source]¶

Converts an IRCAM data file to a series of NDFs.

Runs the command: $CONVERT_DIR/ircam2ndf .

Parameters:
  • in_ (IRCAM) – Name of IRCAM file to be converted
  • prefix (str) – Data-array configuration to copy [STARE]
  • obs (List[str]) – List of observations to convert [*]
Keyword Arguments:
 
  • config (str) – Data-array configuration to copy [“STARE”]
  • fmtcnv (bool) – Apply non-null scale and zero? [FALSE]
  • out (str,filename) – Name of output NDF

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_IRCAM2NDF for full documentation of this command in the latest Starlink release

starlink.convert.ndf2ascii(in_, out, **kwargs)[source]¶

Converts an NDF to a text file.

Runs the command: $CONVERT_DIR/ndf2ascii .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – ASCII file
Keyword Arguments:
 
  • comp (str) – Array component to copy to the ASCII file [“Data”]
  • reclen (int) – Maximum recordsize of the ASCII file. [dyn.]
  • fits (bool) – Write a FITS header in the ASCII file? [FALSE]
  • fixed (bool) – Fixed format of the array values? [FALSE]
  • noperec (int) – Number of data values per ASCII record

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2ASCII for full documentation of this command in the latest Starlink release

starlink.convert.ndf2da(in_, out, **kwargs)[source]¶

Converts an NDF to a direct-access unformatted file.

Runs the command: $CONVERT_DIR/ndf2da .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Unformatted direct-access file
Keyword Arguments:
 
  • comp (str) – Array component to copy to the unformatted file [“Data”]
  • noperec (int) – Number of data values per output record [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2DA for full documentation of this command in the latest Starlink release

starlink.convert.ndf2dst(in_, out, **kwargs)[source]¶

Converts an NDF to a Figaro (Version 2) DST file.

Runs the command: $CONVERT_DIR/ndf2dst .

Parameters:
  • in_ (str,filename) – NDF to be converted
  • out (str) – Name of output Figaro file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2DST for full documentation of this command in the latest Starlink release

starlink.convert.ndf2fits(in_, out, **kwargs)[source]¶

Converts NDFs into FITS files.

Runs the command: $CONVERT_DIR/ndf2fits .

Parameters:
  • in_ (str) – Input NDF data structure(s)
  • out (str) – Output FITS file(s)
Keyword Arguments:
 
  • comp (str) – Array components to copy to the FITS file(s) [“A”]
  • bitpix (str) – Number of bits per pixel [0]
  • origin (str) – Origin of the FITS files (for the FITS header) [!]
  • allowtab (bool) – Permit use of the TAB algorithm of FITS WCS? [TRUE]
  • axisorder (str) – The order for the WCS axes in the FITS file [!]
  • checksum (bool) – Write CHECKSUM and DATASUM headers? [TRUE]
  • container (bool) – Are the input files multi-NDF containers? [FALSE]
  • duplex (bool) – Merge the NDF FITS airlock in the FITS header for all array components? [FALSE]
  • encoding (str) – Encoding to use for WCS information [“Auto”]
  • merge (bool) – Merge the .HEADER NDF with the data NDF? [TRUE]
  • native (bool) – Include a native WCS encoding in the FITS header? [FALSE]
  • proexts (bool) – Propagate the NDF extensions? [FALSE]
  • profits (bool) – Merge the FITS extension of the NDF in the FITS header? [TRUE]
  • prohis (bool) – Relay any NDF history information to the FITS header? [TRUE]
  • provenance (str) – Storage of provenance information [“None”]
  • useaxis (bool) – Should AXIS information be stored in a FITS -TAB table? [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2FITS for full documentation of this command in the latest Starlink release

starlink.convert.ndf2gasp(in_, out, **kwargs)[source]¶

Converts a two-dimensional NDF into a GASP image.

Runs the command: $CONVERT_DIR/ndf2gasp .

Parameters:
  • in_ (str,filename) – Input NDF image?
  • out (str) – Output GASP image (.dat suffix not required)
Keyword Arguments:
 

fillbad (int) – [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2GASP for full documentation of this command in the latest Starlink release

starlink.convert.ndf2pgm(in_, out, **kwargs)[source]¶

Converts an NDF into a PBMPLUS-style PGM-format file.

Runs the command: $CONVERT_DIR/ndf2pgm .

Parameters:
  • in_ (str,filename) – NDF to convert
  • out (str) – PGM filename

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2PGM for full documentation of this command in the latest Starlink release

starlink.convert.ndf2tiff(*args, **kwargs)[source]¶

Converts an NDF into an 8-bit TIFF-6.0-format file.

Runs the command: $CONVERT_DIR/ndf2tiff .

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2TIFF for full documentation of this command in the latest Starlink release

starlink.convert.ndf2unf(in_, out, **kwargs)[source]¶

Converts an NDF to a sequential unformatted file.

Runs the command: $CONVERT_DIR/ndf2unf .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Sequential unformatted file
Keyword Arguments:
 
  • comp (str) – Array component to copy to the unformatted file [“Data”]
  • noperec (int) – Number of data values per output record [dyn.]
  • fits (bool) – Write a FITS header in the unformatted file? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2UNF for full documentation of this command in the latest Starlink release

starlink.convert.specx2ndf(*args, **kwargs)[source]¶

Converts a SPECX map into a simple data cube, or SPECX data files

Runs the command: $CONVERT_DIR/specx2ndf .

Keyword Arguments:
 
  • in_ (str,filename) – Input SPECX map
  • out (str,filename) – Output NDF cube
  • gridfile (str) – Map schematic file [!]
  • telescope (str) – Telescope [“JCMT”]
  • latitude (str) – Geodetic (geographic) latitude of telescope [“19:49:33”]
  • longitude (str) – Geodetic (geographic) longitude of telescope [“155:28:47”]
  • axis (bool) – Create AXIS structures? [FALSE]
  • system (str) – Celestial co-ordinate system for output cube [“RJ”]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_SPECX2NDF for full documentation of this command in the latest Starlink release

starlink.convert.unf2ndf(in_, out, **kwargs)[source]¶

Converts a sequential unformatted file to an NDF.

Runs the command: $CONVERT_DIR/unf2ndf .

Parameters:
  • in_ (str,filename) – Sequential unformatted file
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • comp (str) – Array component to copy from the unformatted file [“Data”]
  • noperec (int) – Number of data values per unformatted record
  • skip (int) – Number of records to skip [0]
  • shape (int) – Shape of the output NDF
  • type (str) – NDF data type required [dyn.]
  • fits (bool) – Read a FITS header from the unformatted file? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_UNF2NDF for full documentation of this command in the latest Starlink release

starlink.cupid module¶

Runs commands from the Starlink CUPID 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)

starlink.cupid.clumpinfo(ndf, **kwargs)[source]¶

Obtain information about one or more previously identified clumps.

Runs the command: $CUPID_DIR/clumpinfo .

Parameters:

ndf (str,filename) – Input NDF containing clump identifications

Keyword Arguments:
 
  • clumps (str) – The indices of the clumps to use [ALL]
  • quiet (bool) – Supress screen output? [FALSE]
Returns:

  • flbnd (List[float])
  • fubnd (List[float])
  • lbound (List[int])
  • nclumps (int)
  • ubound (List[int])

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun255.htx/sun255.html?xref_CLUMPINFO for full documentation of this command in the latest Starlink release

starlink.cupid.cupidhelp(*args, **kwargs)[source]¶

Display information about CUPID.

Runs the command: $CUPID_DIR/cupidhelp .

Keyword Arguments:
 
  • topic (str) – Help topic [” “]
  • subtopic (str) – Help subtopic [” “]
  • subsubtopic (str) – Help subsubtopic [” “]
  • subsubsubtopic (str) – Help subsubsubtopic [” “]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun255.htx/sun255.html?xref_CUPIDHELP for full documentation of this command in the latest Starlink release

starlink.cupid.extractclumps(mask, data, out, outcat, **kwargs)[source]¶

Extract previously identified clumps of emission from an NDF.

Runs the command: $CUPID_DIR/extractclumps .

Parameters:
  • mask (str,filename) – Input mask NDF
  • data (str,filename) – Input data NDF
  • out (str,filename) – Output mask NDF
  • outcat (str) – Output catalogue
Keyword Arguments:
 
  • backoff (bool) – Remove background when finding clump sizes? [TRUE]
  • deconv (bool) – Correct clump parameters for beam smoothing? [TRUE]
  • fwhmbeam (float) – Spatial beam width in pixels [dyn.]
  • jsacat (str) – Output JSA-style catalogue [!]
  • logfile (str) – Name of output log file [!]
  • shape (str) – Spatial clump shape in output catalogue [dyn.]
  • velores (float) – Velocity resolution in channels [dyn.]
  • wcspar (bool) – Use WCS units in the output catalogue? [dyn.]
Returns:

nclumps (int)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun255.htx/sun255.html?xref_EXTRACTCLUMPS for full documentation of this command in the latest Starlink release

starlink.cupid.findback(in_, out, **kwargs)[source]¶

Estimate the background in an NDF by removing small scale structure.

Runs the command: $CUPID_DIR/findback .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output NDF
Keyword Arguments:
 
  • box (List[int]) – Filter dimensions, in pixels [9]
  • msg_filter (str) – Information level [NORM]
  • newalg (bool) – Use experimental algorithm variations? [FALSE]
  • rms (float) – RMS noise level
  • sub (bool) – Subtract background from input data? [FALSE]
  • wlim (float) – Weight limit for good output pixels [0.3]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun255.htx/sun255.html?xref_FINDBACK for full documentation of this command in the latest Starlink release

starlink.cupid.findclumps(in_, out, **kwargs)[source]¶

Identify clumps of emission within a 1, 2 or 3 dimensional NDF.

Runs the command: $CUPID_DIR/findclumps .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output NDF
Keyword Arguments:
 
  • outcat (str) – Output KAPPA-style catalogue [!]
  • method (str) – Clump identification algorithm [current value]
  • backoff (bool) – Remove background when finding clump sizes? [dyn.]
  • config (str) – Algorithm tuning parameters [current value]
  • deconv (bool) – Correct clump parameters for beam smoothing? [TRUE]
  • jsacat (str) – Output JSA-style catalogue [!]
  • logfile (str) – Name of output log file [!]
  • msg_filter (str) – Information level [NORM]
  • perspectrum (bool) – Process spectra independently of neighbouring spectra? [FALSE]
  • qout (str,filename) – Copy of input NDF with Quality mask [!]
  • repconf (bool) – Report supplied configuration? [current value]
  • rms (float) – RMS noise level
  • shape (str) – Spatial clump shape in output catalogue [dyn.]
  • wcspar (bool) – Use WCS units in the output catalogue? [dyn.]
Returns:

nclumps (int)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun255.htx/sun255.html?xref_FINDCLUMPS for full documentation of this command in the latest Starlink release

starlink.cupid.makeclumps(out, outcat, **kwargs)[source]¶

Create simulated data containing clumps and noise.

Runs the command: $CUPID_DIR/makeclumps .

Parameters:
  • out (str,filename) – Output NDF
  • outcat (str) – Output catalogue
Keyword Arguments:
 
  • angle (List[float]) – Mean and width of spatial position angles in degs [current value]
  • beamfwhm (float) – Spatial FWHM of instrument beam in pixels [current value]
  • deconv (bool) – Correct clump parameters for beam smoothing? [TRUE]
  • fwhm1 (List[float]) – Mean and width of FWHMs on pixel axis 1 in pixels [current value]
  • fwhm2 (List[float]) – Mean and width of FWHMs on pixel axis 2 in pixels [current value]
  • fwhm3 (List[float]) – Mean and width of FWHMs on pixel axis 3 in pixels [current value]
  • grid (int) – Margin to place round outside of regular grid [!]
  • lbnd (List[int]) – Lower pixel bounds of output array [1,1]
  • like (str,filename) – An NDF to define the output WCS [!]
  • model (str,filename) – Output NDF without noise
  • nclump (List[int]) – Number of clumps to create [50]
  • pardist (str) – Parameter distribution [current value]
  • peak (List[float]) – Mean and width of clump peak values [current value]
  • precat (bool) – Create catalogue before instrumental smoothing is applied? [FALSE]
  • rms (float) – RMS noise to add to data [current value]
  • shape (str) – Spatial clump shape in output catalogue [“None”]
  • trunc (float) – Truncation level for clumps [current value]
  • ubnd (List[int]) – Upper pixel bounds of output array [200,200]
  • velfwhm (float) – FWHM of velocity resolution in pixels [current value]
  • vgrad1 (List[float]) – Mean and width of vel. gradient on axis 1 [current value]
  • vgrad2 (List[float]) – Mean and width of vel. gradient on axis 2 [current value]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun255.htx/sun255.html?xref_MAKECLUMPS for full documentation of this command in the latest Starlink release

starlink.cupid.outlineclump(*args, **kwargs)[source]¶

Draw an outline around a 2-dimensional clump identified by CUPID.

Runs the command: $CUPID_DIR/outlineclump.csh .

Keyword Arguments:
 
  • index – The integer index or indices of the clumps to be identified. For multiple indices supply a comma-separated list, using hyphens to express ranges. For example “2,4-6,9” would draw the outlines of clumps with indices 2, 4, 5, 6, and 9.
  • ndf – The name of the NDF containing the clump information. This NDF should have been created using the CUPID:FINDCLUMPS or CUPID:EXTRACTCLUMPS command. The clump cut-out images contained in the CUPID extension of this NDF will be used to define the outline of the clump.
  • style –

    A group of attribute settings describing the plotting style to use for the outline.

    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 overriding 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 clump outline 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/sun255.htx/sun255.html?xref_OUTLINECLUMP for full documentation of this command in the latest Starlink release

starlink.figaro module¶

Runs commands from the Starlink Figaro 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)

starlink.figaro.abconv(spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/abconv .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to convert to AB magnitudes
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ABCONV for full documentation of this command in the latest Starlink release

starlink.figaro.abline(spectrum, contin, sig, itn, deg, width, contout, **kwargs)[source]¶

Runs the command: $FIG_DIR/abline .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum with lines to be fitted
  • contin (str,filename) – (COntin) File containing precomputed continuum
  • sig (float) – (SIG) Multiple of sigma for continuum point rejection
  • itn (float) – (ITN) Number of iterations for continuum point rejection
  • deg (float) – (DEG) Degree of polynomial for continuum fit
  • width (float) – (WIdth) Wavelength range to display at one time
  • contout (str,filename) – (CONTout) Output continuum file name
Keyword Arguments:
 
  • cmd (str) – 123.4,Sig,Deg,Itn,(No)Limit,Width,Cont,Fit,Recont,Quit,Help
  • comment (str) – Comment for hardcopy
  • hard (str) – [ ]
  • hardcopy (bool) – Produce hardcopy plot
  • limit (bool) – (LImit) Set line limits at indicated points?
  • linename (str) – Name of this line
  • newcont (bool) – (NEWcont) Output continuum to file?
  • oldcont (bool) – (OLDcont) Use precomputed continuum?
  • soft (str) – [ ]
Returns:

  • high (float)
  • low (float)
  • tvcolor (float)
  • tvfile (str)
  • tvhigh (float)
  • tvlow (float)
  • tvxen (float)
  • tvxst (float)
  • xend (float)
  • xstart (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ABLINE for full documentation of this command in the latest Starlink release

starlink.figaro.adjoin(spectrum, spectrum1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/adjoin .

Parameters:
  • spectrum (str,filename) – (SPectrum) First of the two spectra to be adjoined
  • spectrum1 (str,filename) – (SPECTRUM1) 2nd of the two spectra to be adjoined
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ADJOIN for full documentation of this command in the latest Starlink release

starlink.figaro.alasin(alasfile, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/alasin .

Parameters:
  • alasfile (str) – (ALASfile) Name of input ALAS format file
  • spectrum (str,filename) – (SPECtrum) Figaro format output spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ALASIN for full documentation of this command in the latest Starlink release

starlink.figaro.alasout(spectrum, xstart, xend, alasfile, **kwargs)[source]¶

Runs the command: $FIG_DIR/alasout .

Parameters:
  • spectrum (str,filename) – (SPECtrum) Spectrum to be converted to ALAS format
  • xstart (float) – (XSTart) First X value to be converted
  • xend (float) – (XEnd) Last X value to be converted
  • alasfile (str) – (ALASfile) Name of output ALAS format file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ALASOUT for full documentation of this command in the latest Starlink release

starlink.figaro.aperture(output, image, opt, low, high, radius, **kwargs)[source]¶

Runs the command: $FIG_DIR/aperture .

Parameters:
  • output (str) – (OUTPUT) Name of output file
  • image (str,filename) – (IMAGE) Name of input frame
  • opt (str) – (OPT) Type option
  • low (float) – (LOW) Low data value for 2-d plot
  • high (float) – (HIGH) High data value for 2-d plot
  • radius (float) – (RADIUS) Radius of circle
Keyword Arguments:
 
  • idev (str) – [ ]
  • ok (bool) – Hit <return> to restore 2-d plot

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_APERTURE for full documentation of this command in the latest Starlink release

starlink.figaro.arc(spectrum, arctype, sigma, order, arfile, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/arc .

Parameters:
  • spectrum (str,filename) – (SPectrum) Arc spectrum to be fitted
  • arctype (str) – (ARctype) Type of arc
  • sigma (float) – (SIgma) Arc line half width in pixels
  • order (float) – (ORder) Polynomial order for 1st fit
  • arfile (str) – (ARFile) Name of file giving previous fit
  • output (str,filename) – (OUtput) Resulting arc file with wavelength fit
Keyword Arguments:
 
  • chfact (float) – New value for CHFACT
  • cmd (str) – Fit,Order,Disp,Help,Edit,Reselect,Quit,Print,Auto,Xauto,Modify
  • disnchan (float) – Length of displayed sections
  • hard (str) – [ ]
  • hardarc (bool) – Do a hard plot of the arc
  • hardisp (bool) – Do a hard plot of the dispersion curve
  • lineno (float) – Edit which line, zero to end edit
  • lineok (bool) – Correct?
  • movetox (float) – X-value
  • previous (bool) – (PREvious) Use arc lines from previous fit?
  • quitsel (bool) – Quit line selection
  • resolve (str) – How is double ID to be resolved (N/O/S)
  • sigfact (float) – New value for SIGFACT
  • soft (str) – [ ]
  • wavelen (str) – Wavelength, blank to cancel line
  • writearc (bool) – Create and output file using this fit
  • xcorr (bool) – (XCorr) Determine relative shift & redetermine centers?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ARC for full documentation of this command in the latest Starlink release

starlink.figaro.arc2d(image, arc_opts, ystart, yend, yblock, iteration, order, maxlines, clfile, **kwargs)[source]¶

Runs the command: $FIG_DIR/arc2d .

Parameters:
  • image (str) – Name of image for input
  • arc_opts (str) – Enter arc fit option
  • ystart (int) – analysis lower limit
  • yend (int) – analysis upper limit
  • yblock (int) – Enter analysis x-sect width
  • iteration (int) – New value of iteration
  • order (int) – order for polynomial fitting
  • maxlines (int) – Maximum number of lines to allow room for
  • clfile (str) – Name of image for cloning from
Keyword Arguments:
 
  • tols (str) – For use in batch only [dyn.]
  • keep_itt (bool) – keep itteration files [dyn.]
  • prfits (bool) – Print out details of fitting [dyn.]
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ARC2D for full documentation of this command in the latest Starlink release

starlink.figaro.arcdisp(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/arcdisp .

Parameters:

in_ (str,filename) – The input NDF

Keyword Arguments:
 
  • order (, 1- 7) – Polynomial order for dispersion curve [2]
  • device (GRAPHICS) – Graphics device
  • dialog (str) – Allow extensive graphical interaction [‘G’]
  • fdb (str,filename) – Feature data base NDF
  • wrange (List[float]) – Laboratory value range for this row

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ARCDISP for full documentation of this command in the latest Starlink release

starlink.figaro.arcgendb(in_, fdb, **kwargs)[source]¶

Runs the command: $FIG_DIR/arcgendb .

Parameters:
  • in_ (str,filename) – Input file with ASCII line list
  • fdb (str,filename) – Output NDF for feature data base
Keyword Arguments:
 

info (bool) – Issue informational messages [YES]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ARCGENDB for full documentation of this command in the latest Starlink release

starlink.figaro.arcident(in_, out, fdb, **kwargs)[source]¶

Runs the command: $FIG_DIR/arcident .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output NDF
  • fdb (str,filename) – Feature data base NDF
Keyword Arguments:
 
  • drange (List[float]) – Safe dispersion interval [dyn.]
  • echelle (bool) – Split WRANGE, assuming orders of echellogram [dyn.]
  • info (bool) – Issue informational messages [YES]
  • maxloc (int) – Maximum number of features used for identification [30]
  • minids (int) – Minimum number of feature identifications to accept solution [9]
  • neighb (List[int]) – Start and maximum number of neighbours considered [3,6]
  • strength (, 1.- 1E30) – Maximum strength ratio [50.0]
  • thresh (, 0.01- 0.2) – Distance ratio match tolerance [0.03]
  • wrange (List[float]) – Approximate lab value range

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ARCIDENT for full documentation of this command in the latest Starlink release

starlink.figaro.arclocat(in_, fwhm, thresh, **kwargs)[source]¶

Runs the command: $FIG_DIR/arclocat .

Parameters:
  • in_ (str,filename) – The input NDF
  • fwhm (, 2.- 1E30) – Feature width
  • thresh (, 1E-30- 1E30) – Minimum feature strength
Keyword Arguments:
 
  • device (GRAPHICS) – Graphics device
  • dialog (str) – Allow extensive graphical interaction [‘G’]
  • info (bool) – Issue informational messages [YES]
  • mode (str) – Gauss or triangle features [‘Gauss’]
  • rownum (int) – Number of row to work on next

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ARCLOCAT for full documentation of this command in the latest Starlink release

starlink.figaro.arcsdi(image, clfile, arc_opts, output, ystart, yend, yblock, iteration, order, maxlines, **kwargs)[source]¶

Runs the command: $FIG_DIR/arcsdi .

Parameters:
  • image (str) – Name of image for input
  • clfile (str) – Name of image for cloning from
  • arc_opts (str) – Enter arc fit option
  • output (str) – Name of output file
  • ystart (int) – analysis lower limit
  • yend (int) – analysis upper limit
  • yblock (int) – Enter analysis x-sect width
  • iteration (int) – New value of iteration
  • order (int) – order for polynomial fitting
  • maxlines (int) – Maximum number of lines to allow room for
Keyword Arguments:
 
  • tols (str) – For use in batch only [dyn.]
  • keep_itt (bool) – keep itteration files [dyn.]
  • prfits (bool) – Print out details of fitting [dyn.]
  • plotcorr (bool) – Plot correction?
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ARCSDI for full documentation of this command in the latest Starlink release

starlink.figaro.ascin(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/ascin .

Parameters:

in_ (str,filename) – ASCII input file

Keyword Arguments:
 
  • lines (List[int]) – Line number range [1,9999]
  • bad (float) – Bad value as used in table [-999999.]
  • colaxes (List[int]) – Columns to read axis data from [1,2]
  • coldata (List[int]) – Columns to read data and errors from [3,0]
  • colwidth (int) – Column to read pixel width from [0]
  • end (List[float]) – Data end values
  • info (bool) – Issue informational messages [YES]
  • out (str,filename) – Output NDF
  • start (List[float]) – Data start values
  • step (List[float]) – Pixel step values
  • tol (, 0.- .5) – Table/pixel coordinate mismatch tolerance [0.2]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ASCIN for full documentation of this command in the latest Starlink release

starlink.figaro.ascout(in_, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/ascout .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output ASCII file
Keyword Arguments:
 
  • bad (float) – Table value to replace bad values [-999999.0]
  • width (bool) – Write also the pixel widths [NO]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ASCOUT for full documentation of this command in the latest Starlink release

starlink.figaro.bbody(temp, **kwargs)[source]¶

Runs the command: $FIG_DIR/bbody .

Parameters:

temp (, 1E-35- 1E+35) – Black body temperature in K

Keyword Arguments:
 
  • errtemp (, 1E-35- 1E+35) – Error on the Black body temperature in K [dyn.]
  • in_ (str,filename) – Input NDF [!]
  • logar (bool) – Write logarithms of intensity [NO]
  • out (str,filename) – Output NDF
  • xend (float) – Spectroscopic axis end value
  • xlabel (str) – Label for spectroscopic axis [wavelength]
  • xstart (float) – Spectroscopic axis start value
  • xstep (float) – Spectroscopic axis increment
  • xunit (str) – Unit for spectroscopic axis

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_BBODY for full documentation of this command in the latest Starlink release

starlink.figaro.bclean(image, nbrows, brows, crsig, crfact, crminv, crsharpness, brfact, brpass, degfix, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/bclean .

Parameters:
  • image (str,filename) – (IMage) Image to be cleaned
  • nbrows (float) – (NBRows) Number of bad rows to be cleaned
  • brows (float) – (BRows) Bad rows
  • crsig (float) – (CRSig) Cosmic ray sigma cutoff
  • crfact (float) – (CRFact) Cosmic ray fractional cutoff
  • crminv (float) – (CRMinv) Cosmic ray minimum excess value
  • crsharpness (float) – (CRSharpness) Cosmic ray minimum sharpness value
  • brfact (float) – (BRFact) Bad row fractional cutoff
  • brpass (float) – (BRPass) Number of passes in bad row search
  • degfix (float) – (DEGfix) Polynomial degree for interpolation
  • output (str,filename) – (OUTput) Name of cleaned image
Keyword Arguments:
 
  • autorow (bool) – (AUTOrow) Perform automatic search for bad lines?
  • direction (float) – (DIRECTion) Interp. direction (-1=rows, 1=columns, 0=best)
  • fix (bool) – (FIx) Fix up the bad lines and cosmic rays?
  • sharpness (bool) – (SHarpness) Perform sharpness test on cosmic rays?
  • textfile (bool) – (TExtfile) Produce a text file of cosmic ray results?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_BCLEAN for full documentation of this command in the latest Starlink release

starlink.figaro.bfft(cdata, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/bfft .

Parameters:
  • cdata (str,filename) – (CData) Data to be Fourier transformed
  • output (str,filename) – (OUtput) Resulting transformed data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_BFFT for full documentation of this command in the latest Starlink release

starlink.figaro.bsmult(spectrum, bstar, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/bsmult .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be B-star calibrated
  • bstar (str,filename) – (BStar) B-star calibration spectrum
  • output (str,filename) – (OUTput) Resulting spectrum
Keyword Arguments:
 

beta (float) – (BEta) Power to which airmass ratio is raised

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_BSMULT for full documentation of this command in the latest Starlink release

starlink.figaro.cadd(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cadd .

Parameters:
  • image (str) – Name of image for input
  • output (str) – OUTput Name of output file
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CADD for full documentation of this command in the latest Starlink release

starlink.figaro.caldiv(standard, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/caldiv .

Parameters:
  • standard (str,filename) – (STAndard) Absolute continuum standard spectrum
  • spectrum (str,filename) – (SPEctrum) Observed spectrum of standard
  • output (str,filename) – (OUTput) Output instrumental response spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CALDIV for full documentation of this command in the latest Starlink release

starlink.figaro.ccdlin(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ccdlin .

Parameters:
  • image (str,filename) – (IMage) Name of image to be corrected
  • output (str,filename) – (OUTput) Name of resulting image
Keyword Arguments:
 
  • alpha (float) – (ALpha) Linearity constant
  • cbias (float) – (CBias) Bias value to be used

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CCDLIN for full documentation of this command in the latest Starlink release

starlink.figaro.ccur(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/ccur .

Keyword Arguments:
 
  • screen (bool) – (Screen) Use screen formatting for terminal? [dyn.]
  • soft (str) – [ ]
  • tvfile (str) – [ ]
  • tvhigh (float) – [0.]
  • tvlow (float) – [0.]
  • tvxen (float) – [0.]
  • tvxst (float) – [0.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CCUR for full documentation of this command in the latest Starlink release

starlink.figaro.cdist(image, ystart, yend, output, maxdegy, **kwargs)[source]¶

Runs the command: $FIG_DIR/cdist .

Parameters:
  • image (str,filename) – (IMage) Image to be corrected for S-distortion
  • ystart (float) – (YStart) First Y value in range to be corrected
  • yend (float) – (YEnd) Last Y value in range to be corrected
  • output (str,filename) – (OUTput) Name of resulting image
  • maxdegy (float) – (MAXdegy) Maximum degree polynomial to be used
Keyword Arguments:
 

rotate (bool) – (ROTate) Try to minimise paging by prior rotation? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CDIST for full documentation of this command in the latest Starlink release

starlink.figaro.centers(image, aperture, xoff, yoff, **kwargs)[source]¶

Runs the command: $FIG_DIR/centers .

Parameters:
  • image (str,filename) – (IMage) Name of Image data
  • aperture (float) – (APerture) Size of aperture for centroiding
  • xoff (float) – (Xoff) Offset in X to add to positions
  • yoff (float) – (Yoff) Offset in Y to add to positions
Keyword Arguments:
 
  • chgprof (bool) – Change profile display parameters
  • disprof (bool) – Display radial profile
  • npixels (float) – [0.]
  • pfile (bool) – (PFile) Record radial profiles in a listing file?
  • profbox (float) – Size of profile “box”
  • profmax (float) – Maximum displayed value
  • profmin (float) – Minimum displayed value
  • soft (str) – [ ]
  • xpixels (float) – [0.]
  • ypixels (float) – [0.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CENTERS for full documentation of this command in the latest Starlink release

starlink.figaro.cfit(output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cfit .

Parameters:

output (str,filename) – (OUtput) Output file for interpolated data

Keyword Arguments:
 
  • change (bool) – Modify points
  • redraw (bool) – Redraw original spectrum
  • soft (str) – [ ]
  • tvcolor (float) – [0.]
  • tvfile (str) – [ ]
  • tvhigh (float) – [0.]
  • tvlow (float) – [0.]
  • tvxen (float) – [0.]
  • tvxst (float) – [0.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CFIT for full documentation of this command in the latest Starlink release

starlink.figaro.changed(image, image2, **kwargs)[source]¶

Runs the command: $FIG_DIR/changed .

Parameters:
  • image (str) – Name of image for input
  • image2 (str) – Name of image for input
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CHANGED for full documentation of this command in the latest Starlink release

starlink.figaro.clean(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/clean .

Parameters:
  • image (str,filename) – (IMage) Name of image to be grey-scaled
  • output (str,filename) – (OUTput) Name of resulting image
Keyword Arguments:
 
  • deg (float) – Degree of fit to use for interpolation
  • high (float) – Highest displayed data value
  • idev (str) – [0.]
  • low (float) – Lowest displayed data value
  • quit (bool) – Terminate cleaning process
  • xsize (float) – Side of box deleted by “X” and “Y”, in X
  • ysize (float) – Side of box deleted by “X” and “Y”, in Y
Returns:

  • imarray (float)
  • imfile (str)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CLEAN for full documentation of this command in the latest Starlink release

starlink.figaro.clip(image, lowclip, highclip, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/clip .

Parameters:
  • image (str,filename) – (IMage) Name of image to be clipped
  • lowclip (float) – (LOwclip) Low threshold
  • highclip (float) – (HIghclip) High threshold
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CLIP for full documentation of this command in the latest Starlink release

starlink.figaro.cmplx2i(cdata, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplx2i .

Parameters:
  • cdata (str,filename) – (CData) Complex data containing the imaginary array
  • output (str,filename) – (OUTput) Resulting (non-complex) data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLX2I for full documentation of this command in the latest Starlink release

starlink.figaro.cmplx2m(cdata, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplx2m .

Parameters:
  • cdata (str,filename) – (CData) Complex data containing the modulus array
  • output (str,filename) – (OUTput) Resulting (non-complex) data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLX2M for full documentation of this command in the latest Starlink release

starlink.figaro.cmplx2r(cdata, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplx2r .

Parameters:
  • cdata (str,filename) – (CData) Complex data from which to take real array
  • output (str,filename) – (OUTput) Resulting (non-complex) data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLX2R for full documentation of this command in the latest Starlink release

starlink.figaro.cmplxadd(cdata, cdata1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplxadd .

Parameters:
  • cdata (str,filename) – (CData) Name of first complex structure
  • cdata1 (str,filename) – (CDATA1) Name of second complex structure
  • output (str,filename) – (OUTput) Name of resulting complex structure

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLXADD for full documentation of this command in the latest Starlink release

starlink.figaro.cmplxconj(cdata, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplxconj .

Parameters:
  • cdata (str,filename) – (CData) Name of complex structure
  • output (str,filename) – (OUTput) Name of resulting complex conjugate

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLXCONJ for full documentation of this command in the latest Starlink release

starlink.figaro.cmplxdiv(cdata, cdata1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplxdiv .

Parameters:
  • cdata (str,filename) – (CData) Name of first complex structure
  • cdata1 (str,filename) – (CDATA1) Name of complex divisor structure
  • output (str,filename) – (OUTput) Name of resulting complex structure

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLXDIV for full documentation of this command in the latest Starlink release

starlink.figaro.cmplxfilt(cdata, lowcut, hicut, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplxfilt .

Parameters:
  • cdata (str,filename) – (CData) Template complex data structure
  • lowcut (float) – (LOwcut) Low cutoff point for filter
  • hicut (float) – (HIcut) High cutoff point for filter
  • output (str,filename) – (OUTput) Resulting complex filter

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLXFILT for full documentation of this command in the latest Starlink release

starlink.figaro.cmplxmult(cdata, cdata1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplxmult .

Parameters:
  • cdata (str,filename) – (CData) Name of first complex structure
  • cdata1 (str,filename) – (CDATA1) Name of second complex structure
  • output (str,filename) – (OUTput) Name of resulting complex structure

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLXMULT for full documentation of this command in the latest Starlink release

starlink.figaro.cmplxsub(cdata, cdata1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cmplxsub .

Parameters:
  • cdata (str,filename) – (CData) Name of first complex structure
  • cdata1 (str,filename) – (CDATA1) Name of complex structure to be subtracted
  • output (str,filename) – (OUTput) Name of resulting complex structure

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CMPLXSUB for full documentation of this command in the latest Starlink release

starlink.figaro.coadd(image, tstart, tend, ystart, yend, cutoff, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/coadd .

Parameters:
  • image (str,filename) – (IMage) The 2D data to be reduced to a spectrum
  • tstart (float) – (TStart) first t-value to be used
  • tend (float) – (TEnd) last t-value to be used
  • ystart (float) – (YStart) first y-value to be used
  • yend (float) – (YEnd) last y-value to be used
  • cutoff (float) – (CUToff) value to exclude data point
  • spectrum (str,filename) – (SPectrum) Name of resulting spectrum
Keyword Arguments:
 

norm (bool) – (NOrm) Normalize Each Cycle?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_COADD for full documentation of this command in the latest Starlink release

starlink.figaro.colour(table, **kwargs)[source]¶

Runs the command: $FIG_DIR/colour .

Parameters:table (str) – (TABLE) Name of the colour lookup table
Keyword Arguments:
 idev (str) – [0.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_COLOUR for full documentation of this command in the latest Starlink release

starlink.figaro.comb(image, maxlines, clfile, arc_opts, output, xstart, xend, xblock, iteration, level, order, **kwargs)[source]¶

Runs the command: $FIG_DIR/comb .

Parameters:
  • image (str) – Name of image for input
  • maxlines (int) – Maximum number of lines to allow room for
  • clfile (str) – Name of image for cloning from
  • arc_opts (str) – Enter arc fit option
  • output (str) – Name of output file
  • xstart (int) – analysis lower limit
  • xend (int) – analysis upper limit
  • xblock (int) – Enter averaging width in channels
  • iteration (int) – New value of iteration
  • level (float) – Level of edge of tooth
  • order (int) – order for polynomial fitting
Keyword Arguments:
 
  • tols (str) – For use in batch only [dyn.]
  • keep_itt (bool) – keep itteration files? [dyn.]
  • quick (bool) – Centriod rather than fit gaussians? [dyn.]
  • prfits (bool) – Print out details of fitting [dyn.]
  • plotcorr (bool) – Plot correction?
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_COMB for full documentation of this command in the latest Starlink release

starlink.figaro.combine(spectrum, spectrum1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/combine .

Parameters:
  • spectrum (str,filename) – (SPectrum) Name of first Spectrum
  • spectrum1 (str,filename) – (SPECTRUM1) Name of second spectrum
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_COMBINE for full documentation of this command in the latest Starlink release

starlink.figaro.copobj(source, object, **kwargs)[source]¶

Runs the command: $FIG_DIR/copobj .

Parameters:
  • source (HDSOBJECT) – HDS object to be copied
  • object (HDSOBJECT) – HDS object to be created or modified

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_COPOBJ for full documentation of this command in the latest Starlink release

starlink.figaro.correl(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/correl .

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CORREL for full documentation of this command in the latest Starlink release

starlink.figaro.cosbell(spectrum, bellpc, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cosbell .

Parameters:
  • spectrum (str,filename) – (SPectrum) Template to base cosine bell data upon
  • bellpc (float) – (BEllpc) Percentage of data covered by cosine bell
  • output (str,filename) – (OUTput) Name of resulting data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_COSBELL for full documentation of this command in the latest Starlink release

starlink.figaro.cosrej(image, xstart, xend, crsig, mspect, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cosrej .

Parameters:
  • image (str,filename) – (IMage) The file containing the spectra
  • xstart (float) – (XStart) First X-value to use in calculating means
  • xend (float) – (XEnd) Last X-value to use in calculating means
  • crsig (float) – (CRSig) Cosmic ray sigma rejection level
  • mspect (str,filename) – (MSpect) Name of mean value spectrum to be generated
  • output (str,filename) – (OUtput) The file containing the corrected spectra
Keyword Arguments:
 

wmean (bool) – (WMean) Produce spectrum consisting of mean values?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_COSREJ for full documentation of this command in the latest Starlink release

starlink.figaro.creobj(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/creobj .

Keyword Arguments:
 
  • type (str) – HDS-type of object to be created [‘_REAL’]
  • dims (int) – Dimensions of HDS object to be created [0]
  • object (HDSOBJECT) – HDS object to be created

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CREOBJ for full documentation of this command in the latest Starlink release

starlink.figaro.crigauss(image, centre2, height2, width3, centre3, height3, width4, centre4, height4, width5, centre5, ydim, height5, base, ncomp, xdim, xstart, xend, width1, centre1, height1, width2, **kwargs)[source]¶

Runs the command: $FIG_DIR/crigauss .

Parameters:
  • image (str) – Name of image to be created
  • centre2 (float) – CENTRE2 of gaussian
  • height2 (float) – HEIGHT2 of gaussian
  • width3 (float) – WIDTH3 of gaussian (fwhm)
  • centre3 (float) – CENTRE3 of gaussian
  • height3 (float) – HEIGHT3 of gaussian
  • width4 (float) – WIDTH4 of gaussian (fwhm)
  • centre4 (float) – CENTRE4 of gaussian
  • height4 (float) – HEIGHT4 of gaussian
  • width5 (float) – WIDTH5 of gaussian (fwhm)
  • centre5 (float) – CENTRE5 of gaussian
  • ydim (int) – Y dimension of data
  • height5 (float) – HEIGHT5 of gaussian
  • base (float) – BASE for gaussian
  • ncomp (int) – NCOMP Number of componants
  • xdim (int) – X dimension of data”
  • xstart (float) – First X value
  • xend (float) – Last X value
  • width1 (float) – WIDTH1 of gaussian (fwhm)
  • centre1 (float) – CENTRE1 of gaussian
  • height1 (float) – HEIGHT1 of gaussian
  • width2 (float) – WIDTH2 of gaussian (fwhm)
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CRIGAUSS for full documentation of this command in the latest Starlink release

starlink.figaro.cscan(cube, ystart, yend, tstart, tend, hardcopy, **kwargs)[source]¶

Runs the command: $FIG_DIR/cscan .

Parameters:
  • cube (str) – Name of CUBE for input
  • ystart (float) – display lower limit
  • yend (float) – display upper limit
  • tstart (int) – display lower limit
  • tend (int) – display upper limit
  • hardcopy (bool) – use hard graphics device for display
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CSCAN for full documentation of this command in the latest Starlink release

starlink.figaro.cset(value, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cset .

Parameters:
  • value (float) – (Value) Constant value to set selected regions to
  • output (str,filename) – (OUtput) Output file for modified data
Keyword Arguments:
 
  • quit (bool) – Terminate region selection
  • soft (str) – [ ]
  • tvcolor (float) – [0.]
  • tvfile (str) – [ ]
  • tvhigh (float) – [0.]
  • tvlow (float) – [0.]
  • tvxen (float) – [0.]
  • tvxst (float) – [0.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CSET for full documentation of this command in the latest Starlink release

starlink.figaro.cspike(spiketrum, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/cspike .

Parameters:
  • spiketrum (str,filename) – (SPIketrum) Spiketrum generated from standard table
  • spectrum (str,filename) – (SPEctrum) Observed spectrum of standard
  • output (str,filename) – (OUTput) Output instrumental response spiketrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CSPIKE for full documentation of this command in the latest Starlink release

starlink.figaro.csub(image, **kwargs)[source]¶

Runs the command: $FIG_DIR/csub .

Parameters:

image (str) – Name of image for input

Keyword Arguments:
 
  • old (bool) – OLD - old coefficients are to be used for correction [dyn.]
  • output (str) – OUTput Name of output file
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CSUB for full documentation of this command in the latest Starlink release

starlink.figaro.cube2long(cube, output, ypoint, xpoint, angle, pixlen, **kwargs)[source]¶

Runs the command: $FIG_DIR/cube2long .

Parameters:
  • cube (str) – Name of cubefor input
  • output (str) – OUTput Name of output file
  • ypoint (int) – Y point on slit
  • xpoint (int) – X point on slit
  • angle (float) – pa of slit
  • pixlen (float) – Pixel length
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_CUBE2LONG for full documentation of this command in the latest Starlink release

starlink.figaro.delobj(object, **kwargs)[source]¶

Runs the command: $FIG_DIR/delobj .

Parameters:object (HDSOBJECT) – HDS object to be deleted

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_DELOBJ for full documentation of this command in the latest Starlink release

starlink.figaro.dvdplot(image, image2, xlow, xhigh, low, high, **kwargs)[source]¶

Runs the command: $FIG_DIR/dvdplot .

Parameters:
  • image (str,filename) – (IMAGE) Structure whose data is to be plotted
  • image2 (str,filename) – (IMAGE2) Structure against which IMAGE is to be plotted
  • xlow (float) – (XLow) Lowest value in second image to use (X-value)
  • xhigh (float) – (XHigh) Highest value in second image to use (X-value)
  • low (float) – (Low) Lowest value in image to use (Y-value)
  • high (float) – (High) Highest value in image to use (Y-value)
Keyword Arguments:
 
  • autoscale (bool) – (AUtoscale) Autoscale so all image points fit?
  • hard (str) – [ ]
  • hardcopy (bool) – (HArdcopy) Produce a hardcopy plot?
  • soft (str) – [ ]
  • whole (bool) – (WHole) Use all values in second image?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_DVDPLOT for full documentation of this command in the latest Starlink release

starlink.figaro.echarc(image, arctype, interactive, orders, sigma, orderfit, arfile, waves, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/echarc .

Parameters:
  • image (str,filename) – (IMage) Collapsed echelle arc image to be fitted
  • arctype (str) – (ARctype) Type of arc
  • interactive (float) – (INTeractive) Number of orders to fit interactively
  • orders (float) – (ORDERS) Order numbers
  • sigma (float) – (SIgma) Arc line half width in pixels
  • orderfit (float) – (ORDERFit) Polynomial order for 1st fit
  • arfile (str) – (ARFile) Name of file giving previous fit
  • waves (str,filename) – (WAves) Name of wavelength output image
  • output (str,filename) – (WAves) Name input copy with fitted wavelength
Keyword Arguments:
 
  • analysis (bool) – Save a detailed line by line analysis
  • chfact (float) – New value for CHFACT
  • cmd (str) – Fit,O_fit,Disp,Help,Edit,Reselect,Cont,Print,Auto,Xauto,Modify
  • continue_ (str) – Continue,Repeat,Start,Quit
  • disnchan (float) – Length of displayed sections
  • dowaves (bool) – (DOWaves) Write wavelength information to separate file?
  • hard (str) – [ ]
  • hardarc (bool) – Do a hard plot of the last order arc
  • hardisp (bool) – Do a hard plot of the last order dispersion curve
  • hatlas (bool) – Do hardcopy atlas of entire arc fit
  • hlinemap (bool) – Do hardcopy plot of arc line map
  • lineno (float) – Edit which line, zero to end edit
  • lineok (bool) – Correct?
  • monitor (bool) – (MONitor) ECHARC autofitting on device “PGPLOT” ? [dyn.]
  • movetox (float) – X-value
  • ordppag (float) – Number of sub-order panels per page
  • previous (bool) – (PREvious) Use arc lines from previous fit?
  • quitsel (bool) – Quit line selection in this order
  • resolve (str) – How is double ID to be resolved (N/O/S)
  • sigfact (float) – New value for SIGFACT
  • soft (str) – [ ]
  • thickness (float) – [0.]
  • wavelen (str) – Wavelength, blank to cancel line

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ECHARC for full documentation of this command in the latest Starlink release

starlink.figaro.echfind(image, ystart, yend, mstart, mdelta, outfile, thresh, minhw, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/echfind .

Parameters:
  • image (str,filename) – (IMage) name of echelle image in which to search
  • ystart (float) – (YSTart) Y value to start search for orders
  • yend (float) – (YEnd) Y value to stop search for orders
  • mstart (float) – (MStart) number of the first order in range
  • mdelta (float) – (MDelta) order number increment (-1 or +1) ?
  • outfile (str) – (OUTFile) name of output report file
  • thresh (float) – (THResh) threshold above which orders are deemed to exist
  • minhw (float) – (MINHw) minimum half-width of orders
  • output (str,filename) – (OUTput) name of mask image showing order positions
Keyword Arguments:
 
  • domask (bool) – (DOMask) create an output mask image?
  • periscope (bool) – (PERIscope) Is the periscope fitted?
  • sdist (bool) – (SDIst) write output file SDIST.DAT in SDIST format?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ECHFIND for full documentation of this command in the latest Starlink release

starlink.figaro.echmask(cofile, mask, objwidth, objoffset, s1width, s1offset, s2width, s2offset, mstart, mdelta, **kwargs)[source]¶

Runs the command: $FIG_DIR/echmask .

Parameters:
  • cofile (str) – (COFile) Name of file containing order fit coeffs
  • mask (str,filename) – (MASk) Name of mask image showing order positions
  • objwidth (float) – (OBJWidth) Number of rows of object to extract per order
  • objoffset (float) – (OBJOffset) Offset from order centre of object centre
  • s1width (float) – (S1Width) Number of rows of region 1 sky to extract
  • s1offset (float) – (S1Offset) Offset from object centre of region 1 sky centre
  • s2width (float) – (S2Width) Number of rows of region 2 sky to extract
  • s2offset (float) – (S2Offset) Offset from object centre of region 2 sky centre
  • mstart (float) – (MStart) Number of the first order fitted
  • mdelta (float) – (MDelta) Order number increment (-1 or +1)
Keyword Arguments:
 

periscope (bool) – (PERIscope) Is the star / sky periscope fitted?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ECHMASK for full documentation of this command in the latest Starlink release

starlink.figaro.echmerge(image, image1, box, cutoff, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/echmerge .

Parameters:
  • image (str,filename) – (IMage) Name of first image
  • image1 (str) – (IMAGE1) Name of second image
  • box (float) – (Box) Size of box for median filter
  • cutoff (float) – (CUToff) Max ratio of data that permits contrib from weaker
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ECHMERGE for full documentation of this command in the latest Starlink release

starlink.figaro.echselect(image, xstart, xend, mstart, mdelta, objout, skyout, **kwargs)[source]¶

Runs the command: $FIG_DIR/echselect .

Parameters:
  • image (str,filename) – (IMage) Name of distortion-corrected echellogram
  • xstart (float) – (XStart) First x-axis value for collapse of image
  • xend (float) – (XEnd) Last x-axis value for collapse of image
  • mstart (float) – (MStart) Number of the first order fitted
  • mdelta (float) – (MDelta) Order number increment (-1 or +1)
  • objout (str,filename) – (OBJout) Name of created object echellogram
  • skyout (str,filename) – (SKYout) Name of created sky echellogram
Keyword Arguments:
 
  • add (bool) – Add to object cross-sections already selected
  • clear (bool) – Clear all settings for this order
  • disnchan (float) – Length of displayed sections in pixels
  • high (float) – Maximum value for display
  • low (float) – Minimum value for display
  • movetox (float) – Move to which X-axis value
  • order (float) – Set order number
  • previous (bool) – (PREvious) Read in the previous selection?
  • quitsel (bool) – Quit selection
  • soft (str) – [ ]
  • whole (bool) – (WHole) Sum all cross-sections to give cut through image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ECHSELECT for full documentation of this command in the latest Starlink release

starlink.figaro.editext(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/editext .

Keyword Arguments:
 
  • request (str) – What kind of action required [List]
  • in_ (str,filename) – Input NDF
  • logfil (str,filename) – ASCII file name for list output [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_EDITEXT for full documentation of this command in the latest Starlink release

starlink.figaro.elsplot(spectrum, xsize, ysize, xstart, xend, high, low, bias, label, **kwargs)[source]¶

Runs the command: $FIG_DIR/elsplot .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be plotted
  • xsize (float) – (XSIze) Plot length in metres
  • ysize (float) – (YSIze) Height of plot in metres
  • xstart (float) – (XStart) First X-value to be plotted
  • xend (float) – (XEnd) Last X-value to be plotted
  • high (float) – (HIgh) Maximum data value to be plotted
  • low (float) – (LOw) Minimum data value to be plotted
  • bias (float) – (BIas) Bias value to be added to data
  • label (str) – (LABel) Label for plot
Keyword Arguments:
 
  • autoscale (bool) – (AUtoscale) Scale so all of spectrum fits?
  • hard (str) – [ ]
  • whole (bool) – (WHole) Plot all of spectrum?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ELSPLOT for full documentation of this command in the latest Starlink release

starlink.figaro.emlt(spectrum, xstart, xend, lines, **kwargs)[source]¶

Runs the command: $FIG_DIR/emlt .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum containing lines to be fitted
  • xstart (float) – (XStart) X-value at which analysis starts
  • xend (float) – (XEnd) X-value at which analysis ends
  • lines (float) – (LInes) Number of lines to fit (0 -> all lines)
Keyword Arguments:
 
  • fwhm (float) – (Fwhm) Forced FWHM for fitted lines
  • output (str,filename) – (OUTput) Name of resulting synthetic spectrum
  • moments (bool) – (MOMents) Include center of moment analysis? [dyn.]
  • synth (bool) – (SYnth) Generate a synthetic spectrum from the fits? [dyn.]
Returns:

  • emlt_bin (float)
  • emlt_fwhm_ang (float)
  • emlt_fwhm_bin (float)
  • emlt_lines (float)
  • emlt_peak (float)
  • emlt_pos (float)
  • emlt_stren (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_EMLT for full documentation of this command in the latest Starlink release

starlink.figaro.errcon(spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/errcon .

Parameters:
  • spectrum (str,filename) – (SPectrum) Name of file with percentage errors
  • output (str,filename) – (OUTput) Name of file with absolute errors

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ERRCON for full documentation of this command in the latest Starlink release

starlink.figaro.esplot(spectrum, xstart, xend, high, low, bias, label, **kwargs)[source]¶

Runs the command: $FIG_DIR/esplot .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be plotted
  • xstart (float) – (XStart) First X-value to be plotted
  • xend (float) – (XEnd) Last X-value to be plotted
  • high (float) – (HIgh) Maximum data value to be plotted
  • low (float) – (LOw) Minimum data value to be plotted
  • bias (float) – (BIas) Bias value to be added to data
  • label (str) – (LABel) Label for plot
Keyword Arguments:
 
  • colour (str) – (COLour) Plot colour (Bl,Wh,R,G,B,Cy,Ma,Y)
  • thickness (float) – (THickness) Plotted line width
  • autoscale (bool) – (AUtoscale) Scale so all of spectrum fits?
  • axes (bool) – (AXes) Plot and label axes? [dyn.]
  • erase (bool) – (ERase) Erase screen before plotting? [dyn.]
  • hard (str) – [ ]
  • hardcopy (bool) – (HArdcopy) Produce plot as a hard copy?
  • soft (str) – [ ]
  • whole (bool) – (WHole) Plot all of spectrum?
Returns:

  • tvcolor (float)
  • tvfile (str)
  • tvhigh (float)
  • tvlow (float)
  • tvxen (float)
  • tvxst (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ESPLOT for full documentation of this command in the latest Starlink release

starlink.figaro.evalfit(in_, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/evalfit .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output NDF
Keyword Arguments:
 
  • comp (int) – Component(s) to evaluate [1,2,3,4,5,6]
  • dialog (str) – Allow repeated [‘T’]
  • info (bool) – Issue informational messages [YES]
  • reply (bool) – Evaluate another set of components [NO]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_EVALFIT for full documentation of this command in the latest Starlink release

starlink.figaro.exam(*args, **kwargs)[source]¶

Runs the command: echo ‘The EXAM command has been removed. Please use HDSTRACE instead.’ .

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_EXAM for full documentation of this command in the latest Starlink release

starlink.figaro.extin(spectrum, coeff, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/extin .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be corrected for extinction
  • coeff (str,filename) – (COeff) Extinction coefficient spectrum
  • output (str,filename) – (OUTput) Resulting spetcrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_EXTIN for full documentation of this command in the latest Starlink release

starlink.figaro.extlist(image, nrows, sections, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/extlist .

Parameters:
  • image (str,filename) – (IMage) name of image to extract data from
  • nrows (str) – (NRows) How many rows to be added
  • sections (float) – (SECtions) List of rows
  • spectrum (str,filename) – (SPectrum) name of spectrum to be generated

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_EXTLIST for full documentation of this command in the latest Starlink release

starlink.figaro.extract(image, ystart, yend, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/extract .

Parameters:
  • image (str,filename) – (IMage) name of image to extract data from
  • ystart (float) – (YStart) first y-value to be used
  • yend (float) – (YEnd) last y-value to be used
  • spectrum (str,filename) – (SPectrum) name of spectrum to be generated

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_EXTRACT for full documentation of this command in the latest Starlink release

starlink.figaro.fet321(cube, detector, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/fet321 .

Parameters:
  • cube (str,filename) – (CUbe) The FIGS data cube to be reduced to a spectrum
  • detector (float) – (DETector) Detector number to use
  • spectrum (str,filename) – (SPectrum) Name of resulting spectrum
Keyword Arguments:
 
  • cutoff (float) – (CUToff) value to exclude data point
  • add (bool) – (ADd) Add all data rather than subtracting background? [dyn.]
  • back (bool) – (BAck) Return background spectrum only? [dyn.]
  • norm (bool) – (NOrm) Normalize Each Cycle? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FET321 for full documentation of this command in the latest Starlink release

starlink.figaro.ff(image, flat, order, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ff .

Parameters:
  • image (str,filename) – (IMAGE) Name of data to be flat fielded
  • flat (str,filename) – (FLAT) Name of flat field to be used
  • order (float) – (ORDER) Order for flat field profile fit
  • output (str,filename) – (OUTPUT) Name of result of operation

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FF for full documentation of this command in the latest Starlink release

starlink.figaro.ffcross(image, flat, ystart, yend, xstart, xend, cross, **kwargs)[source]¶

Runs the command: $FIG_DIR/ffcross .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • flat (str,filename) – (FLat) Name of flat field
  • ystart (float) – (YStart) First Y value to be used
  • yend (float) – (YEnd) Last Y value to be used
  • xstart (float) – (XStart) First X value to be used
  • xend (float) – (XEnd) Last X value to be used
  • cross (str,filename) – (CRoss) Name of cross-correlation data?
Keyword Arguments:
 
  • log (bool) – (LOg) Log individual cross-section shifts? [dyn.]
  • record (bool) – (RECord) Create file to record cross-correlation?
Returns:

  • avshift (float)
  • shift (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FFCROSS for full documentation of this command in the latest Starlink release

starlink.figaro.fft(cdata, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/fft .

Parameters:
  • cdata (str,filename) – (CData) Data to be Fourier transformed
  • output (str,filename) – (OUtput) Resulting transformed data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FFT for full documentation of this command in the latest Starlink release

starlink.figaro.fib2cube(image1, image2, image3, image4, image5, cube, file, maxgauss, **kwargs)[source]¶

Runs the command: $FIG_DIR/fib2cube .

Parameters:
  • image1 (str) – Input image 1
  • image2 (str) – Input image 2
  • image3 (str) – Input image 3
  • image4 (str) – Input image 4
  • image5 (str) – Input image 5
  • cube (str) – Output data cube
  • file (str) – Name of file with coordinates for output cube
  • maxgauss (int) – Maximum number of Gaussians to allow room for
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIB2CUBE for full documentation of this command in the latest Starlink release

starlink.figaro.fibdisp(cube, outable, ystart, yend, yblock, tstart, tend, tblock, device, iteration, **kwargs)[source]¶

Runs the command: $FIG_DIR/fibdisp .

Parameters:
  • cube (str) – Cube for display
  • outable (str) – Name for EXTATIC file
  • ystart (float) – analysis lower limit
  • yend (float) – analysis upper limit
  • yblock (float) – Enter analysis x-sect width
  • tstart (float) – analysis lower limit
  • tend (float) – analysis upper limit
  • tblock (float) – Enter analysis blocking width in 3rd dimension
  • device (str) – Device for display
  • iteration (int) – New value of itteration
Keyword Arguments:
 
  • vcorr (float) – correction to apply to radial velocities [dyn.]
  • tols (str) – For use in batch only [dyn.]
  • fitrat (float) – Ratio of widths, heights, or separation, for double fits [dyn.]
  • calrat (int) – Ratio of number of iteration to default [dyn.]
  • output (str) – Name for output file
  • fit_model (str) – Model of fit to perform
  • low (float) – Minimum value for display
  • high (float) – Maximum value for display
  • absorption (bool) – Allow fitting of absorption lines [dyn.]
  • bounds (bool) – Perform bounded fits to lines (in batch) [dyn.]
  • hardcopy (bool) – produce hardcopy plots of fits from cube [dyn.]
  • table (bool) – produce table of fits from cube [dyn.]
  • print (bool) – Produce print out of rotation curves [dyn.]
  • shape (bool) – Carry out shape analysis [dyn.]
  • keep_itt (bool) – Keep itteration files [dyn.]
  • fit (bool) – perform fitting [dyn.]
  • aic (bool) – Use Akiakes information criterion for fitting [dyn.]
  • weights (bool) – Use weights for fitting [dyn.]
  • prfits (bool) – Print out details of fitting [dyn.]
  • full (bool) – Print out full details of fits in table [dyn.]
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIBDISP for full documentation of this command in the latest Starlink release

starlink.figaro.fibsep(image, device, nfib, log, old, output, file, ystart, yend, xstart, xend, low, high, **kwargs)[source]¶

Runs the command: $FIG_DIR/fibsep .

Parameters:
  • image (str) – Name of image to be displayed
  • device (str) – DEVICE plotting device
  • nfib (int) – Approximate number of fibres expected
  • log (bool) – Display using logarithmic scaling
  • old (bool) – Use previous results to extract data
  • output (str) – Name of image to create
  • file (str) – Name of file for positions of fibres
  • ystart (int) – First Y value to be displayed
  • yend (int) – Last Y value to be displayed
  • xstart (int) – First X value to be displayed
  • xend (int) – Last X value to be displayed
  • low (int) – Minimum count level for display
  • high (int) – Maximum count level for display
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIBSEP for full documentation of this command in the latest Starlink release

starlink.figaro.figinfo(input, **kwargs)[source]¶

Runs the command: $FIG_DIR/figinfo .

Parameters:

input (str,filename) – (INput) Name of file to examine

Keyword Arguments:
 
  • check_flags (bool) – (CHeck_flags) Check for flagged values by reading data?
  • clear_flag (bool) – (CLEAR_FLAG) Clear “may contain flagged data flag” anyway? [dyn.]
  • set_flag (bool) – (SET_FLAG) Set “may contain flagged data flag”? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIGINFO for full documentation of this command in the latest Starlink release

starlink.figaro.figs321(cube, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/figs321 .

Parameters:
  • cube (str,filename) – (CUbe) The FIGS data cube to be reduced to a spectrum
  • spectrum (str,filename) – (SPectrum) Name of resulting spectrum
Keyword Arguments:
 
  • cutoff (float) – (CUToff) value to exclude data point
  • add (bool) – (ADd) Add all data rather than subtracting background? [dyn.]
  • back (bool) – (BAck) Return background spectrum only? [dyn.]
  • norm (bool) – (NOrm) Normalize Each Cycle? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIGS321 for full documentation of this command in the latest Starlink release

starlink.figaro.figs322(cube, image, **kwargs)[source]¶

Runs the command: $FIG_DIR/figs322 .

Parameters:
  • cube (str,filename) – (CUbe) The FIGS data cube to be reduced to an image
  • image (str,filename) – (IMage) Name of resulting image
Keyword Arguments:
 
  • add (bool) – (ADd) Add all data rather than subtracting background? [dyn.]
  • back (bool) – (BAck) Return background spectrum only? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIGS322 for full documentation of this command in the latest Starlink release

starlink.figaro.figs422(hcube, xstart, xend, cystart, cyend, image, **kwargs)[source]¶

Runs the command: $FIG_DIR/figs422 .

Parameters:
  • hcube (str,filename) – (HCube) Name of FIGS image mode raw hypercube
  • xstart (float) – (XStart) First wavelength value to be included
  • xend (float) – (XEnd) Last wavelength value to be included
  • cystart (float) – (CYStart) First cycle number to be included
  • cyend (float) – (CYEnd) Last cycle number to be included
  • image (str) – (IMage) Name of resulting image
Keyword Arguments:
 

split (bool) – (SPLit) Split separate cycles into separate images?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIGS422 for full documentation of this command in the latest Starlink release

starlink.figaro.figs423(hcube, cystart, cyend, cube, **kwargs)[source]¶

Runs the command: $FIG_DIR/figs423 .

Parameters:
  • hcube (str,filename) – (HCube) Name of FIGS image mode raw hypercube
  • cystart (float) – (CYStart) First cycle number to be included
  • cyend (float) – (CYEnd) Last cycle number to be included
  • cube (str,filename) – (CUbe) Name of resulting cube

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIGS423 for full documentation of this command in the latest Starlink release

starlink.figaro.figs424(hcube, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/figs424 .

Parameters:
  • hcube (str,filename) – (HCube) Name of FIGS image mode raw hypercube
  • output (str,filename) – (OUTput) Name of processed FIGS image mode hypercube

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIGS424 for full documentation of this command in the latest Starlink release

starlink.figaro.figsee(spectrum, ndet, detectors, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/figsee .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to use for seeing data
  • ndet (float) – (NDet) Number of detectors to use
  • detectors (float) – (DEtectors) Detectors to use
  • output (str,filename) – (OUTput) Name of resulting seeing ripple data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIGSEE for full documentation of this command in the latest Starlink release

starlink.figaro.figsflux(spectrum, standard, kmag, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/figsflux .

Parameters:
  • spectrum (str,filename) – (SPectrum) Name of Star spectrum
  • standard (str,filename) – (STandard) Name of Standard spectrum
  • kmag (float) – (Kmag) K magnitude of standard star
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FIGSFLUX for full documentation of this command in the latest Starlink release

starlink.figaro.fillcube(in_, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/fillcube .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output NDF
Keyword Arguments:
 
  • info (bool) – Issue informational messages [YES]
  • tol (, 0.- .5) – Pixel coordinate mismatch tolerance [0.2]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FILLCUBE for full documentation of this command in the latest Starlink release

starlink.figaro.findsp(image, ysep, pfile, black, white, numfib, norder, npts, fwcent, cfw, yfirst, **kwargs)[source]¶

Runs the command: $FIG_DIR/findsp .

Parameters:
  • image (str,filename) – (IMage) Image to generate polynomial list from
  • ysep (float) – (YSep) Average separation between fibre spectra
  • pfile (str) – (PFile) Name of file to write polynomial fits to
  • black (float) – (BLack) Black level for display?
  • white (float) – (WHite) White level for display?
  • numfib (float) – (NUMFib) Number of fibres (spectra) in the frame
  • norder (float) – (NORDer) Order of polynomials to fit along spectra
  • npts (float) – (NPts) Number of points along spectra required
  • fwcent (float) – (FWcent) Full-width centroiding range in Y direction
  • cfw (float) – (CFW) Centroid following weight
  • yfirst (float) – (YFirst) Central Y height of first spectrum
Keyword Arguments:
 
  • adjust (bool) – Adjust start centroids
  • chgpar (bool) – Repeat with new parameters
  • chgrej (bool) – Repeat selection of rejections
  • reject (float) – Reject which fibre number - zero for no more
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FINDSP for full documentation of this command in the latest Starlink release

starlink.figaro.fitbb(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/fitbb .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • af (List[int]) – Fit flags for emissivity exponents [1,2,3,4,5,6]
  • alpha (List[float]) – Emissivity exponents [0.,0.,0.,0.,0.,0.]
  • comp (int) – Component numbers for storage [1,2,3,4,5,6]
  • device – Graphics device [!]
  • dialog (str) – Allow extensive interaction [‘T’]
  • fitgood (bool) – Fit acceptable [YES]
  • info (bool) – Issue informational messages [YES]
  • lgtemp (List[float]) – Common logarithm of colour temperatures [K] [0.,0.,0.,0.,0.,0.]
  • logfil (str,filename) – ASCII file name for result output [!]
  • mask1 (List[float]) – Mask interval lower bound(s)
  • mask2 (List[float]) – Mask interval upper bound(s)
  • ncomp (, 1- 6) – Number of components [1]
  • reguess (bool) – Improve component guesses [NO]
  • remask (bool) – Improve mask intervals [NO]
  • repair (bool) – Update spectroscopic axis number [NO]
  • sf (List[int]) – Fit flags for scaling constants [0,0,0,0,0,0]
  • tf (List[int]) – Fit flags for colour temperatures [0,0,0,0,0,0]
  • theta (List[float]) – Scaling constants [0.,0.,0.,0.,0.,0.]
  • varuse (bool) – Use input variances if available [YES]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FITBB for full documentation of this command in the latest Starlink release

starlink.figaro.fitcont(image, xsect, **kwargs)[source]¶

Runs the command: $FIG_DIR/fitcont .

Parameters:
  • image (str) – Name of image for input
  • xsect (int) – value to extract from for first fit
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FITCONT for full documentation of this command in the latest Starlink release

starlink.figaro.fitgauss(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/fitgauss .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • centre (List[float]) – Gauss positions [0,0,0,0,0,0]
  • cf (List[int]) – Fit flags for line centres [0,0,0,0,0,0]
  • comp (int) – Component numbers for storage [1,2,3,4,5,6]
  • cont (float) – Continuum level [0]
  • device – Graphics device [!]
  • dialog (str) – Allow extensive interaction [‘T’]
  • fitgood (bool) – Fit acceptable [YES]
  • fwhm (List[float]) – Gauss widths (FWHM) [1,1,1,1,1,1]
  • info (bool) – Issue informational messages [YES]
  • logfil (str,filename) – ASCII file name for result output [!]
  • mask1 (List[float]) – Mask interval lower bound(s)
  • mask2 (List[float]) – Mask interval upper bound(s)
  • ncomp (, 1- 6) – Number of components [1]
  • peak (List[float]) – Gauss heights [1,1,1,1,1,1]
  • pf (List[int]) – Fit flags for line peaks [0,0,0,0,0,0]
  • reguess (bool) – Improve component guesses [NO]
  • remask (bool) – Improve mask intervals [NO]
  • repair (bool) – Update spectroscopic axis number [NO]
  • varuse (bool) – Use input variances if available [YES]
  • wf (List[int]) – Fit flags for line widths [0,0,0,0,0,0]
Returns:

  • fcentre (List[float])
  • ffwhm (List[float])
  • fpeak (List[float])

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FITGAUSS for full documentation of this command in the latest Starlink release

starlink.figaro.fitpoly(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/fitpoly .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • comp (, 0- 2000000) – Component number for storage [1]
  • device – Graphics device [!]
  • dialog (str) – Allow extensive interaction [‘T’]
  • fitgood (bool) – Fit acceptable [YES]
  • info (bool) – Issue informational messages [YES]
  • logfil (str,filename) – ASCII file name for result output [!]
  • mask1 (List[float]) – Mask interval lower bound(s)
  • mask2 (List[float]) – Mask interval upper bound(s)
  • order (, 0- 7) – Polynomial order [1]
  • reguess (bool) – Improve polynomial order [NO]
  • remask (bool) – Improve mask intervals [NO]
  • repair (bool) – Update spectroscopic axis number [NO]
  • varuse (bool) – Use input variances if available [YES]
Returns:

fitcoeffs (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FITPOLY for full documentation of this command in the latest Starlink release

starlink.figaro.fitset(file, keyword, value, comment, **kwargs)[source]¶

Runs the command: $FIG_DIR/fitset .

Parameters:
  • file (str,filename) – (FIle) Name of file in which FITS keyword is to be set
  • keyword (str) – (KEYword) FITS keyword to set or modify
  • value (str) – (VALue) New value of FITS keyword
  • comment (str) – (COMment) Comment associated with FITS keyword
Keyword Arguments:
 
  • logical (bool) – (LOGical) Treat keyword as a logical value? [dyn.]
  • string (bool) – (STRing) Treat keyword value as a literal string? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FITSET for full documentation of this command in the latest Starlink release

starlink.figaro.fitskeys(input, **kwargs)[source]¶

Runs the command: $FIG_DIR/fitskeys .

Parameters:input (str,filename) – (INput) Structure whose FITS items are to be listed

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FITSKEYS for full documentation of this command in the latest Starlink release

starlink.figaro.fittri(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/fittri .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • centre (List[float]) – Triangle positions [0,0,0,0,0,0]
  • cf (List[int]) – Fit flags for line centres [0,0,0,0,0,0]
  • comp (int) – Component numbers for storage [1,2,3,4,5,6]
  • cont (float) – Continuum level [0]
  • device – Graphics device [!]
  • dialog (str) – Allow extensive interaction [‘T’]
  • fitgood (bool) – Fit acceptable [YES]
  • fwhm (List[float]) – Triangle widths (FWHM) [1,1,1,1,1,1]
  • info (bool) – Issue informational messages [YES]
  • logfil (str,filename) – ASCII file name for result output [!]
  • mask1 (List[float]) – Mask interval lower bound(s)
  • mask2 (List[float]) – Mask interval upper bound(s)
  • ncomp (, 1- 6) – Number of components [1]
  • peak (List[float]) – Triangle heights [1,1,1,1,1,1]
  • pf (List[int]) – Fit flags for line peaks [0,0,0,0,0,0]
  • reguess (bool) – Improve component guesses [NO]
  • remask (bool) – Improve mask intervals [NO]
  • repair (bool) – Update spectroscopic axis number [NO]
  • varuse (bool) – Use input variances if available [YES]
  • wf (List[int]) – Fit flags for line widths [0,0,0,0,0,0]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FITTRI for full documentation of this command in the latest Starlink release

starlink.figaro.flag2qual(input, output, value, **kwargs)[source]¶

Runs the command: $FIG_DIR/flag2qual .

Parameters:
  • input (str,filename) – (INput) Name of file to have flagged values removed
  • output (str,filename) – (OUTput) Name of resulting file
  • value (float) – (VAlue) Fixed value to use to replace flagged values
Keyword Arguments:
 

fixed (bool) – (FIxed) Replace flagged values with one fixed value?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FLAG2QUAL for full documentation of this command in the latest Starlink release

starlink.figaro.flaircomp(in_, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/flaircomp .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output NDF
Keyword Arguments:
 

title (str) – Output title [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FLAIRCOMP for full documentation of this command in the latest Starlink release

starlink.figaro.flairext(in_, profile, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/flairext .

Parameters:
  • in_ (str,filename) – Input NDF
  • profile (str,filename) – NDF containing profile (weights)
  • out (str,filename) – Output NDF
Keyword Arguments:
 
  • fibres (int) – Number of fibres to extract [92]
  • title (str) – Output title [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FLAIREXT for full documentation of this command in the latest Starlink release

starlink.figaro.flconv(spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/flconv .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to convert to Ergs/sec/cm**2/A
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FLCONV for full documentation of this command in the latest Starlink release

starlink.figaro.foto(image, ra1, ra2, nradii, radii, bad, photons, readns, mzero, **kwargs)[source]¶

Runs the command: $FIG_DIR/foto .

Parameters:
  • image (str,filename) – (IMage) Image to be used
  • ra1 (float) – (RA1) Inner radius of sky aperture
  • ra2 (float) – (RA2) Outer radius of sky aperture
  • nradii (float) – (NRadii) Number of apertures to use
  • radii (float) – (RADii) Aperture radii
  • bad (float) – (BAD) Bad pixel rejection threshold
  • photons (float) – (PHotons) Number of photons per ADU
  • readns (float) – (REadns) Readout noise
  • mzero (float) – (MZero) Magnitude offset
Keyword Arguments:
 
  • confirm (bool) – Sky value and Sigma OK
  • dishist (bool) – Display sky histogram
  • sigma (float) – Sigma
  • skyval (float) – Sky value
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FOTO for full documentation of this command in the latest Starlink release

starlink.figaro.fscrunch(spectrum, wstart, wend, bins, inorder, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/fscrunch .

Parameters:
  • spectrum (str) – (SPectrum) Spectrum to be scrunched
  • wstart (float) – (WStart) Wavelength of center of first bin
  • wend (float) – (WEnd) Wavelength of center of last bin (or increment)
  • bins (float) – (BIns) Number of bins for scrunched spectrum
  • inorder (float) – (INOrder) Order of fit for local interpolation
  • output (str) – (OUtput) Name of scrunched spectrum
Keyword Arguments:
 
  • density (bool) – (DENsity) Treat data as flux per unit wavelength?
  • final (bool) – (FInal) Treat WEND as a final wavelength value? [dyn.]
  • increment (bool) – (INCrement) Treat WEND value as an increment value? [dyn.]
  • log (bool) – (LOg) Bin into logarithmic wavelength bins?
Returns:

  • scrunch_end (float)
  • scrunch_inc (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FSCRUNCH for full documentation of this command in the latest Starlink release

starlink.figaro.fwconv(spectrum, flux_unit, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/fwconv .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum for flux unit conversion
  • flux_unit (str) – (FLux_unit) Flux units for output spectrum
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_FWCONV for full documentation of this command in the latest Starlink release

starlink.figaro.gauss(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/gauss .

Keyword Arguments:
 
  • tol (float) –
  • spectrum (str,filename) – (SPectrum) Spectrum to be analysed
  • filnam (str) – (FILENAME) Name of data file for results
  • xstart (float) – (XStart) First X-value to be plotted
  • xend (float) – (XEnd) Last X-value to be plotted
  • high (float) – (HIgh) Maximum data value to be plotted
  • low (float) – (LOw) Minimum data value to be plotted
  • bias (float) – (BIas) Bias value to be added to data
  • label (str) – (LABel) Label for plot and results file
  • ord (float) – (ORD) Order of polynomial fit to continuum
  • sig (float) – (SIG) Factor * sigma for continuum point rejection
  • err (float) – (ERR) Factor * error for continuum point rejection
  • itn (float) – (ITN) Number of iterations for continuum point rejection
  • index (float) – (IND) Index number of Gaussian to alter
  • dele (float) – (DELE) Index number of Gaussian to delete
  • pn_hn_wn_s (str) – (P/H/W/S) Alter Position, Height, Width or Stop
  • npcon (str) – (NPCON) n followed by P,H or W (-1 to end)
  • nchain (float) – (NCHAIN) Number of Gaussians to chain (-1 to end)
  • chain (str) – (CHAIN) Gaussian parameter to be chained P/H/W
  • ichain (float) – (ICHAIN) Index number of Gaussian to chain
  • rchain (float) – (RCHAIN) Line peak seperation, height or width ratio
  • wght (str) – (WeiGHTing) for residuals - None, by Value or by Error
  • recname (str) – (RECNAME) Name of data file to be recalled
  • gaufit (str,filename) – (GAUFIT) Fitted spectrum to be saved
  • autoscale (bool) – (AUtoscale) Scale so all of spectrum fits?
  • ccmd (str) – Cur,Ord,Sig,Err,Itn,Fit,Gau,Help
  • constr (bool) – (CONSTR) Want to constrain any Gaussian parameters ?
  • file (bool) – (FILE) Are fit results to be recorded on file?
  • gcmd (str) – Lim,Sin,New,Nex,Inch,Lis,Sel,Del,Opt,Recal,Hard,Save,Cont,Quit,Help
  • hard (str) – [ ]
  • man (bool) – (MANual) Want to accept manual fit to profile
  • multcon (bool) – (MULTiple CONstraints) Any Gaussians to be chained ?
  • sincon (bool) – (SINCON) Any single constraints on Guassian parameters
  • soft (str) – [ ]
  • whole (bool) – (WHole) Use whole of spectrum for line analysis?
Returns:

  • tvfile (str)
  • tvhigh (float)
  • tvlow (float)
  • tvxen (float)
  • tvxst (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GAUSS for full documentation of this command in the latest Starlink release

starlink.figaro.goodvar(in_, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/goodvar .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output NDF
Keyword Arguments:
 
  • bad (float) – Value to replace bad variances [!]
  • neg (float) – Value to replace negative variances [!]
  • zero (float) – Value to replace zero variances [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GOODVAR for full documentation of this command in the latest Starlink release

starlink.figaro.grow(in_, expand, stapix, endpix, **kwargs)[source]¶

Runs the command: $FIG_DIR/grow .

Parameters:
  • in_ (str,filename) – Input NDF
  • expand (List[int]) – For each axis: expanded or old (0 for old axis)
  • stapix (List[int]) – For each axis: target start pixel (0 for old axis)
  • endpix (List[int]) – For each axis: target end pixel (0 for old axis)
Keyword Arguments:
 
  • info (bool) – Issue informational messages [YES]
  • new (bool) – Create a new output file [NO]
  • out (str,filename) – Output NDF
  • size (List[int]) – For each axis: output axis length (0 for old axis)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GROW for full documentation of this command in the latest Starlink release

starlink.figaro.growx(spectrum, image, ystart, yend, ysize, **kwargs)[source]¶

Runs the command: $FIG_DIR/growx .

Parameters:
  • spectrum (str) – (SPectrum) Spectrum to be “grown” into image
  • image (str) – (IMage) Image to grow spectrum into
  • ystart (float) – (YStart) First cross-section to copy spectrum into
  • yend (float) – (YEnd) Last cross-section to copy spectrum into
  • ysize (float) – (YSIze) Y-dimension of new image
Keyword Arguments:
 

new (bool) – (NEw) Force creation of a new image?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GROWX for full documentation of this command in the latest Starlink release

starlink.figaro.growxt(image, cube, ystart, yend, ysize, **kwargs)[source]¶

Runs the command: $FIG_DIR/growxt .

Parameters:
  • image (str) – (IMage) Image to grow into planes of cube
  • cube (str) – (Cube) Cube into which image is to be grown
  • ystart (float) – (YStart) First plane to copy image into
  • yend (float) – (YEnd) Last plane to copy image into
  • ysize (float) – (YSIze) Y-dimension of new image
Keyword Arguments:
 

new (bool) – (NEw) Force creation of a new cube?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GROWXT for full documentation of this command in the latest Starlink release

starlink.figaro.growxy(image, cube, tstart, tend, tsize, **kwargs)[source]¶

Runs the command: $FIG_DIR/growxy .

Parameters:
  • image (str) – (IMage) Image to grow into planes of cube
  • cube (str) – (Cube) Cube into which image is to be grown
  • tstart (float) – (TStart) First plane to copy image into
  • tend (float) – (TEnd) Last plane to copy image into
  • tsize (float) – (TSIze) T-dimension of new image
Keyword Arguments:
 

new (bool) – (NEw) Force creation of a new cube?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GROWXY for full documentation of this command in the latest Starlink release

starlink.figaro.growy(spectrum, image, xstart, xend, xsize, **kwargs)[source]¶

Runs the command: $FIG_DIR/growy .

Parameters:
  • spectrum (str) – (SPectrum) Spectrum to be “grown” into image
  • image (str) – (IMage) Image to grow spectrum into
  • xstart (float) – (XStart) First cross-section to copy spectrum into
  • xend (float) – (XEnd) Last cross-section to copy spectrum into
  • xsize (float) – (XSIze) X-dimension of new image
Keyword Arguments:
 

new (bool) – (NEw) Force creation of a new image?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GROWY for full documentation of this command in the latest Starlink release

starlink.figaro.growyt(image, cube, xstart, xend, xsize, **kwargs)[source]¶

Runs the command: $FIG_DIR/growyt .

Parameters:
  • image (str) – (IMage) Image to grow into planes of cube
  • cube (str) – (Cube) Cube into which image is to be grown
  • xstart (float) – (XStart) First plane to copy image into
  • xend (float) – (XEnd) Last plane to copy image into
  • xsize (float) – (XSIze) X-dimension of new image
Keyword Arguments:
 

new (bool) – (NEw) Force creation of a new cube?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GROWYT for full documentation of this command in the latest Starlink release

starlink.figaro.gspike(spectrum, table, spiketrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/gspike .

Parameters:
  • spectrum (str,filename) – (SPEctrum) Template spectrum for wavelength range
  • table (str) – (Table) Table giving wavelength and data values
  • spiketrum (str,filename) – (SPIketrum) Name of “spiketrum” to be generated

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_GSPIKE for full documentation of this command in the latest Starlink release

starlink.figaro.hard(harddev, **kwargs)[source]¶

Runs the command: $FIG_DIR/hard .

Parameters:

harddev (str) – (HArddev) Device to use for hardcopy plots

Keyword Arguments:
 
  • draw (bool) – (DRaw) Output a test plot to the device? [dyn.]
  • force (bool) – (FOrce) Force use of an unrecognised device ? [dyn.]
  • options (bool) – (OPtions) List possible device names? [dyn.]
Returns:

hard (str)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_HARD for full documentation of this command in the latest Starlink release

starlink.figaro.hcross(spectrum, template, basered, baserr, xstart, xend, **kwargs)[source]¶

Runs the command: $FIG_DIR/hcross .

Parameters:
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • template (str,filename) – (TEmplate) Name of template spectrum
  • basered (float) – (BASEred) Redshift of template spectrum
  • baserr (float) – (BASERR) Redshift error of template spectrum
  • xstart (float) – (XStart) First X value to be used
  • xend (float) – (XEnd) Last X value to be used
Keyword Arguments:
 
  • cbpc (float) – (CBpc) Percentage of spectrum covered by cosine bell
  • cross (str,filename) – (CRoss) Name of cross-correlation data?
  • basevel (float) – (BASEVel) Velocity (km/s) of template spectrum
  • baseverr (float) – (BASEVERR) Velocity error (km/s) of template spectrum
  • fitcont (bool) – (FICONT) Fit continuum? [dyn.]
  • record (bool) – (RECord) Create file to record cross-correlation?
  • velocities (bool) – [FALSE]
Returns:

  • conf (float)
  • rederr (float)
  • redshift (float)
  • shift (float)
  • velerr (float)
  • velocity (float)
  • warn (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_HCROSS for full documentation of this command in the latest Starlink release

starlink.figaro.himage(image, shrink, log, key, ystart, yend, xstart, xend, low, high, plotdev, aspect, **kwargs)[source]¶

Runs the command: $FIG_DIR/himage .

Parameters:
  • image (str) – Name of image to be displayed
  • shrink (bool) – Shrink image to display with wide margins
  • log (bool) – Display using logarithmic scaling
  • key (bool) – Plot a key beside the data
  • ystart (float) – First Y value to be displayed
  • yend (float) – Last Y value to be displayed
  • xstart (float) – First X value to be displayed
  • xend (float) – Last X value to be displayed
  • low (float) – Minimum count level for display
  • high (float) – Maximum count level for display
  • plotdev (str) – Plotting device
  • aspect (float) – Ratio X/Y for plot (excluding any key)
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_HIMAGE for full documentation of this command in the latest Starlink release

starlink.figaro.hist(image, minval, maxval, bins, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/hist .

Parameters:
  • image (str) – (IMage) Name of data to be histogrammed
  • minval (float) – (MInval) Minimum data value to be used
  • maxval (float) – (MAXval) Maximum data value to be used
  • bins (float) – (BIns) Number of histogram bins
  • spectrum (str) – (SPectrum) Name of resulting histogram

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_HIST for full documentation of this command in the latest Starlink release

starlink.figaro.hopt(image, minval, maxval, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/hopt .

Parameters:
  • image (str,filename) – (IMage) Name of image to be equalised
  • minval (float) – (MINval) Minimum data value to be used
  • maxval (float) – (MAXval) Maximum data value to be used
  • output (str,filename) – (OUTput) Name of resulting image
Keyword Arguments:
 
  • equalise (bool) – (EQualise) Generate equalised output data?
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_HOPT for full documentation of this command in the latest Starlink release

starlink.figaro.i2cmplx(idata, cdata, **kwargs)[source]¶

Runs the command: $FIG_DIR/i2cmplx .

Parameters:
  • idata (str,filename) – (IData) Data to become imaginary part of complex data
  • cdata (str,filename) – (CData) Resulting complex data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_I2CMPLX for full documentation of this command in the latest Starlink release

starlink.figaro.iadd(image, image1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/iadd .

Parameters:
  • image (str,filename) – (IMage) Name of first image
  • image1 (str,filename) – (IMAGE1) Name of second image
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IADD for full documentation of this command in the latest Starlink release

starlink.figaro.iarc(image, rstart, rwidth, file, **kwargs)[source]¶

Runs the command: $FIG_DIR/iarc .

Parameters:
  • image (str,filename) – (IMage) Image containing 2D arc to be fitted
  • rstart (float) – (RSTart) Central row at which to start fit
  • rwidth (float) – (RWidth) Number of rows to sum for each fit
  • file (str) – (FIle) Text file used for results
Keyword Arguments:
 
  • rsigma (float) – (RSIgma) Sigma to use for fit
  • gap (float) – (Gap) Max times old position used for missing line
  • sigmin (float) – (SIGmin) Minimum sigma for locked lines
  • chanshift (float) – Enter the constant shift to be added to all channel positions. [1005.0]
  • detail (bool) – (DEtail) Output full details of each fit? [dyn.]
  • lock (bool) – (LOck) Automatic search for lines to help lock fit?
  • spread (bool) – (SPRead) Perform initial search with increased sigma? [dyn.]
  • weight (bool) – (WEight) Weight the fit with the line strengths? [dyn.]
  • xcorr (bool) – (XCorr) Analyse successive spectra for shifts?
Returns:

  • iarc_wmax (float)
  • iarc_wmin (float)
  • nofits (int)
  • order (int)
  • rmsmax (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IARC for full documentation of this command in the latest Starlink release

starlink.figaro.icadd(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/icadd .

Parameters:
  • image (str,filename) – (IMage) Name of image to be added to
  • factor (float) – (FACtor) Additive constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICADD for full documentation of this command in the latest Starlink release

starlink.figaro.icdiv(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/icdiv .

Parameters:
  • image (str,filename) – (IMage) Name of image to be divided
  • factor (float) – (FACtor) Constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICDIV for full documentation of this command in the latest Starlink release

starlink.figaro.icmult(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/icmult .

Parameters:
  • image (str,filename) – (IMage) Name of image to be multiplied
  • factor (float) – (FACtor) Multiplicative constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICMULT for full documentation of this command in the latest Starlink release

starlink.figaro.icont(image, ystart, yend, xstart, xend, low, high, contours, label, **kwargs)[source]¶

Runs the command: $FIG_DIR/icont .

Parameters:
  • image (str) – (IMage) Name of image to be contoured
  • ystart (float) – (YStart) First Y value to be displayed
  • yend (float) – (YEnd) Last Y value to be displayed
  • xstart (float) – (XStart) First X value to be displayed
  • xend (float) – (XEnd) Last X value to be displayed
  • low (float) – (Low) Lowest contour level
  • high (float) – (High) Highest contour level
  • contours (float) – (COntours) Number of contour levels
  • label (str) – (LABel) Label for plot
Keyword Arguments:
 
  • thickness (float) – (THickness) Width of plotted lines
  • levels (float) – (LEvels) Explicit contour levels to use
  • adjust (bool) – (ADjust) Adjust scales so as to fill display?
  • byvalue (bool) – (BYvalue) Specify contour level array explicitly? [dyn.]
  • hard (str) – [ ]
  • hardcopy (bool) – (HArdcopy) Generate a hardcopy plot?
  • soft (str) – [ ]
Returns:

  • imfile (str)
  • pgenvarg (float)
  • tvhigh (float)
  • tvlow (float)
  • tvxen (float)
  • tvxst (float)
  • tvyen (float)
  • tvyst (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICONT for full documentation of this command in the latest Starlink release

starlink.figaro.iconv3(image, center, edge, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/iconv3 .

Parameters:
  • image (str,filename) – (IMage) Image to convolve with filter
  • center (float) – (Center) Central value for 3x3 convolution kernel
  • edge (float) – (Edge) Edge value for 3x3 convolution kernel
  • output (str,filename) – (OUTput) The resulting filtered image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICONV3 for full documentation of this command in the latest Starlink release

starlink.figaro.icor16(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/icor16 .

Parameters:
  • image (str,filename) – (IMage) Name of input image
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICOR16 for full documentation of this command in the latest Starlink release

starlink.figaro.icset(image, ystart, yend, xstart, xend, constant, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/icset .

Parameters:
  • image (str,filename) – (IMage) Image to be modified
  • ystart (float) – (YStart) First Y-value to be set to constant
  • yend (float) – (YEnd) Last Y-value to be set to constant
  • xstart (float) – (XStart) First X-value to be set to constant
  • xend (float) – (XEnd) Last X-value to be set to constant
  • constant (float) – (CONstant) Value of constant to set region to
  • output (str,filename) – (OUTput) Output file for modified data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICSET for full documentation of this command in the latest Starlink release

starlink.figaro.icsub(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/icsub .

Parameters:
  • image (str,filename) – (IMage) Name of image to be subtracted from
  • factor (float) – (FACtor) Constant to be subtracted from image
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICSUB for full documentation of this command in the latest Starlink release

starlink.figaro.icur(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/icur .

Keyword Arguments:
 
  • idev (str) – [0.]
  • imarray (float) – [0.]
  • imfile (str) – [ ]
Returns:

  • npixels (float)
  • xpixels (float)
  • ypixels (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ICUR for full documentation of this command in the latest Starlink release

starlink.figaro.idev(imagdev, **kwargs)[source]¶

Runs the command: $FIG_DIR/idev .

Parameters:

imagdev (str) – (IMAGDEV) Device to use for image display

Keyword Arguments:
 
  • draw (bool) – (DRaw) Output a test plot to the device? [dyn.]
  • force (bool) – (FOrce) Force use of an unrecognised device ? [dyn.]
  • options (bool) – (OPtions) List possible device names? [dyn.]
Returns:

idev (str)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IDEV for full documentation of this command in the latest Starlink release

starlink.figaro.idiff(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/idiff .

Parameters:
  • image (str,filename) – (IMage) Name of input image
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IDIFF for full documentation of this command in the latest Starlink release

starlink.figaro.idiv(image, image1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/idiv .

Parameters:
  • image (str,filename) – (IMage) Name of first image
  • image1 (str,filename) – (IMAGE1) Name of second image
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IDIV for full documentation of this command in the latest Starlink release

starlink.figaro.igconv(image, convol, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/igconv .

Parameters:
  • image (str,filename) – (IMage) Name of file to be convolved with an array
  • convol (str) – (COnvol) Text file that defines the convolution array
  • output (str,filename) – (OUTput) Name of resulting image file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IGCONV for full documentation of this command in the latest Starlink release

starlink.figaro.igcur(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/igcur .

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IGCUR for full documentation of this command in the latest Starlink release

starlink.figaro.igrey(image, ystart, yend, xstart, xend, low, high, label, **kwargs)[source]¶

Runs the command: $FIG_DIR/igrey .

Parameters:
  • image (str) – (IMage) Name of image to be grey-scaled
  • ystart (float) – (YStart) First Y value to be displayed
  • yend (float) – (YEnd) Last Y value to be displayed
  • xstart (float) – (XStart) First X value to be displayed
  • xend (float) – (XEnd) Last X value to be displayed
  • low (float) – (Low) Lowest data level used (black level)
  • high (float) – (High) Highest data level used (white level)
  • label (str) – (LABel) Label for plot
Keyword Arguments:
 
  • adjust (bool) – (ADjust) Adjust scales so as to fill display?
  • hard (str) – [ ]
  • hardcopy (bool) – (HArdcopy) Generate a hardcopy plot?
  • soft (str) – [ ]
Returns:

  • imfile (str)
  • pgenvarg (float)
  • tvhigh (float)
  • tvlow (float)
  • tvxen (float)
  • tvxst (float)
  • tvyen (float)
  • tvyst (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IGREY for full documentation of this command in the latest Starlink release

starlink.figaro.ilist(image, ystart, yend, xstart, xend, **kwargs)[source]¶

Runs the command: $FIG_DIR/ilist .

Parameters:
  • image (str,filename) – (IMage) Name of image to be listed
  • ystart (float) – (YStart) First Y value for list
  • yend (float) – (YEnd) Last Y value for list
  • xstart (float) – (XStart) First X value for list
  • xend (float) – (XEnd) Last X value for list
Keyword Arguments:
 

hardcopy (bool) – (HArdcopy) Produce a file containing list?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ILIST for full documentation of this command in the latest Starlink release

starlink.figaro.ilog(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ilog .

Parameters:
  • image (str,filename) – (IMage) Name of image to take log of
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ILOG for full documentation of this command in the latest Starlink release

starlink.figaro.image(image, yplaces, atx, aty, xorigin, yorigin, xpixels, ypixels, ystart, yend, xstart, xend, low, high, optimize, xplaces, **kwargs)[source]¶

Runs the command: $FIG_DIR/image .

Parameters:
  • image (str,filename) – (IMage) Name of image to be grey-scaled
  • yplaces (float) – (YPlaces) Number of sub-displays across screen in Y [1]
  • atx (float) – (ATX) Sub-display position in X to use [1]
  • aty (float) – (ATY) Sub-display position in Y to use [1]
  • xorigin (float) – (XOrigin) Origin of display in X in display pixels [0]
  • yorigin (float) – (YOrigin) Origin of display in Y in display pixels [0]
  • xpixels (float) – (XPIxels) Number of display pixels to use in X
  • ypixels (float) – (YPIxels) Number of display pixels to use in X
  • ystart (float) – (YStart) First Y value to be displayed
  • yend (float) – (YEnd) Last Y value to be displayed
  • xstart (float) – (XStart) First X value to be displayed
  • xend (float) – (XEnd) Last X value to be displayed
  • low (float) – (Low) Lowest data level used (black level) [0.]
  • high (float) – (High) Highest data level used (white level) [1000.]
  • optimize (float) – (OPTimize) Amount of histogram optimisation (0 to 1) [0.5]
  • xplaces (float) – (XPlaces) Number of sub-displays across screen in X [1]
Keyword Arguments:
 
  • aspect (bool) – (ASpect) Maintain correct aspect ratio for image? [T]
  • autoscale (bool) – (AUtoscale) Calculate display limits automatically [T]
  • erase (bool) – (ERASE) Erase screen before display [F]
  • hard (str) – [0.]
  • hardcopy (bool) – (HARDCOPY) Use “hard” devices rather than imaging device [dyn.]
  • idev (str) – [0.]
  • log (bool) – (LOG) Display using logarithmic scaling [dyn.]
  • negative (bool) – (NEgative) Set limits to give a negative image [dyn.]
Returns:

  • imarray (float)
  • imfile (str)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IMAGE for full documentation of this command in the latest Starlink release

starlink.figaro.impos(inpfle, **kwargs)[source]¶

Runs the command: $FIG_DIR/impos .

Parameters:inpfle (str) – Input file:
Returns:
  • npixels (float)
  • xpixels (float)
  • ypixels (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IMPOS for full documentation of this command in the latest Starlink release

starlink.figaro.imult(image, image1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/imult .

Parameters:
  • image (str,filename) – (IMage) Name of first image
  • image1 (str,filename) – (IMAGE1) Name of second image
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IMULT for full documentation of this command in the latest Starlink release

starlink.figaro.interp(spiketrum, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/interp .

Parameters:
  • spiketrum (str,filename) – (SPIketrum) Name of “spiketrum” to be interpolated
  • spectrum (str,filename) – (SPEctrum) Name of spectrum to be generated
Keyword Arguments:
 
  • linend (bool) – (LInend) Use linear interpolation at ends? [dyn.]
  • log (bool) – (Log) Fit to the log of the data? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_INTERP for full documentation of this command in the latest Starlink release

starlink.figaro.iplots(image, xstart, xend, ystart, yend, nspect, label, **kwargs)[source]¶

Runs the command: $FIG_DIR/iplots .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • xstart (float) – (Xstart) Start of spectrum to be plotted
  • xend (float) – (Xend) End of spectrum
  • ystart (float) – (Ystart) First spectrum to be plotted
  • yend (float) – (Yend) Last spectrum to be plotted
  • nspect (float) – (NSpect) Number of spectra per page
  • label (str) – (LABel) Label for plot
Keyword Arguments:
 
  • colour (str) – (COLour) Plot colour (Bl,Wh,R,G,B,Cy,Ma,Y)
  • autoscale (bool) – (AUtoscale) Scale each spectrum individually?
  • hard (str) – [ ]
  • hardcopy (bool) – (HArdcopy) Produce plot as a hard copy?
  • next (bool) – Want next page
  • soft (str) – [ ]
  • whole (bool) – (WHole) Plot all of cross-sections?
Returns:

  • tvcolor (float)
  • tvfile (str)
  • tvhigh (float)
  • tvlow (float)
  • tvxen (float)
  • tvxst (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IPLOTS for full documentation of this command in the latest Starlink release

starlink.figaro.ipower(image, power, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ipower .

Parameters:
  • image (str,filename) – (IMage) Name of image to raise to specified power
  • power (float) – (POwer) Power to which image is to be raised
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IPOWER for full documentation of this command in the latest Starlink release

starlink.figaro.irconv(spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/irconv .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to convert to W/m**2/um
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IRCONV for full documentation of this command in the latest Starlink release

starlink.figaro.irevx(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/irevx .

Parameters:
  • image (str,filename) – (IMage) Name of image to be reversed
  • output (str,filename) – (OUtput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IREVX for full documentation of this command in the latest Starlink release

starlink.figaro.irevy(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/irevy .

Parameters:
  • image (str,filename) – (IMage) Name of image to be reversed
  • output (str,filename) – (OUtput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IREVY for full documentation of this command in the latest Starlink release

starlink.figaro.irflat(spectrum, xstart, xend, period, more, **kwargs)[source]¶

Runs the command: $FIG_DIR/irflat .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum containing data
  • xstart (float) – (XStart) Start X value of region
  • xend (float) – (XEnd) End X value of region
  • period (float) – (PERiod) Period of Ripple (pixels)
  • more (bool) – (MORE) Include additional ranges?
Keyword Arguments:
 
  • cgs2 (bool) – CGS2 mode? [FALSE]
  • output (str,filename) – (OUTput) Name of resulting ripple spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IRFLAT for full documentation of this command in the latest Starlink release

starlink.figaro.irflux(spectrum, standard, temp, caltype, mag, flux, wave, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/irflux .

Parameters:
  • spectrum (str,filename) – (SPectrum) Name of Source spectrum
  • standard (str,filename) – (STandard) Name of Standard spectrum
  • temp (float) – (TEMP) Temperature of standard
  • caltype (str) – (CALtype) Type of calibration data
  • mag (float) – (MAG) magnitude of standard star
  • flux (float) – (FLux) Flux of standard star at calib wavelength (mJy)
  • wave (float) – (WAve) Calibration wavelength (microns)
  • output (str,filename) – (OUTput) Name of resulting spectrum
Keyword Arguments:
 

kmag (float) –

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IRFLUX for full documentation of this command in the latest Starlink release

starlink.figaro.irot90(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/irot90 .

Parameters:
  • image (str) – (IMage) Name of image to be rotated
  • output (str) – (OUTput) Name of resulting image
Keyword Arguments:
 

anti (bool) – (ANTI) Anti-clockwise rotation? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IROT90 for full documentation of this command in the latest Starlink release

starlink.figaro.iscan(image, xstart, xend, ystart, yend, yblock, scan, hardcopy, **kwargs)[source]¶

Runs the command: $FIG_DIR/iscan .

Parameters:
  • image (str) – Name of image for input
  • xstart (float) – display lower limit
  • xend (float) – display upper limit
  • ystart (int) – display lower limit
  • yend (int) – display upper limit
  • yblock (int) – Enter display x-sect width
  • scan (bool) – Scan through data
  • hardcopy (bool) – use hard graphics device for display
Keyword Arguments:
 
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISCAN for full documentation of this command in the latest Starlink release

starlink.figaro.iscrunch(image, file, wstart, wend, bins, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/iscrunch .

Parameters:
  • image (str,filename) – (IMage) Image to be scrunched
  • file (str) – (FIle) File containing results of 2D arc fit
  • wstart (float) – (WStart) Wavelength of center of first bin
  • wend (float) – (WEnd) Wavelength of center of last bin (or increment)
  • bins (float) – (BIns) Number of bins for scrunched image
  • output (str,filename) – (OUtput) Name of resulting scrunched image
Keyword Arguments:
 
  • density (bool) – (DENsity) Treat data as flux per unit wavelength?
  • final (bool) – (FInal) Treat WEND as a final wavelength value? [dyn.]
  • increment (bool) – (INCrement) Treat WEND value as an increment value? [dyn.]
  • linear (bool) – (LInear) Use linear interpolation for data?
  • log (bool) – (LOg) Bin into logarithmic wavelength bins?
  • quad (bool) – (Quad) Use quadratic interpolation for data?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISCRUNCH for full documentation of this command in the latest Starlink release

starlink.figaro.iscruni(image, file, file2, fraction, wstart, wend, bins, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/iscruni .

Parameters:
  • image (str,filename) – (IMage) Image to be scrunched
  • file (str) – (FIle) File containing results of 1st 2D arc fit
  • file2 (str) – (FILE2) File containing results of 2nd 2D arc fit
  • fraction (float) – (FRaction) Used = FILE+(FILE2-FILE)*FRACTION
  • wstart (float) – (WStart) Wavelength of center of first bin
  • wend (float) – (WEnd) Wavelength of center of last bin (or increment)
  • bins (float) – (BIns) Number of bins for scrunched image
  • output (str,filename) – (OUtput) Name of resulting scrunched image
Keyword Arguments:
 
  • density (bool) – (DENsity) Treat data as flux per unit wavelength?
  • final (bool) – (FInal) Treat WEND as a final wavelength value? [dyn.]
  • increment (bool) – (INCrement) Treat WEND value as an increment value? [dyn.]
  • linear (bool) – (LInear) Use linear interpolation for data?
  • log (bool) – (LOg) Bin into logarithmic wavelength bins?
  • quad (bool) – (Quad) Use quadratic interpolation for data?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISCRUNI for full documentation of this command in the latest Starlink release

starlink.figaro.isedit(image, xstart, xend, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isedit .

Parameters:
  • image (str,filename) – (IMage) The 1D or 2D data
  • xstart (float) – (XStart) First X-value to be plotted
  • xend (float) – (XEnd) Last X-value to be plotted
  • output (str,filename) – (OUTput) Name of resulting edited data
Keyword Arguments:
 
  • soft (str) – [ ]
  • whole (bool) – (WHole) Plot all of spectrum?
  • yvalue (float) – Y value to plot

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISEDIT for full documentation of this command in the latest Starlink release

starlink.figaro.ishift(image, xshift, yshift, xsplit, ysplit, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ishift .

Parameters:
  • image (str,filename) – (IMage) Name of image to be shifted
  • xshift (float) – (XSHift) Shift in X
  • yshift (float) – (YSHift) Shift in Y
  • xsplit (float) – (XSPlit) Subdivision of X pixels
  • ysplit (float) – (YSPlit) Subdivision of Y pixels
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISHIFT for full documentation of this command in the latest Starlink release

starlink.figaro.ismooth(image, fraction, repeat, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ismooth .

Parameters:
  • image (str,filename) – (IMage) Name of image to be smoothed
  • fraction (float) – (FRaction) Fraction of pixel data for redistribution
  • repeat (float) – (REpeat) Number of times to repeat basic smoothing
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISMOOTH for full documentation of this command in the latest Starlink release

starlink.figaro.isplot(image, ystart, yend, xstart, xend, high, low, **kwargs)[source]¶

Runs the command: $FIG_DIR/isplot .

Parameters:
  • image (str,filename) – (IMage) Image to be plotted
  • ystart (float) – (YStart) First Y value to be plotted
  • yend (float) – (YEnd) Last Y value to be plotted
  • xstart (float) – (XStart) First X-value to be plotted
  • xend (float) – (XEnd) Last X-value to be plotted
  • high (float) – (HIgh) Maximum data value to be plotted
  • low (float) – (LOw) Minimum data value to be plotted
Keyword Arguments:
 
  • offset (float) – (OFfset) Offset applied to bias up x-sects
  • slant (float) – (SLant) Offset in X to apply to successive x-sects
  • label (str) – (LABel) Label for plot
  • colour (str) – (COLour) Plot colour (Bl,Wh,R,G,B,Cy,Ma,Y)
  • autoscale (bool) – (AUtoscale) Scale so all of data fits?
  • axes (bool) – (AXes) Plot and label axes? [dyn.]
  • erase (bool) – (ERase) Erase screen before plotting? [dyn.]
  • hard (str) – [ ]
  • hardcopy (bool) – (HArdcopy) Produce plot as a hard copy?
  • reverse (bool) – (REVerse) Plot cross-sections is reverse order?
  • soft (str) – [ ]
  • whole (bool) – (WHole) Plot all of cross-sections?
Returns:

  • tvcolor (float)
  • tvdim (float)
  • tvfile (str)
  • tvhigh (float)
  • tvlow (float)
  • tvxen (float)
  • tvxst (float)
  • tvyen (float)
  • tvyst (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISPLOT for full documentation of this command in the latest Starlink release

starlink.figaro.istat(image, ystart, yend, xstart, xend, **kwargs)[source]¶

Runs the command: $FIG_DIR/istat .

Parameters:
  • image (str) – (IMage) Name of image to examine
  • ystart (float) – (YStart) First Y value to be used
  • yend (float) – (YEnd) Last Y value to be used
  • xstart (float) – (XStart) First X value to be used
  • xend (float) – (XEnd) Last X value to be used
Keyword Arguments:
 
  • median (bool) – (MEDian) Calculate median as well as other statistics? [dyn.]
  • pass2 (bool) – (PAss2) Pass twice through data for better sigma value? [dyn.]
Returns:

  • stat_max (float)
  • stat_mean (float)
  • stat_median (float)
  • stat_min (float)
  • stat_sigma (float)
  • stat_size (float)
  • stat_total (float)
  • stat_xend (float)
  • stat_xmax (float)
  • stat_xmin (float)
  • stat_xstart (float)
  • stat_yend (float)
  • stat_ymax (float)
  • stat_ymin (float)
  • stat_ystart (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISTAT for full documentation of this command in the latest Starlink release

starlink.figaro.istretch(image, xstretch, ystretch, xshift, yshift, xsplit, ysplit, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/istretch .

Parameters:
  • image (str,filename) – (IMage) Name of image to be stretched
  • xstretch (float) – (XSTretch) Stretch factor in X
  • ystretch (float) – (YSTretch) Stretch factor in Y
  • xshift (float) – (XSHift) Shift in X
  • yshift (float) – (YSHift) Shift in Y
  • xsplit (float) – (XSPlit) Subdivision of X pixels
  • ysplit (float) – (YSPlit) Subdivision of Y pixels
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISTRETCH for full documentation of this command in the latest Starlink release

starlink.figaro.isub(image, image1, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isub .

Parameters:
  • image (str,filename) – (IMage) Name of first image
  • image1 (str,filename) – (IMAGE1) Name of second image
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISUB for full documentation of this command in the latest Starlink release

starlink.figaro.isubset(image, ystart, yend, xstart, xend, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isubset .

Parameters:
  • image (str) – (IMage) Name of image to subset
  • ystart (float) – (YStart) First Y value for subset
  • yend (float) – (YEnd) Last Y value for subset
  • xstart (float) – (XStart) First X value for subset
  • xend (float) – (XEnd) Last X value for subset
  • output (str) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISUBSET for full documentation of this command in the latest Starlink release

starlink.figaro.isuper(image, xsize, ysize, xpixel, ypixel, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isuper .

Parameters:
  • image (str,filename) – (IMage) Image to be supersetted
  • xsize (float) – (XSize) X-dimension of superset image
  • ysize (float) – (YSize) Y-dimension of superset image
  • xpixel (float) – (XPixel) X-Position in output of input pixel (1,1)
  • ypixel (float) – (YPixel) Y-Position in output of input pixel (1,1)
  • output (str,filename) – (OUTput) Name of resulting superset image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISUPER for full documentation of this command in the latest Starlink release

starlink.figaro.isxadd(image, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isxadd .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISXADD for full documentation of this command in the latest Starlink release

starlink.figaro.isxdiv(image, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isxdiv .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISXDIV for full documentation of this command in the latest Starlink release

starlink.figaro.isxmul(image, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isxmul .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISXMUL for full documentation of this command in the latest Starlink release

starlink.figaro.isxsub(image, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isxsub .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISXSUB for full documentation of this command in the latest Starlink release

starlink.figaro.isyadd(image, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isyadd .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISYADD for full documentation of this command in the latest Starlink release

starlink.figaro.isydiv(image, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isydiv .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISYDIV for full documentation of this command in the latest Starlink release

starlink.figaro.isymul(image, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isymul .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISYMUL for full documentation of this command in the latest Starlink release

starlink.figaro.isysub(image, spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/isysub .

Parameters:
  • image (str,filename) – (IMage) Name of image
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ISYSUB for full documentation of this command in the latest Starlink release

starlink.figaro.ixsmooth(image, sigma, width, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ixsmooth .

Parameters:
  • image (str,filename) – (IMage) Name of data to be smoothed
  • sigma (float) – (SIgma) Gaussian half width in pixels
  • width (float) – (WIdth) Pixels over which gaussian is calculated
  • output (str,filename) – (OUTput) Name of resulting data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_IXSMOOTH for full documentation of this command in the latest Starlink release

starlink.figaro.linterp(spiketrum, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/linterp .

Parameters:
  • spiketrum (str,filename) – (SPIketrum) Name of “spiketrum” to be interpolated
  • spectrum (str,filename) – (SPEctrum) Name of spectrum to be generated

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_LINTERP for full documentation of this command in the latest Starlink release

starlink.figaro.longslit(image, arc_opts, ystart, yend, yblock, iteration, maxlines, clfile, outable, **kwargs)[source]¶

Runs the command: $FIG_DIR/longslit .

Parameters:
  • image (str) – Name of image for input
  • arc_opts (str) – Fit option
  • ystart (float) – analysis lower limit
  • yend (float) – analysis upper limit
  • yblock (float) – Analysis x-sect blocking width
  • iteration (int) – New value of iteration
  • maxlines (int) – Maximum number of lines to allow room for
  • clfile (str) – Name of image for cloning from
  • outable (str) – Name for EXTATIC file
Keyword Arguments:
 
  • vcorr (float) – correction to apply to radial velocities [dyn.]
  • tols (str) – For use in batch only [dyn.]
  • inherit (int) – Number to control inheritance of previous fits [dyn.]
  • device (str) – Device to use for plotting
  • fitrat (float) – Ratio of widths, heights, or separation, for double fits
  • calrat (int) – Ratio of number of iteration to default [dyn.]
  • white (float) – Level to be recorded as white
  • black (float) – Level to be recorded as black
  • maxgauss (int) – Maximum number of Gaussians to allow room for
  • tstart (float) – analysis lower limit
  • tend (float) – analysis upper limit
  • tblock (float) – Analysis blocking width in T direction
  • fit_model (str) – Model of fit to perform
  • plotlim (List[ERROR]) – Limits of plot (world coordinates) [dyn.]
  • output (str) – OUTPut Name of output file
  • hardcopy (bool) – produce hardcopy plots of fits from cube [dyn.]
  • table (bool) – produce table of fits from cube [dyn.]
  • plot (bool) – produce plots of rotation curves [dyn.]
  • print (bool) – produce print out of rotation curves [dyn.]
  • shape (bool) – carry out shape analysis [dyn.]
  • keep_itt (bool) – keep iteration files [dyn.]
  • fit (bool) – perform fitting [dyn.]
  • copy (bool) – copy previous fits [dyn.]
  • absorption (bool) – Allow fitting of absorption lines [dyn.]
  • bounds (bool) – Perform bounded fits to lines (in batch) [dyn.]
  • label (bool) – Label graphs (velocity plots and profile plots [dyn.]
  • contour (bool) – Create contour plot(s) [dyn.]
  • grey (bool) – Create greyscale plot(s) [dyn.]
  • log (bool) – Use logarithmic scale
  • weights (bool) – Use weights for fitting [dyn.]
  • prfits (bool) – Print out details of fitting [dyn.]
  • full (bool) – Print out full details of fits in table [dyn.]
  • check (bool) – Plot array of line profiles [dyn.]
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_LONGSLIT for full documentation of this command in the latest Starlink release

starlink.figaro.lsplot(spectrum, xsize, ysize, xstart, xend, high, low, bias, label, **kwargs)[source]¶

Runs the command: $FIG_DIR/lsplot .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be plotted
  • xsize (float) – (XSIze) Plot length in metres
  • ysize (float) – (YSIze) Height of plot in metres
  • xstart (float) – (XStart) First X-value to be plotted
  • xend (float) – (XEnd) Last X-value to be plotted
  • high (float) – (HIgh) Maximum data value to be plotted
  • low (float) – (LOw) Minimum data value to be plotted
  • bias (float) – (BIas) Bias value to be added to data
  • label (str) – (LABel) Label for plot
Keyword Arguments:
 
  • autoscale (bool) – (AUtoscale) Scale so all of spectrum fits?
  • hard (str) – [ ]
  • lines (bool) – (LINes) Use a line plot (not a histogram)? [dyn.]
  • whole (bool) – (WHole) Plot all of spectrum?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_LSPLOT for full documentation of this command in the latest Starlink release

starlink.figaro.lxset(image, wstart, wend, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/lxset .

Parameters:
  • image (str,filename) – (IMage) Image whose X values are to be set
  • wstart (float) – (WStart) Wavelength of center of first bin
  • wend (float) – (WEnd) Wavelength of center of last bin
  • output (str,filename) – (OUtput) Name of modified image
Keyword Arguments:
 

log (bool) – (LOg) Bin into logarithmic wavelength bins?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_LXSET for full documentation of this command in the latest Starlink release

starlink.figaro.lyset(image, vstart, vend, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/lyset .

Parameters:
  • image (str,filename) – (IMage) Image whose Y values are to be set
  • vstart (float) – (VStart) Value of center of first bin
  • vend (float) – (VEnd) Value of center of last bin
  • output (str,filename) – (OUtput) Name of modified image
Keyword Arguments:
 

log (bool) – (LOg) Set logarithmic Y values?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_LYSET for full documentation of this command in the latest Starlink release

starlink.figaro.mask(spectrum, table, mask, **kwargs)[source]¶

Runs the command: $FIG_DIR/mask .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to generate mask from
  • table (str) – (TAble) Table file giving regions to be masked
  • mask (str,filename) – (MAsk) Name of mask to be generated

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MASK for full documentation of this command in the latest Starlink release

starlink.figaro.maskext(image, mask, mlow, mhigh, subord, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/maskext .

Parameters:
  • image (str,filename) – (IMage) name of image containing spectra
  • mask (str,filename) – (MAsk) name of mask image
  • mlow (float) – (MLow) Lowest order number to extract
  • mhigh (float) – (MHigh) Highest order number to extract
  • subord (float) – (SUBord) Sub-order to extract (0 => all)
  • output (str,filename) – (OUTput) Name of resulting set of spectra
Keyword Arguments:
 

reverse (bool) – (REVerse) Create output with order numbers reversed? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MASKEXT for full documentation of this command in the latest Starlink release

starlink.figaro.mcfit(spectrum, mask, points, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/mcfit .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be fitted
  • mask (str,filename) – (MAsk) Data to be used as a mask for the fit
  • points (float) – (POints) Number of splines to use in the fit
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MCFIT for full documentation of this command in the latest Starlink release

starlink.figaro.medfilt(image, box, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/medfilt .

Parameters:
  • image (str,filename) – (IMage) Name of image to be smoothed
  • box (float) – (Box) Size of box for median calculations
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MEDFILT for full documentation of this command in the latest Starlink release

starlink.figaro.medfiltr(image, xbox, ybox, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/medfiltr .

Parameters:
  • image (str,filename) – (IMage) Name of image to be smoothed
  • xbox (str) – (XBox) X-dimension of box for median calculations
  • ybox (str) – (YBox) Y-dimension of box for median calculations
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MEDFILTR for full documentation of this command in the latest Starlink release

starlink.figaro.medsky(files, output, imglog, **kwargs)[source]¶

Runs the command: $FIG_DIR/medsky .

Parameters:
  • files (str) – (FILE) File containing list of images or spectra
  • output (str,filename) – (OUTput) The file containing the medians of the inputs
  • imglog (str,filename) – (IMGlog) Image to contain median origin values?
Keyword Arguments:
 
  • log (bool) – (LOG) Create an image showing origins of median values? [dyn.]
  • scaled (bool) – (SCale) Scale input images relative to the first?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MEDSKY for full documentation of this command in the latest Starlink release

starlink.figaro.moments(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/moments .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • comp (int) – Component number for storage [0]
  • bias (float) – Continuum level [0]
  • info (bool) – Issue informational messages [YES]
  • varuse (bool) – Use input variances if available [YES]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MOMENTS for full documentation of this command in the latest Starlink release

starlink.figaro.movie(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/movie .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • axis (int) – Frame-counting axis [3]
  • delay (float) – Delay in seconds between frames [0.]
  • device (GRAPHICS) – Graphics device
  • dialog (str) – Allow extensive interaction [‘F’]
  • frame (int) – Frame number to display
  • high (float) – Maximum data for display
  • info (bool) – Issue informational messages [YES]
  • low (float) – Minimum data for display
  • menu (str) – Display option (FBIPNQ) [F]
  • mode (str) – Operation mode (fast/square/fill) [‘Fast’]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MOVIE for full documentation of this command in the latest Starlink release

starlink.figaro.msplot(spectrum, xstart, xend, nspect, xrange, label, **kwargs)[source]¶

Runs the command: $FIG_DIR/msplot .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be plotted
  • xstart (float) – (XStart) First X-value to be plotted
  • xend (float) – (XEnd) Last X-value to be plotted
  • nspect (float) – (NSpect) Number of spectra per page
  • xrange (float) – (XRange) Range in X for each spectrum
  • label (str) – (LABel) Label for plot
Keyword Arguments:
 
  • colour (str) – (COLour) Plot colour (Bl,Wh,R,G,B,Cy,Ma,Y)
  • thickness (float) – (THickness) Plotted line width
  • hard (str) – [ ]
  • hardcopy (bool) – (HArdcopy) Produce plot as a hard copy?
  • next (bool) – Ready for next page
  • samescale (bool) – (SAmescale) Use same scale for each spectrum?
  • soft (str) – [ ]
  • whole (bool) – (WHole) Plot all of spectrum?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_MSPLOT for full documentation of this command in the latest Starlink release

starlink.figaro.ncset(spectrum, xstart, xend, value, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ncset .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be set
  • xstart (float) – (XStart) First X-value to be set to constant
  • xend (float) – (XEnd) Last X-value to be set to constant
  • value (float) – (Value) Constant value to set region to
  • output (str,filename) – (OUtput) Output file for modified data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_NCSET for full documentation of this command in the latest Starlink release

starlink.figaro.offdist(infile, offset, outfile, **kwargs)[source]¶

Runs the command: $FIG_DIR/offdist .

Parameters:
  • infile (str) – (INfile) Name of distortion file to be modified
  • offset (float) – (OFfset) Offset in Y to be applied
  • outfile (str) – (OUtfile) Name of new distortion file to be created

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_OFFDIST for full documentation of this command in the latest Starlink release

starlink.figaro.optextract(image, profile, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/optextract .

Parameters:
  • image (str,filename) – (IMage) The 2D data to be reduced to a spectrum
  • profile (str,filename) – (PROFile) The normalized spatial profile
  • spectrum (str,filename) – (SPectrum) Name of resulting spectrum
Keyword Arguments:
 

weight (bool) – (WEIght) Use errors to weight data?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_OPTEXTRACT for full documentation of this command in the latest Starlink release

starlink.figaro.overpf(image, repeat, black, white, pfile, ystart, yend, xstart, xend, extwid, **kwargs)[source]¶

Runs the command: $FIG_DIR/overpf .

Parameters:
  • image (str,filename) – (IMage) Image to be overlayed
  • repeat (str) – (REpeat) ?
  • black (float) – (BLack) Black level for display?
  • white (float) – (WHite) White level for display?
  • pfile (str) – (PFile) Name of file containing polynomial fits
  • ystart (float) – (YStart) First Y value to be displayed
  • yend (float) – (YEnd) Last Y value to be displayed
  • xstart (float) – (XStart) First X value to be displayed
  • xend (float) – (XEnd) Last X value to be displayed
  • extwid (float) – (EXtwid) Extraction full width in pixels to be overlayed
Keyword Arguments:
 

soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_OVERPF for full documentation of this command in the latest Starlink release

starlink.figaro.peak(spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/peak .

Parameters:spectrum (str,filename) – (SPectrum) File containing peak to be analysed
Returns:
  • shift (float)
  • width (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_PEAK for full documentation of this command in the latest Starlink release

starlink.figaro.polext(image, pfile, dfile, extwidth, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/polext .

Parameters:
  • image (str,filename) – (IMage) Image containing fibre data
  • pfile (str) – (PFile) Polynomial file to be used to find spectra
  • dfile (str) – (DFile) File listing dud fibres
  • extwidth (float) – (EXtwidth) Width of spectra in pixels
  • output (str,filename) – (OUTput) Fibre image to be created

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_POLEXT for full documentation of this command in the latest Starlink release

starlink.figaro.polysky(image, ys1, ye1, ys2, ye2, degree, nreject, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/polysky .

Parameters:
  • image (str,filename) – (IMage) The input 2D data
  • ys1 (float) – (YS1) Y start for first sky region
  • ye1 (float) – (YE1) Y end for first sky region
  • ys2 (float) – (YS2) Y start for second sky region
  • ye2 (float) – (YE2) Y end for second sky region
  • degree (float) – (DEGree) Degree of polynomial
  • nreject (float) – (NREJect) Number of points to reject from each column
  • output (str,filename) – (OUTput) Name of resulting sky subtracted data
Keyword Arguments:
 

weight (bool) – (WEIght) Use errors to weight fit?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_POLYSKY for full documentation of this command in the latest Starlink release

starlink.figaro.profile(image, ystart, yend, degree, nreject, profile, residual, **kwargs)[source]¶

Runs the command: $FIG_DIR/profile .

Parameters:
  • image (str,filename) – (IMage) The input 2D data
  • ystart (float) – (YStart) Y start for window
  • yend (float) – (YEnd) Y end for window
  • degree (float) – (DEGree) Degree of polynomial
  • nreject (float) – (NREJect) Number of points to reject
  • profile (str,filename) – (PROFile) Name of resulting profile image
  • residual (str,filename) – (RESIDual) Name of image containing residuals
Keyword Arguments:
 

weight (bool) – (WEIght) Use errors to weight fit?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_PROFILE for full documentation of this command in the latest Starlink release

starlink.figaro.q2bad(in_, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/q2bad .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Output NDF

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_Q2BAD for full documentation of this command in the latest Starlink release

starlink.figaro.qual2flag(input, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/qual2flag .

Parameters:
  • input (str) – (INput) Name of file to have the quality array removed
  • output (str) – (OUTput) Name of resulting file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_QUAL2FLAG for full documentation of this command in the latest Starlink release

starlink.figaro.r2cmplx(rdata, cdata, **kwargs)[source]¶

Runs the command: $FIG_DIR/r2cmplx .

Parameters:
  • rdata (str,filename) – (RData) Data to become real part of complex data
  • cdata (str,filename) – (CData) Resulting complex data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_R2CMPLX for full documentation of this command in the latest Starlink release

starlink.figaro.rcgs2(file, obs, scan, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/rcgs2 .

Parameters:
  • file (str) – (FIle) Name of container file to be read
  • obs (float) – (OBS) Observation number
  • scan (float) – (SCAN) Scan number (0 for coadded data)
  • output (str,filename) – (OUTPUT) Figaro file to be created
Keyword Arguments:
 

twod (bool) – (TWOD) Create 2D file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_RCGS2 for full documentation of this command in the latest Starlink release

starlink.figaro.rdfits(file, image, **kwargs)[source]¶

Runs the command: $FIG_DIR/rdfits .

Parameters:
  • file (str) – (FIle) Name of “Disk FITS” format file
  • image (str) – (IMage) Name of resulting image
Keyword Arguments:
 
  • float (bool) – (FLoat) Convert data to floating point?
  • swap (bool) – (SWap) Swap byte order?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_RDFITS for full documentation of this command in the latest Starlink release

starlink.figaro.rdipso(file, code, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/rdipso .

Parameters:
  • file (str) – (FIle) Name of DIPSO format file to be read
  • code (float) – (Code) Data format code for input file (0,1,2)
  • spectrum (str,filename) – (SPectrum) Figaro file to be created

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_RDIPSO for full documentation of this command in the latest Starlink release

starlink.figaro.rembad(spectrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/rembad .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum containing bad points
  • output (str,filename) – (OUTput) Name of resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_REMBAD for full documentation of this command in the latest Starlink release

starlink.figaro.renobj(source, destin, **kwargs)[source]¶

Runs the command: $FIG_DIR/renobj .

Parameters:
  • source (HDSOBJECT) – HDS object to be renamed
  • destin (HDSOBJECT) – Destination of renamed HDS object

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_RENOBJ for full documentation of this command in the latest Starlink release

starlink.figaro.resamp(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/resamp .

Keyword Arguments:
 
  • mode (str) – Average SPECTRA or resample rows in CUBE (S/C) [‘Cube’]
  • inlist (str) – Group of input NDFs
  • out (str,filename) – Output NDF
  • start (float) – Output start coordinate
  • step (float) – Output coordinate step
  • end (float) – Output end coordinate
  • info (bool) – Issue informational messages [YES]
  • varuse (bool) – Use input variances and ignore input without variance [YES]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_RESAMP for full documentation of this command in the latest Starlink release

starlink.figaro.resample(image, **kwargs)[source]¶

Runs the command: $FIG_DIR/resample .

Parameters:

image (str,filename) – (IMage) Image to be resampled

Keyword Arguments:
 
  • transform (float) – (Transform) The transformation coefficients
  • xmag (float) – (XMag) X magnification
  • ymag (float) – (YMag) Y magnification
  • angle (float) – (ANGle) Rotation angle
  • method (str) – (Method) The interpolation method (1, 2, or 3)
  • xsize (str) – (XSize) X-dimension of output image
  • ysize (str) – (YSize) Y-dimension of output image
  • invalid (str) – (INValid) Value of an invalid pixel
  • output (str,filename) – (OUTput) Name of resulting image
  • invert (bool) – (INvert) Invert the transformation? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_RESAMPLE for full documentation of this command in the latest Starlink release

starlink.figaro.rescale(image, lowfact, highfact, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/rescale .

Parameters:
  • image (str,filename) – (IMage) Name of image to be rescaled
  • lowfact (float) – (LOWfact) lower limit of rescaling
  • highfact (float) – (HIGHfact) upper limit of rescaling
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_RESCALE for full documentation of this command in the latest Starlink release

starlink.figaro.retype(input, type, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/retype .

Parameters:
  • input (str) – (INput) Name of file for which data type is to be changed
  • type (str) – (TYpe) New type for data array
  • output (str) – (OUTput) Name of resulting data file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_RETYPE for full documentation of this command in the latest Starlink release

starlink.figaro.rotx(image, pixels, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/rotx .

Parameters:
  • image (str,filename) – (IMage) Name of data to be rotated in X
  • pixels (float) – (PIXels) Number of pixels to rotate data
  • output (str,filename) – (OUtput) Name of resulting rotated data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_ROTX for full documentation of this command in the latest Starlink release

starlink.figaro.sclean(image, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/sclean .

Parameters:
  • image (str,filename) – (IMage) Name of image to be cleaned
  • output (str,filename) – (OUTput) Name of resulting image
Keyword Arguments:
 
  • idev (str) – Device for image display [dyn.]
  • quit (bool) – Terminate cleaning process [FALSE]
  • deg (, 0- 7) – Degree of fit to use for interpolation [2]
  • xsize (, 1- 20) – Side of box deleted by “X” and “Y”, in X [5]
  • ysize (, 1- 20) – Side of box deleted by “X” and “Y”, in Y [5]
  • high (float) – Highest displayed data value
  • low (float) – Lowest displayed data value
  • logfile (str,filename) – Log file [!]
  • batchfile (str,filename) – File containing commands for batch operation (!=interactive) [!]
  • bitnum (, 0-7) – Bit number of quality mask to modify for bad pixels [dyn.]
  • zoom (, 1-24) – Pixel magnification factor in Expanded and SCUBA modes [6]
Returns:

  • imarray (float)
  • imfile (str)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SCLEAN for full documentation of this command in the latest Starlink release

starlink.figaro.scnsky(image, section, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/scnsky .

Parameters:
  • image (str,filename) – (IMage) name of image to obtain sky from
  • section (float) – (SECtion) Length of each Y-section
  • spectrum (str,filename) – (SPectrum) name of spectrum to be generated
Keyword Arguments:
 
  • minimum (float) – (MINimum) Minimum valid pixel value
  • limit (bool) – (LImit) Ignore pixels below a minimum value? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SCNSKY for full documentation of this command in the latest Starlink release

starlink.figaro.scross(spectrum, template, xstart, xend, **kwargs)[source]¶

Runs the command: $FIG_DIR/scross .

Parameters:
  • spectrum (str,filename) – (SPectrum) Name of spectrum
  • template (str,filename) – (TEmplate) Name of template spectrum
  • xstart (float) – (XStart) First X value to be used
  • xend (float) – (XEnd) Last X value to be used
Keyword Arguments:
 
  • cbpc (float) – (CBpc) Percentage of spectrum covered by cosine bell
  • cross (str,filename) – (CRoss) Name of cross-correlation data?
  • fitcont (bool) – (FItcont) Fit continuum to data prior to cosine bell? [dyn.]
  • record (bool) – (RECord) Create file to record cross-correlation?
Returns:

shift (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SCROSS for full documentation of this command in the latest Starlink release

starlink.figaro.scrunch(spectrum, wstart, wend, bins, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/scrunch .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be scrunched
  • wstart (float) – (WStart) Wavelength of center of first bin
  • wend (float) – (WEnd) Wavelength of center of last bin (or increment)
  • bins (float) – (BIns) Number of bins for scrunched spectrum
  • output (str,filename) – (OUtput) Name of scrunched spectrum
Keyword Arguments:
 
  • final (bool) – (FInal) Treat WEND as a final wavelength value? [dyn.]
  • flux (bool) – (Flux) Conserve flux (as opposed to mean value)?
  • increment (bool) – (INCrement) Treat WEND value as an increment value? [dyn.]
  • linear (bool) – (LInear) Use linear interpolation for data?
  • log (bool) – (LOg) Bin into logarithmic wavelength bins?
  • mean (bool) – (Mean) Conserve mean value (as opposed to flux)?
  • quad (bool) – (Quad) Use quadratic interpolation for data?
Returns:

  • scrunch_end (float)
  • scrunch_inc (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SCRUNCH for full documentation of this command in the latest Starlink release

starlink.figaro.sdist(image, columns, trace, width, maxdeg, **kwargs)[source]¶

Runs the command: $FIG_DIR/sdist .

Parameters:
  • image (str,filename) – (IMage) Image containing distortion spectra
  • columns (float) – (COLumns) Number of cols to average to get peaks
  • trace (str) – (TRace) Trace mode - G(aussian) B(al) C(OG) or E(dge)
  • width (float) – (WIdth) Half width of spectra - in pixels
  • maxdeg (float) – (MAXdeg) Maximum degree polynomial to use
Keyword Arguments:
 
  • diagnose (bool) – (DIAgnose) Output details of trace failures? [dyn.]
  • next (bool) – Ready for next spectrum
  • npixels (float) – [0.]
  • soft (str) – [ ]
  • softd (bool) – (SOftd) Display results on graphics device?
  • xpixels (float) – [0.]
  • ypixels (float) – [0.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SDIST for full documentation of this command in the latest Starlink release

starlink.figaro.setobj(value, object, **kwargs)[source]¶

Runs the command: $FIG_DIR/setobj .

Parameters:
  • value (str) – New value for HDS scalar
  • object (HDSOBJECT) – HDS object to be assigned a value

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SETOBJ for full documentation of this command in the latest Starlink release

starlink.figaro.sfit(spectrum, order, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/sfit .

Parameters:
  • spectrum (str,filename) – (SPectrum) Name of spectrum to be fitted
  • order (float) – (ORder) Order of fitted polynomial
  • output (str,filename) – (OUTput) Name of resulting spectrum
Keyword Arguments:
 

logs (bool) – (LOgs) Fit to logarithms of data

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SFIT for full documentation of this command in the latest Starlink release

starlink.figaro.skyliner(in_, sky, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/skyliner .

Parameters:
  • in_ (str,filename) – Input NDF
  • sky (str,filename) – Sky spectrum
  • out (str,filename) – Output NDF

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SKYLINER for full documentation of this command in the latest Starlink release

starlink.figaro.slice(image, ystart, yend, xstart, xend, elements, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/slice .

Parameters:
  • image (str,filename) – (IMage) Image from which slice is taken
  • ystart (float) – (YStart) Y value of start of slice
  • yend (float) – (YEnd) Y value of end of slice
  • xstart (float) – (XStart) X value for start of slice
  • xend (float) – (XEnd) X value of end of slice
  • elements (float) – (ELements) Number of pixels in resulting spectrum
  • spectrum (str,filename) – (SPectrum) Resulting spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SLICE for full documentation of this command in the latest Starlink release

starlink.figaro.soft(softdev, **kwargs)[source]¶

Runs the command: $FIG_DIR/soft .

Parameters:

softdev (str) – (SOftdev) Device to use for soft plots

Keyword Arguments:
 
  • draw (bool) – (DRaw) Output a test plot to the device? [dyn.]
  • force (bool) – (FOrce) Force use of an unrecognised device ? [dyn.]
  • options (bool) – (OPtions) List possible device names? [dyn.]
Returns:

soft (str)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SOFT for full documentation of this command in the latest Starlink release

starlink.figaro.speccont(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/speccont .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • axes (str) – Draw axes [‘++++’]
  • bottom (str) – Label for bottom axis [!]
  • clear (bool) – Clear the active part of screen [FALSE]
  • colour (, 0- 255) – Colour index [1]
  • dash (, 1- 5) – Dash pattern code [1]
  • device (GRAPHICS) – Graphics device
  • end (float) – Last contour value
  • fill (bool) – Ignore image aspect ratio [FALSE]
  • height (, 0.01 40.) – Character height (marker size) [1.]
  • labspc (List[float]) – Space for labelling [0.1,0.1,0.05,0.05]
  • left (str) – Label for left axis [!]
  • major (float) – Interval between major ticks [0.,0.]
  • minor (int) – No. of minor intervals per major interval [0,0]
  • mode (str) – Contour stepping (linear/free) [Linear]
  • numl (str) – Write numerical labels [‘++00’]
  • overlay (bool) – Overlay on existing data [FALSE]
  • right (str) – Label for right axis [!]
  • roman (bool) – Use nicer font [FALSE]
  • start (float) – First contour value
  • step (float) – Step between contours
  • text (str) – Write text labels [‘++++’]
  • thick (, 1- 21) – Line thickness [1]
  • tick (str) – Draw ticks [‘—-‘]
  • top (str) – Label for top axis [!]
  • world (List[float]) – World coordinates [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SPECCONT for full documentation of this command in the latest Starlink release

starlink.figaro.specgrid(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/specgrid .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • axes (str) – Draw axes [‘++++’]
  • bin (bool) – Bin-style connections [FALSE]
  • bottom (str) – Label for bottom axis [!]
  • cellsz (List[float]) – Size of spectral cells [1.,1.]
  • clear (bool) – Clear the active part of screen [FALSE]
  • colour (, 0- 255) – Colour index [1]
  • cworld (List[float]) – World coordinates [!]
  • dash (, 1- 5) – Dash pattern code [1]
  • device (GRAPHICS) – Graphics device
  • error (bool) – Error bars [FALSE]
  • fill (bool) – Fill area available [FALSE]
  • frame (bool) – Frame for each cell [TRUE]
  • height (, 0.01 40.) – Character height (marker size) [1.]
  • labspc (List[float]) – Space for labelling [0.1,0.1,0.05,0.05]
  • left (str) – Label for left axis [!]
  • legend (List[float]) – Position of legend cell [!]
  • lin (bool) – Line-style connections [TRUE]
  • major (float) – Interval between major ticks [0.,0.]
  • mark (, 0- 6) – Marker symbol [0]
  • minor (int) – No. of minor intervals per major interval [0,0]
  • numl (str) – Write numerical labels [‘++00’]
  • overlay (bool) – Overlay on existing data [FALSE]
  • right (str) – Label for right axis [!]
  • roman (bool) – Use nicer font [FALSE]
  • sworld (List[float]) – World coordinates within cells [!]
  • text (str) – Write text labels [‘++++’]
  • thick (, 1- 21) – Line thickness [1]
  • tick (str) – Draw ticks [—-]
  • top (str) – Label for top axis [!]
  • width (bool) – Pixel width bars [FALSE]
  • xlegend (str) – Label for bottom of legend cell [!]
  • ylegend (str) – Label for left of legend cell [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SPECGRID for full documentation of this command in the latest Starlink release

starlink.figaro.specplot(in_, **kwargs)[source]¶

Runs the command: $FIG_DIR/specplot .

Parameters:

in_ (str,filename) – Input NDF

Keyword Arguments:
 
  • axes (str) – Draw axes [‘++++’]
  • bin (bool) – Bin-style connections [FALSE]
  • bottom (str) – Label for bottom axis
  • clear (bool) – Clear the active part of screen [FALSE]
  • colour (, 0- 255) – Colour index [1]
  • dash (, 1- 5) – Dash pattern code [1]
  • device (GRAPHICS) – Graphics device
  • error (bool) – Error bars [FALSE]
  • height (, 0.01 40.) – Character height (marker size) [1.]
  • info (bool) – Issue informational messages [TRUE]
  • labspc (List[float]) – Space for labelling
  • left (str) – Label for left axis
  • lin (bool) – Line-style connections [TRUE]
  • major (List[float]) – Interval between major ticks [0.,0.]
  • mark (, 0- 6) – Marker symbol [0]
  • minor (List[int]) – No. of minor intervals per major interval [0,0]
  • northo (float) – Expected length of orthogonal numeric labels [1]
  • numl (str) – Write numerical labels [‘++00’]
  • overlay (bool) – Overlay on existing data [FALSE]
  • right (str) – Label for right axis
  • roman (bool) – Use nicer font [FALSE]
  • text (str) – Write text labels [‘+++0’]
  • thick (, 1- 21) – Line thickness [1]
  • tick (str) – Draw ticks [‘—-‘]
  • top (str) – Label for top axis
  • width (bool) – Pixel width bars [FALSE]
  • world (List[float]) – World coordinates

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SPECPLOT for full documentation of this command in the latest Starlink release

starlink.figaro.spflux(spectrum, calspect, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/spflux .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be calibrated
  • calspect (str,filename) – (CALspect) Calibration spectrum
  • output (str,filename) – (OUTput) Resulting calibrated spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SPFLUX for full documentation of this command in the latest Starlink release

starlink.figaro.spied(spiketrum, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/spied .

Parameters:
  • spiketrum (str,filename) – (SPIketrum) Spiketrum to be edited
  • output (str,filename) – (OUTput) Name of resulting spiketrum
Keyword Arguments:
 
  • colour (str) – (COLour) Plot colour (Bl,Wh,R,G,B,Cy,Ma,Y)
  • high (float) – Maximum Y value to plot
  • low (float) – Minimum Y value to plot
  • order (float) – Order for polynomial fit
  • quit (bool) – Terminate spiketrum editing
  • soft (str) – [ ]
  • xend (float) – Maximum X value to plot
  • xstart (float) – Minimum X value to plot

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SPIED for full documentation of this command in the latest Starlink release

starlink.figaro.spifit(spiketrum, order, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/spifit .

Parameters:
  • spiketrum (str,filename) – (SPIketrum) Name of “spiketrum” to be interpolated
  • order (float) – (ORder) Order of polynomial to be fitted
  • spectrum (str,filename) – (SPEctrum) Name of spectrum to be generated
Keyword Arguments:
 

log (bool) – (Log) Fit to the log of the data? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SPIFIT for full documentation of this command in the latest Starlink release

starlink.figaro.splot(spectrum, xstart, xend, high, low, bias, label, **kwargs)[source]¶

Runs the command: $FIG_DIR/splot .

Parameters:
  • spectrum (str,filename) – (SPectrum) Spectrum to be plotted
  • xstart (float) – (XStart) First X-value to be plotted
  • xend (float) – (XEnd) Last X-value to be plotted
  • high (float) – (HIgh) Maximum data value to be plotted
  • low (float) – (LOw) Minimum data value to be plotted
  • bias (float) – (BIas) Bias value to be added to data
  • label (str) – (LABel) Label for plot
Keyword Arguments:
 
  • colour (str) – (COLour) Plot colour (Bl,Wh,R,G,B,Cy,Ma,Y)
  • thickness (float) – (THickness) Plotted line width
  • autoscale (bool) – (AUtoscale) Scale so all of spectrum fits?
  • axes (bool) – (AXes) Plot and label axes? [dyn.]
  • erase (bool) – (ERase) Erase screen before plotting? [dyn.]
  • hard (str) – [ ]
  • hardcopy (bool) – (HArdcopy) Produce plot as a hard copy?
  • lines (bool) – (LINes) Use a line plot (not a histogram)? [dyn.]
  • soft (str) – [ ]
  • whole (bool) – (WHole) Plot all of spectrum?
Returns:

  • tvcolor (float)
  • tvfile (str)
  • tvhigh (float)
  • tvlow (float)
  • tvxen (float)
  • tvxst (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SPLOT for full documentation of this command in the latest Starlink release

starlink.figaro.sqrterr(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/sqrterr .

Parameters:
  • image (str,filename) – (IMage) Name of image to calculate errors for
  • factor (float) – (FACtor) Factor where Error=SQRT(Data/FACTOR)
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SQRTERR for full documentation of this command in the latest Starlink release

starlink.figaro.subset(in_, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/subset .

Parameters:
  • in_ (str,filename) – Input NDF
  • out (str,filename) – Output NDF

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_SUBSET for full documentation of this command in the latest Starlink release

starlink.figaro.table(file, **kwargs)[source]¶

Runs the command: $FIG_DIR/table .

Parameters:

file (str) – (File) SPICA Memory file to be used

Keyword Arguments:
 
  • delete (bool) – (DELete) Delete table after display/printing?
  • print (bool) – (PRINT) Print table?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_TABLE for full documentation of this command in the latest Starlink release

starlink.figaro.tippex(output, **kwargs)[source]¶

Runs the command: $FIG_DIR/tippex .

Parameters:

output (str,filename) – (OUtput) Output file for fudged data

Keyword Arguments:
 
  • confirm (bool) – Go ahead
  • quit (bool) – Quit TIPPEX
  • soft (str) – [ ]
  • tvcolor (float) – [0.]
  • tvfile (str) – [ ]
  • tvhigh (float) – [0.]
  • tvlow (float) – [0.]
  • tvxen (float) – [0.]
  • tvxst (float) – [0.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_TIPPEX for full documentation of this command in the latest Starlink release

starlink.figaro.trimfile(in_, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/trimfile .

Parameters:
  • in_ (HDSOBJECT) – Input HDS file
  • out (str) – Name of clean copy of HDS file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_TRIMFILE for full documentation of this command in the latest Starlink release

starlink.figaro.vachel(image, output, vel, **kwargs)[source]¶

Runs the command: $FIG_DIR/vachel .

Parameters:
  • image (str,filename) – (IMage) Image whose X values are to be converted
  • output (str,filename) – (OUtput) Name of modified image
  • vel (float) – (VElocity) Recession velocity (Km/s)?
Keyword Arguments:
 
  • dplr (bool) – (DPlr) Is a correction for recession velocity required?
  • vac (bool) – (VAc) Apply air to vacuum wavelength correction?

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_VACHEL for full documentation of this command in the latest Starlink release

starlink.figaro.vig(image, **kwargs)[source]¶

Runs the command: $FIG_DIR/vig .

Parameters:

image (str) – Name of image for input

Keyword Arguments:
 
  • old (bool) – OLD - old coefficients are to be used for correction [dyn.]
  • output (str) – OUTput Name of output file
  • ystart (int) – start value to extract in channel direction
  • yend (int) – end value to extract in channel direction
  • xstart (int) – start value to extract in x-sect direction
  • xend (int) – end value to extract in x-sect direction
  • character_input (str) –
  • character_value (str) –
  • hard (str) –
  • logical_value (bool) –
  • no_def_value (float) –
  • numeric_value (float) –
  • soft (str) – [ ]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_VIG for full documentation of this command in the latest Starlink release

starlink.figaro.wdfits(image, file, **kwargs)[source]¶

Runs the command: $FIG_DIR/wdfits .

Parameters:
  • image (str,filename) – (IMage) Image to be written out in “disk FITS” format
  • file (str) – (FIle) Name of “Disk Fits” file to be created
Keyword Arguments:
 

bit16 (bool) – (BIT16) Force real data to be output as 16bit numbers? [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_WDFITS for full documentation of this command in the latest Starlink release

starlink.figaro.wdipso(spectrum, code, file, **kwargs)[source]¶

Runs the command: $FIG_DIR/wdipso .

Parameters:
  • spectrum (str,filename) – (SPectrum) File to be converted to Dipso format
  • code (float) – (Code) Data format code for output file (0,1,2)
  • file (str) – (FIle) Name of DIPSO format file to be created

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_WDIPSO for full documentation of this command in the latest Starlink release

starlink.figaro.xcadd(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/xcadd .

Parameters:
  • image (str,filename) – (IMage) Image with X data to be added to
  • factor (float) – (FACtor) Additive constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XCADD for full documentation of this command in the latest Starlink release

starlink.figaro.xcdiv(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/xcdiv .

Parameters:
  • image (str,filename) – (IMage) Image with X data to be divided
  • factor (float) – (FACtor) Constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XCDIV for full documentation of this command in the latest Starlink release

starlink.figaro.xcmult(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/xcmult .

Parameters:
  • image (str,filename) – (IMage) Image with X data to be multiplied
  • factor (float) – (FACtor) Multiplicative constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XCMULT for full documentation of this command in the latest Starlink release

starlink.figaro.xcopi(spectrum, arc, arc2, fraction, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/xcopi .

Parameters:
  • spectrum (str,filename) – (SPectrum) File requiring X data
  • arc (str,filename) – (ARc) File containing X data
  • arc2 (str,filename) – (ARC2) Second file containing X data
  • fraction (float) – (FRaction) X data OUTPUT=ARC+(ARC2-ARC1)*FRACTION
  • output (str,filename) – (OUTput) Name of resulting file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XCOPI for full documentation of this command in the latest Starlink release

starlink.figaro.xcopy(spectrum, arc, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/xcopy .

Parameters:
  • spectrum (str,filename) – (SPectrum) File requiring X data
  • arc (str,filename) – (ARc) File containing X data
  • output (str,filename) – (OUTput) Name of resulting file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XCOPY for full documentation of this command in the latest Starlink release

starlink.figaro.xcsub(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/xcsub .

Parameters:
  • image (str,filename) – (IMage) Image with X data to be subtracted from
  • factor (float) – (FACtor) Constant to be subtracted from data
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XCSUB for full documentation of this command in the latest Starlink release

starlink.figaro.xcur(*args, **kwargs)[source]¶

Runs the command: $FIG_DIR/xcur .

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XCUR for full documentation of this command in the latest Starlink release

starlink.figaro.xtplane(cube, ystart, yend, image, **kwargs)[source]¶

Runs the command: $FIG_DIR/xtplane .

Parameters:
  • cube (str,filename) – (CUbe) Name of data cube to extract image from
  • ystart (float) – (YStart) first y-value to be used
  • yend (float) – (YEnd) last y-value to be used
  • image (str,filename) – (IMage) name of image to be created

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XTPLANE for full documentation of this command in the latest Starlink release

starlink.figaro.xtract(in_, colaps, out, **kwargs)[source]¶

Runs the command: $FIG_DIR/xtract .

Parameters:
  • in_ (str,filename) – Input NDF
  • colaps (List[int]) – For each axis: 0 (retain) or 1 (collapse)
  • out (str,filename) – Output NDF
Keyword Arguments:
 
  • info (bool) – Issue informational messages [YES]
  • varuse (bool) – Use input variances if available [YES]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XTRACT for full documentation of this command in the latest Starlink release

starlink.figaro.xyplane(cube, tstart, tend, image, **kwargs)[source]¶

Runs the command: $FIG_DIR/xyplane .

Parameters:
  • cube (str,filename) – (CUbe) Name of data cube to extract image from
  • tstart (float) – (TStart) first t-value to be used
  • tend (float) – (TEnd) last t-value to be used
  • image (str,filename) – (IMage) name of image to be created

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_XYPLANE for full documentation of this command in the latest Starlink release

starlink.figaro.ycadd(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ycadd .

Parameters:
  • image (str,filename) – (IMage) Image with Y data to be added to
  • factor (float) – (FACtor) Additive constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_YCADD for full documentation of this command in the latest Starlink release

starlink.figaro.ycdiv(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ycdiv .

Parameters:
  • image (str,filename) – (IMage) Image with Y data to be divided
  • factor (float) – (FACtor) Constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_YCDIV for full documentation of this command in the latest Starlink release

starlink.figaro.ycmult(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ycmult .

Parameters:
  • image (str,filename) – (IMage) Image with Y data to be multiplied
  • factor (float) – (FACtor) Multiplicative constant
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_YCMULT for full documentation of this command in the latest Starlink release

starlink.figaro.ycsub(image, factor, output, **kwargs)[source]¶

Runs the command: $FIG_DIR/ycsub .

Parameters:
  • image (str,filename) – (IMage) Image with Y data to be subtracted from
  • factor (float) – (FACtor) Constant to be subtracted from data
  • output (str,filename) – (OUTput) Name of resulting image

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_YCSUB for full documentation of this command in the latest Starlink release

starlink.figaro.ystract(image, xstart, xend, spectrum, **kwargs)[source]¶

Runs the command: $FIG_DIR/ystract .

Parameters:
  • image (str,filename) – (IMage) name of image to extract data from
  • xstart (float) – (XStart) first x-value to be used
  • xend (float) – (XEnd) last x-value to be used
  • spectrum (str,filename) – (SPectrum) name of spectrum to be generated

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_YSTRACT for full documentation of this command in the latest Starlink release

starlink.figaro.ytplane(cube, xstart, xend, image, **kwargs)[source]¶

Runs the command: $FIG_DIR/ytplane .

Parameters:
  • cube (str,filename) – (CUbe) Name of data cube to extract image from
  • xstart (float) – (XStart) first x-value to be used
  • xend (float) – (XEnd) last x-value to be used
  • image (str,filename) – (IMage) name of image to be created

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun86.htx/sun86.html?xref_YTPLANE for full documentation of this command in the latest Starlink release

starlink.fluxes module¶

Module to run the Starlink FLUXES package.

Unlike other similar modules for e.g. KAPPA, SMURF, this module is written by hand as the auto generated scripts don’t work, and there is effectively only one fluxes command and we don’t change it very often.

starlink.fluxes.get_flux(planet, date, filter_=850)[source]¶

Return the flux and Temp. for a planet, the sun or the moon.

This will return a namedtuple object with the listed returned items as fields.

Parameters:
  • planet (str) – Name of planet for calculation. Must be one of: SUN, MERCURY, VENUS, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO, MOON.
  • date (str or datetime or date) – Datetime to perform calculation for. If string, should be in format ‘YYYY-MM-DDTHH:MM:SS.S’. Optionally, only the YYYY-MM-DD part can be supplied, and it will assume ‘00:00:00’ for the time. Otherwise a standard date or datetime object can be supplied.
  • filter (int, optional) – The filter wavelength (in microns). Must be one of: 850, 450, 1300, 868, 434. [850]
Returns:

  • hpbw (float) – The half power beam width used to calaculate F_BEAM (arcseconds).
  • f_centre (float) – The centre frequency of the selected filter (GHz).
  • f_width (float) – The filter width (GHz).
  • f_total (float) – The total flux (Jy).
  • f_beam (float) – The total flux in the beam (Jy).
  • t_bright (float) – The brightness temperature of the planet (K).
  • t_error (float) – The error in the brightness temperature (K).
  • semi_diam (float) – Semi-diameter of the selected planet (arcsec).
  • solid_ang (float) – Solid angle of the selected planet (steradians).
  • time (string) – Time used for calculation as ‘HH MM SS’.
  • date (string) – Date used for calculation, as ‘DD MM YY’.
  • filter (string) – Filter used for caclulation.

Notes

If you want to run fluxes more directly, please use the starlink.wrapper.starcomm command directly. This will support all the fluxes options.

For more information on fluxes, please see SUN/213 in your Starlink distribution (or visit http://www.starlink.ac.uk/docs/sun213.htx/sun213.html to see the documentation from the latest release).

starlink.hdsutils module¶

starlink.hdsutils.get_adam_hds_values(comname, adamdir)[source]¶

Return a namedtuple with all the values from the ADAMDIR/commname.sdf hds file.

starlink.hdsutils.iskeyword()¶

x.__contains__(y) <==> y in x.

starlink.kappa module¶

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)

starlink.kappa.add(in1, in2, out, **kwargs)[source]¶

Adds two NDF data structures.

Runs the command: $KAPPA_DIR/add .

Parameters:
  • 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

starlink.kappa.align2d(in_, ref, **kwargs)[source]¶

Aligns a pair of two-dimensional NDFs by minimising the residuals

Runs the command: $KAPPA_DIR/align2d .

Parameters:
  • 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

starlink.kappa.aperadd(ndf, centre, diam, **kwargs)[source]¶

Integrates pixel values within an aperture of an NDF.

Runs the command: $KAPPA_DIR/aperadd .

Parameters:
  • 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

starlink.kappa.ardgen(ardout, shape, option, **kwargs)[source]¶

Creates a text file describing selected regions of an image.

Runs the command: $KAPPA_DIR/ardgen .

Parameters:
  • 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

starlink.kappa.ardmask(in_, ardfile, out, **kwargs)[source]¶

Uses an ARD file to set some pixels of an NDF to be bad.

Runs the command: $KAPPA_DIR/ardmask .

Parameters:
  • 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

starlink.kappa.ardplot(ardfile, **kwargs)[source]¶

Plot regions described in an ARD file.

Runs the command: $KAPPA_DIR/ardplot .

Parameters:

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

starlink.kappa.axconv(ndf, **kwargs)[source]¶

Expands spaced axes in an NDF into the primitive form.

Runs the command: $KAPPA_DIR/axconv .

Parameters: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

starlink.kappa.axlabel(ndf, label, dim, **kwargs)[source]¶

Sets a new label value for an axis within an NDF data structure.

Runs the command: $KAPPA_DIR/axlabel .

Parameters:
  • 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

starlink.kappa.axunits(ndf, units, dim, **kwargs)[source]¶

Sets a new units value for an axis within an NDF data structure.

Runs the command: $KAPPA_DIR/axunits .

Parameters:
  • 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

starlink.kappa.beamfit(ndf, **kwargs)[source]¶

Fits beam features in a two-dimensional NDF.

Runs the command: $KAPPA_DIR/beamfit .

Parameters:

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

starlink.kappa.block(in_, out, box, **kwargs)[source]¶

Smooths an NDF using an n-dimensional rectangular box filter.

Runs the command: $KAPPA_DIR/block .

Parameters:
  • 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

starlink.kappa.cadd(in_, scalar, out, **kwargs)[source]¶

Adds a scalar to an NDF data structure.

Runs the command: $KAPPA_DIR/cadd .

Parameters:
  • 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

starlink.kappa.calc(exp, **kwargs)[source]¶

Evaluates a mathematical expression.

Runs the command: $KAPPA_DIR/calc .

Parameters:

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

starlink.kappa.calpol(in1, in2, in3, in4, p, theta, i, **kwargs)[source]¶

Calculates polarisation parameters.

Runs the command: $KAPPA_DIR/calpol .

Parameters:
  • 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

starlink.kappa.carpet(in_, out, **kwargs)[source]¶

Creates a cube representing a carpet plot of an image.

Runs the command: $KAPPA_DIR/carpet .

Parameters:
  • 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

starlink.kappa.cdiv(in_, scalar, out, **kwargs)[source]¶

Divides an NDF by a scalar.

Runs the command: $KAPPA_DIR/cdiv .

Parameters:
  • 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

starlink.kappa.centroid(ndf, **kwargs)[source]¶

Finds the centroids of star-like features in an NDF.

Runs the command: $KAPPA_DIR/centroid .

Parameters:

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

starlink.kappa.chain(in_, c1, **kwargs)[source]¶

Concatenates a series of vectorized NDFs.

Runs the command: $KAPPA_DIR/chain .

Parameters:
  • 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

starlink.kappa.chanmap(in_, out, axis, nchan, shape, **kwargs)[source]¶

Creates a channel map from a cube NDF by compressing slices along

Runs the command: $KAPPA_DIR/chanmap .

Parameters:
  • 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

starlink.kappa.chpix(in_, out, section, newval, **kwargs)[source]¶

Replaces the values of selected pixels in an NDF.

Runs the command: $KAPPA_DIR/chpix .

Parameters:
  • 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

starlink.kappa.clinplot(ndf, **kwargs)[source]¶

Draws a spatial grid of line plots for an axis of a cube NDF.

Runs the command: $KAPPA_DIR/clinplot .

Parameters:

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

starlink.kappa.cmult(in_, scalar, out, **kwargs)[source]¶

Multiplies an NDF by a scalar.

Runs the command: $KAPPA_DIR/cmult .

Parameters:
  • 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

starlink.kappa.colcomp(inr, ing, inb, out, lut, **kwargs)[source]¶

Produces a colour composite of up to three 2-dimensional NDFs.

Runs the command: $KAPPA_DIR/colcomp .

Parameters:
  • 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

starlink.kappa.collapse(in_, out, axis, **kwargs)[source]¶

Reduce the number of axes in an N-dimensional NDF by compressing

Runs the command: $KAPPA_DIR/collapse .

Parameters:
  • 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

starlink.kappa.compadd(in_, out, compress, **kwargs)[source]¶

Reduces the size of an NDF by adding values in rectangular boxes.

Runs the command: $KAPPA_DIR/compadd .

Parameters:
  • 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

starlink.kappa.compave(in_, out, compress, **kwargs)[source]¶

Reduces the size of an NDF by averaging values in rectangular

Runs the command: $KAPPA_DIR/compave .

Parameters:
  • 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

starlink.kappa.compick(in_, out, compress, **kwargs)[source]¶

Reduces the size of an NDF by picking equally spaced pixels.

Runs the command: $KAPPA_DIR/compick .

Parameters:
  • 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

starlink.kappa.configecho(name, config, **kwargs)[source]¶

Displays one or more configuration parameters.

Runs the command: $KAPPA_DIR/configecho .

Parameters:
  • 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

starlink.kappa.contour(ndf, **kwargs)[source]¶

Contours a 2-d NDF.

Runs the command: $KAPPA_DIR/contour .

Parameters:

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

starlink.kappa.convolve(in_, psf, out, xcentre, ycentre, **kwargs)[source]¶

Convolves a pair of NDFs where the smoothing NDF is one- or

Runs the command: $KAPPA_DIR/convolve .

Parameters:
  • 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

starlink.kappa.copybad(in_, ref, out, **kwargs)[source]¶

Copies bad pixels from one NDF file to another.

Runs the command: $KAPPA_DIR/copybad .

Parameters:
  • 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

starlink.kappa.creframe(out, **kwargs)[source]¶

Generates a test two-dimensional NDF with a selection of several

Runs the command: $KAPPA_DIR/creframe .

Parameters:

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

starlink.kappa.csub(in_, scalar, out, **kwargs)[source]¶

Subtracts a scalar from an NDF data structure.

Runs the command: $KAPPA_DIR/csub .

Parameters:
  • 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

starlink.kappa.cumulvec(in_, out, **kwargs)[source]¶

Sums the values cumulatively in a one-dimensional NDF.

Runs the command: $KAPPA_DIR/cumulvec .

Parameters:
  • 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

starlink.kappa.cursor(*args, **kwargs)[source]¶

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

starlink.kappa.display(in_, **kwargs)[source]¶

Displays a one- or two-dimensional NDF.

Runs the command: $KAPPA_DIR/display .

Parameters:

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

starlink.kappa.div(in1, in2, out, **kwargs)[source]¶

Divides one NDF data structure by another.

Runs the command: $KAPPA_DIR/div .

Parameters:
  • 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

starlink.kappa.drawnorth(*args, **kwargs)[source]¶

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

starlink.kappa.drawsig(ndf, nsigma, **kwargs)[source]¶

Draws +/-n standard-deviation lines on a line plot.

Runs the command: $KAPPA_DIR/drawsig .

Parameters:
  • 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

starlink.kappa.elprof(in_, out, **kwargs)[source]¶

Creates a radial or azimuthal profile of a 2-dimensional image.

Runs the command: $KAPPA_DIR/elprof .

Parameters:
  • 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

starlink.kappa.erase(object, **kwargs)[source]¶

Erases an HDS object.

Runs the command: $KAPPA_DIR/erase .

Parameters:

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

starlink.kappa.errclip(in_, out, limit, **kwargs)[source]¶

Removes pixels with large errors from an NDF.

Runs the command: $KAPPA_DIR/errclip .

Parameters:
  • 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

starlink.kappa.excludebad(in_, out, **kwargs)[source]¶

Excludes bad rows or columns from a two-dimensional NDF.

Runs the command: $KAPPA_DIR/excludebad .

Parameters:
  • 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

starlink.kappa.expon(in_, out, base, **kwargs)[source]¶

Takes the exponential (specified base) of an NDF data structure.

Runs the command: $KAPPA_DIR/expon .

Parameters:
  • 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

starlink.kappa.ffclean(in_, out, clip, box, **kwargs)[source]¶

Removes defects from a substantially flat one-, two- or

Runs the command: $KAPPA_DIR/ffclean .

Parameters:
  • 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

starlink.kappa.fillbad(in_, out, **kwargs)[source]¶

Removes regions of bad values from an NDF.

Runs the command: $KAPPA_DIR/fillbad .

Parameters:
  • 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

starlink.kappa.fitsdin(files, out, **kwargs)[source]¶

Reads a FITS disc file composed of simple, group or table objects.

Runs the command: $KAPPA_DIR/fitsdin .

Parameters:
  • 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

starlink.kappa.fitsedit(*args, **kwargs)[source]¶

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

starlink.kappa.fitsexist(ndf, keyword, **kwargs)[source]¶

Inquires whether or not a keyword exists in a FITS extension.

Runs the command: $KAPPA_DIR/fitsexist .

Parameters:
  • 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

starlink.kappa.fitsexp(ndf, table, **kwargs)[source]¶

Exports NDF-extension information into an NDF FITS extension.

Runs the command: $KAPPA_DIR/fitsexp .

Parameters:
  • 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

starlink.kappa.fitshead(*args, **kwargs)[source]¶

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

starlink.kappa.fitsimp(ndf, table, xname, xtype, **kwargs)[source]¶

Imports FITS information into an NDF extension.

Runs the command: $KAPPA_DIR/fitsimp .

Parameters:
  • 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

starlink.kappa.fitslist(in_, **kwargs)[source]¶

Lists the FITS extension of an NDF.

Runs the command: $KAPPA_DIR/fitslist .

Parameters:

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

starlink.kappa.fitsmod(ndf, keyword, edit, value, comment, position, **kwargs)[source]¶

Edits an NDF FITS extension via a text file or parameters.

Runs the command: $KAPPA_DIR/fitsmod .

Parameters:
  • 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

starlink.kappa.fitstext(ndf, file, **kwargs)[source]¶

Creates an NDF FITS extension from a text file.

Runs the command: $KAPPA_DIR/fitstext .

Parameters:
  • 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

starlink.kappa.fitsurface(ndf, **kwargs)[source]¶

Fits a polynomial surface to two-dimensional data array.

Runs the command: $KAPPA_DIR/fitsurface .

Parameters:

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

starlink.kappa.fitsval(ndf, keyword, **kwargs)[source]¶

Reports the value of a keyword in the FITS airlock.

Runs the command: $KAPPA_DIR/fitsval .

Parameters:
  • 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

starlink.kappa.fitswrite(*args, **kwargs)[source]¶

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

starlink.kappa.flip(in_, out, dim, **kwargs)[source]¶

Reverses an NDF’s pixels along a specified dimension.

Runs the command: $KAPPA_DIR/flip .

Parameters:
  • 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

starlink.kappa.fourier(in_, hermout, **kwargs)[source]¶

Performs forward and inverse Fourier transforms of 1- or

Runs the command: $KAPPA_DIR/fourier .

Parameters:
  • 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

starlink.kappa.gausmooth(in_, out, fwhm, **kwargs)[source]¶

Smooths a one- to three-dimensional NDF using a Gaussian filter.

Runs the command: $KAPPA_DIR/gausmooth .

Parameters:
  • 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

starlink.kappa.gdclear(*args, **kwargs)[source]¶

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

starlink.kappa.gdnames(*args, **kwargs)[source]¶

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

starlink.kappa.gdset(device, **kwargs)[source]¶

Selects a current graphics device.

Runs the command: $KAPPA_DIR/gdset .

Parameters: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

starlink.kappa.gdstate(*args, **kwargs)[source]¶

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

starlink.kappa.glitch(in_, out, **kwargs)[source]¶

Replaces bad pixels in a 2-d NDF with the local median

Runs the command: $KAPPA_DIR/glitch .

Parameters:
  • 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

starlink.kappa.globals(*args, **kwargs)[source]¶

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

starlink.kappa.hiscom(ndf, **kwargs)[source]¶

Adds commentary to the history of an NDF.

Runs the command: $KAPPA_DIR/hiscom .

Parameters:

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

starlink.kappa.hislist(ndf, **kwargs)[source]¶

Lists NDF history records.

Runs the command: $KAPPA_DIR/hislist .

Parameters: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

starlink.kappa.hisset(ndf, **kwargs)[source]¶

Sets the NDF history update mode.

Runs the command: $KAPPA_DIR/hisset .

Parameters:

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

starlink.kappa.histat(ndf, **kwargs)[source]¶

Computes ordered statistics for an NDF’s pixels using an

Runs the command: $KAPPA_DIR/histat .

Parameters:

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

starlink.kappa.histeq(in_, out, **kwargs)[source]¶

Performs an histogram equalisation on an NDF.

Runs the command: $KAPPA_DIR/histeq .

Parameters:
  • 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

starlink.kappa.histogram(in_, numbin, range, **kwargs)[source]¶

Computes an histogram of an NDF’s values.

Runs the command: $KAPPA_DIR/histogram .

Parameters:
  • 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

starlink.kappa.interleave(in_, out, expand, **kwargs)[source]¶

Forms a higher-resolution NDF by interleaving a set of NDFs.

Runs the command: $KAPPA_DIR/interleave .

Parameters:
  • 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

starlink.kappa.kapversion(*args, **kwargs)[source]¶

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

starlink.kappa.kstest(in_, out, **kwargs)[source]¶

Compares data sets using the Kolmogorov-Smirnov test.

Runs the command: $KAPPA_DIR/kstest .

Parameters:
  • 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

starlink.kappa.laplace(in_, out, **kwargs)[source]¶

Performs a Laplacian convolution as an edge detector in a 2-d NDF

Runs the command: $KAPPA_DIR/laplace .

Parameters:
  • 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

starlink.kappa.linplot(ndf, **kwargs)[source]¶

Draws a line plot of the data values in a one-dimensional NDF.

Runs the command: $KAPPA_DIR/linplot .

Parameters:

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

starlink.kappa.listmake(outcat, **kwargs)[source]¶

Creates a catalogue holding a positions list.

Runs the command: $KAPPA_DIR/listmake .

Parameters:

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

starlink.kappa.listshow(incat, **kwargs)[source]¶

Reports the positions stored in a positions list.

Runs the command: $KAPPA_DIR/listshow .

Parameters:

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

starlink.kappa.logar(in_, out, base, **kwargs)[source]¶

Takes the logarithm (specified base) of an NDF data structure.

Runs the command: $KAPPA_DIR/logar .

Parameters:
  • 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

starlink.kappa.look(ndf, centre, **kwargs)[source]¶

Lists pixel values in a one- or two-dimensional NDF.

Runs the command: $KAPPA_DIR/look .

Parameters:
  • 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

starlink.kappa.lucy(in_, psf, out, **kwargs)[source]¶

Performs a Richardson-Lucy deconvolution of a 1- or 2-dimensional

Runs the command: $KAPPA_DIR/lucy .

Parameters:
  • 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

starlink.kappa.lutable(mapping, coltab, lut, **kwargs)[source]¶

Manipulates an image-display colour table.

Runs the command: $KAPPA_DIR/lutable .

Parameters:
  • 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

starlink.kappa.lutbgyrw(*args, **kwargs)[source]¶

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

starlink.kappa.lutcol(*args, **kwargs)[source]¶

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

starlink.kappa.lutcold(*args, **kwargs)[source]¶

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

starlink.kappa.lutcont(*args, **kwargs)[source]¶

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

starlink.kappa.lutedit(*args, **kwargs)[source]¶

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

starlink.kappa.lutfc(*args, **kwargs)[source]¶

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

starlink.kappa.lutgrey(*args, **kwargs)[source]¶

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

starlink.kappa.lutheat(*args, **kwargs)[source]¶

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

starlink.kappa.lutikon(*args, **kwargs)[source]¶

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

starlink.kappa.lutneg(*args, **kwargs)[source]¶

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

starlink.kappa.lutramps(*args, **kwargs)[source]¶

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

starlink.kappa.lutread(*args, **kwargs)[source]¶

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

starlink.kappa.lutsave(lut, **kwargs)[source]¶

Saves the current colour table of an image-display device in an

Runs the command: $KAPPA_DIR/lutsave .

Parameters:

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

starlink.kappa.lutspec(*args, **kwargs)[source]¶

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

starlink.kappa.lutview(*args, **kwargs)[source]¶

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

starlink.kappa.lutwarm(*args, **kwargs)[source]¶

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

starlink.kappa.lutzebra(*args, **kwargs)[source]¶

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

starlink.kappa.makesnr(in_, out, **kwargs)[source]¶

Creates a signal-to-noise array from an NDF with defined variances.

Runs the command: $KAPPA_DIR/makesnr .

Parameters:
  • 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

starlink.kappa.makesurface(in_, out, **kwargs)[source]¶

Creates a two-dimensional NDF from the coefficients of a

Runs the command: $KAPPA_DIR/makesurface .

Parameters:
  • 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

starlink.kappa.manic(in_, out, axes, **kwargs)[source]¶

Change the dimensionality of all or part of an NDF.

Runs the command: $KAPPA_DIR/manic .

Parameters:
  • 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

starlink.kappa.maths(exp, out, **kwargs)[source]¶

Evaluates mathematical expressions applied to NDF data structures.

Runs the command: $KAPPA_DIR/maths .

Parameters:
  • 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

starlink.kappa.median(in_, out, **kwargs)[source]¶

Smooths a 2-dimensional data array using a weighted median filter.

Runs the command: $KAPPA_DIR/median .

Parameters:
  • 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

starlink.kappa.mfittrend(in_, axis, ranges, out, order, **kwargs)[source]¶

Fits independent trends to data lines that are parallel to an

Runs the command: $KAPPA_DIR/mfittrend .

Parameters:
  • 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

starlink.kappa.mlinplot(ndf, **kwargs)[source]¶

Draws a multi-line plot of the data values in a two-dimensional

Runs the command: $KAPPA_DIR/mlinplot .

Parameters:

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

starlink.kappa.mstats(in_, out, **kwargs)[source]¶

Calculate statistics over a group of data arrays or points.

Runs the command: $KAPPA_DIR/mstats .

Parameters:
  • 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

starlink.kappa.mult(in1, in2, out, **kwargs)[source]¶

Multiplies two NDF data structures.

Runs the command: $KAPPA_DIR/mult .

Parameters:
  • 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

starlink.kappa.native(object, **kwargs)[source]¶

Converts an HDS object to native machine data representation.

Runs the command: $KAPPA_DIR/native .

Parameters: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

starlink.kappa.ndfcompare(in1, in2, **kwargs)[source]¶

Compares a pair of NDFs for equivalence.

Runs the command: $KAPPA_DIR/ndfcompare .

Parameters:
  • 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

starlink.kappa.ndfcompress(in_, out, **kwargs)[source]¶

Compresses an NDF so that it occupies less disk space.

Runs the command: $KAPPA_DIR/ndfcompress .

Parameters:
  • 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

starlink.kappa.ndfcopy(in_, out, **kwargs)[source]¶

Copies an NDF (or NDF section) to a new location.

Runs the command: $KAPPA_DIR/ndfcopy .

Parameters:
  • 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

starlink.kappa.ndfecho(ndf, **kwargs)[source]¶

Displays a group of NDF names.

Runs the command: $KAPPA_DIR/ndfecho .

Parameters:

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

starlink.kappa.ndftrace(ndf, **kwargs)[source]¶

Displays the attributes of an NDF data structure.

Runs the command: $KAPPA_DIR/ndftrace .

Parameters:

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

starlink.kappa.noglobals(*args, **kwargs)[source]¶

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

starlink.kappa.nomagic(in_, out, repval, **kwargs)[source]¶

Replaces all occurrences of magic value pixels in an NDF array

Runs the command: $KAPPA_DIR/nomagic .

Parameters:
  • 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

starlink.kappa.normalize(in1, in2, out, **kwargs)[source]¶

Normalises one NDF to a similar NDF by calculating a scale factor

Runs the command: $KAPPA_DIR/normalize .

Parameters:
  • 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

starlink.kappa.numb(in_, value, **kwargs)[source]¶

Counts the number of elements of an NDF with values or absolute

Runs the command: $KAPPA_DIR/numb .

Parameters:
  • 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

starlink.kappa.oddeven(in_, out, **kwargs)[source]¶

Removes odd-even defects from a one-dimensional NDF.

Runs the command: $KAPPA_DIR/oddeven .

Parameters:
  • 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

starlink.kappa.outline(*args, **kwargs)[source]¶

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

starlink.kappa.outset(in_, out, centre, diam, **kwargs)[source]¶

Mask pixels inside or outside a specified circle in a

Runs the command: $KAPPA_DIR/outset .

Parameters:
  • 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

starlink.kappa.paldef(*args, **kwargs)[source]¶

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

starlink.kappa.palentry(palnum, colour, **kwargs)[source]¶

Enters a colour into an image display’s palette.

Runs the command: $KAPPA_DIR/palentry .

Parameters:
  • 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

starlink.kappa.palread(palette, **kwargs)[source]¶

Fills the palette of a colour table from an NDF.

Runs the command: $KAPPA_DIR/palread .

Parameters: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

starlink.kappa.palsave(palette, **kwargs)[source]¶

Saves the current palette of a colour table to an NDF.

Runs the command: $KAPPA_DIR/palsave .

Parameters:

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

starlink.kappa.parget(parname, applic, **kwargs)[source]¶

Obtains the value or values of an application parameter.

Runs the command: $KAPPA_DIR/parget .

Parameters:
  • 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

starlink.kappa.paste(in_, p1, **kwargs)[source]¶

Pastes a series of NDFs upon each other.

Runs the command: $KAPPA_DIR/paste .

Parameters:
  • 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

starlink.kappa.permaxes(in_, out, perm, **kwargs)[source]¶

Permute an NDF’s pixel axes.

Runs the command: $KAPPA_DIR/permaxes .

Parameters:
  • 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

starlink.kappa.picbase(*args, **kwargs)[source]¶

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

starlink.kappa.piccur(*args, **kwargs)[source]¶

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

starlink.kappa.picdata(*args, **kwargs)[source]¶

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

starlink.kappa.picdef(*args, **kwargs)[source]¶

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

starlink.kappa.picempty(*args, **kwargs)[source]¶

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

starlink.kappa.picentire(*args, **kwargs)[source]¶

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

starlink.kappa.picframe(*args, **kwargs)[source]¶

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

starlink.kappa.picgrid(*args, **kwargs)[source]¶

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

starlink.kappa.picin(*args, **kwargs)[source]¶

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

starlink.kappa.piclabel(label, **kwargs)[source]¶

Labels the current graphics-database picture.

Runs the command: $KAPPA_DIR/piclabel .

Parameters: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

starlink.kappa.piclast(*args, **kwargs)[source]¶

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

starlink.kappa.piclist(*args, **kwargs)[source]¶

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

starlink.kappa.picsel(label, **kwargs)[source]¶

Selects a graphics-database picture by its label.

Runs the command: $KAPPA_DIR/picsel .

Parameters: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

starlink.kappa.pictrans(posin, **kwargs)[source]¶

Transforms a graphics position from one picture co-ordinate Frame

Runs the command: $KAPPA_DIR/pictrans .

Parameters:

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

starlink.kappa.picvis(*args, **kwargs)[source]¶

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

starlink.kappa.picxy(*args, **kwargs)[source]¶

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

starlink.kappa.pixdupe(in_, out, expand, **kwargs)[source]¶

Expands an NDF by pixel duplication.

Runs the command: $KAPPA_DIR/pixdupe .

Parameters:
  • 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

starlink.kappa.pluck(in_, axes, out, **kwargs)[source]¶

Plucks slices from an NDF at arbitrary positions.

Runs the command: $KAPPA_DIR/pluck .

Parameters:
  • 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

starlink.kappa.profile(in_, out, start, finish, **kwargs)[source]¶

Creates a 1-dimensional profile through an N-dimensional NDF.

Runs the command: $KAPPA_DIR/profile .

Parameters:
  • 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

starlink.kappa.provadd(ndf, parent, **kwargs)[source]¶

Stores provenance information in an NDF.

Runs the command: $KAPPA_DIR/provadd .

Parameters:
  • 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

starlink.kappa.provmod(ndf, **kwargs)[source]¶

Modifies provenance information for an NDF.

Runs the command: $KAPPA_DIR/provmod .

Parameters:

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

starlink.kappa.provrem(ndf, pattern, **kwargs)[source]¶

Removes selected provenance information from an NDF.

Runs the command: $KAPPA_DIR/provrem .

Parameters:
  • 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

starlink.kappa.provshow(ndf, **kwargs)[source]¶

Displays provenance information for an NDF.

Runs the command: $KAPPA_DIR/provshow .

Parameters:

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

starlink.kappa.psf(in_, incat, **kwargs)[source]¶

Determines the parameters of a model star profile by fitting star

Runs the command: $KAPPA_DIR/psf .

Parameters:
  • 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

starlink.kappa.qualtobad(in_, out, **kwargs)[source]¶

Sets selected NDF pixels bad on the basis of Quality.

Runs the command: $KAPPA_DIR/qualtobad .

Parameters:
  • 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

starlink.kappa.regionmask(in_, region, out, **kwargs)[source]¶

Applies a mask to a region of an NDF.

Runs the command: $KAPPA_DIR/regionmask .

Parameters:
  • 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

starlink.kappa.regrid(in_, out, **kwargs)[source]¶

Applies a geometrical transformation to an NDF.

Runs the command: $KAPPA_DIR/regrid .

Parameters:
  • 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

starlink.kappa.remqual(ndf, qnames, **kwargs)[source]¶

Remove specified quality definitions from an NDF.

Runs the command: $KAPPA_DIR/remqual .

Parameters:
  • 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

starlink.kappa.reshape(in_, out, shape, **kwargs)[source]¶

Reshapes an NDF, treating its arrays as vectors.

Runs the command: $KAPPA_DIR/reshape .

Parameters:
  • 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

starlink.kappa.rift(in_, scalar, out, section, **kwargs)[source]¶

Adds a scalar to a section of an NDF data structure to correct

Runs the command: $KAPPA_DIR/rift .

Parameters:
  • 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

starlink.kappa.rotate(in_, out, angle, **kwargs)[source]¶

Rotates a two-dimensional NDF about its centre through any angle.

Runs the command: $KAPPA_DIR/rotate .

Parameters:
  • 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

starlink.kappa.scatter(in1, in2, **kwargs)[source]¶

Displays a scatter plot between data in two NDFs.

Runs the command: $KAPPA_DIR/scatter .

Parameters:
  • 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

starlink.kappa.segment(in1, in2, out, **kwargs)[source]¶

Copies polygonal segments from one NDF into another.

Runs the command: $KAPPA_DIR/segment .

Parameters:
  • 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

starlink.kappa.setaxis(ndf, dim, mode, **kwargs)[source]¶

Sets values for an axis array component within an NDF data

Runs the command: $KAPPA_DIR/setaxis .

Parameters:
  • 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

starlink.kappa.setbad(ndf, **kwargs)[source]¶

Sets new bad-pixel flag values for an NDF.

Runs the command: $KAPPA_DIR/setbad .

Parameters:

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

starlink.kappa.setbb(ndf, bb, **kwargs)[source]¶

Sets a new value for the quality bad-bits mask of an NDF.

Runs the command: $KAPPA_DIR/setbb .

Parameters:
  • 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

starlink.kappa.setbound(ndf, **kwargs)[source]¶

Sets new bounds for an NDF.

Runs the command: $KAPPA_DIR/setbound .

Parameters: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

starlink.kappa.setext(ndf, xname, option, cname, **kwargs)[source]¶

Manipulates the contents of a specified NDF extension.

Runs the command: $KAPPA_DIR/setext .

Parameters:
  • 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

starlink.kappa.setlabel(ndf, label, **kwargs)[source]¶

Sets a new label for an NDF data structure.

Runs the command: $KAPPA_DIR/setlabel .

Parameters:
  • 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

starlink.kappa.setmagic(in_, out, repval, **kwargs)[source]¶

Replaces all occurrences of a given value in an NDF array with

Runs the command: $KAPPA_DIR/setmagic .

Parameters:
  • 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

starlink.kappa.setnorm(ndf, dim, **kwargs)[source]¶

Sets a new value for one or all of an NDF’s axis-normalisation

Runs the command: $KAPPA_DIR/setnorm .

Parameters:
  • 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

starlink.kappa.setorigin(ndf, origin, **kwargs)[source]¶

Sets a new pixel origin for an NDF.

Runs the command: $KAPPA_DIR/setorigin .

Parameters:
  • 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

starlink.kappa.setqual(ndf, qname, comment, mask, **kwargs)[source]¶

Assign a specified quality to selected pixels within an NDF.

Runs the command: $KAPPA_DIR/setqual .

Parameters:
  • 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

starlink.kappa.setsky(ndf, positions, coords, epoch, **kwargs)[source]¶

Stores new WCS information within an NDF.

Runs the command: $KAPPA_DIR/setsky .

Parameters:
  • 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

starlink.kappa.settitle(ndf, title, **kwargs)[source]¶

Sets a new title for an NDF data structure.

Runs the command: $KAPPA_DIR/settitle .

Parameters:
  • 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

starlink.kappa.settype(ndf, type, **kwargs)[source]¶

Sets a new numeric type for the data and variance components of

Runs the command: $KAPPA_DIR/settype .

Parameters:
  • 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

starlink.kappa.setunits(ndf, units, **kwargs)[source]¶

Sets a new units value for an NDF data structure.

Runs the command: $KAPPA_DIR/setunits .

Parameters:
  • 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

starlink.kappa.setvar(ndf, variance, **kwargs)[source]¶

Set new values for the VARIANCE component of an NDF data

Runs the command: $KAPPA_DIR/setvar .

Parameters:
  • 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

starlink.kappa.shadow(in_, out, **kwargs)[source]¶

Enhances edges in a 2-dimensional NDF using a shadow effect.

Runs the command: $KAPPA_DIR/shadow .

Parameters:
  • 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

starlink.kappa.showqual(ndf, **kwargs)[source]¶

Displays the quality names defined in an NDF.

Runs the command: $KAPPA_DIR/showqual .

Parameters: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

starlink.kappa.slide(in_, out, abs, **kwargs)[source]¶

Realigns an NDF using a translation.

Runs the command: $KAPPA_DIR/slide .

Parameters:
  • 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

starlink.kappa.sqorst(in_, out, factors, **kwargs)[source]¶

Squashes or stretches an NDF.

Runs the command: $KAPPA_DIR/sqorst .

Parameters:
  • 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

starlink.kappa.stats(ndf, **kwargs)[source]¶

Computes simple statistics for an NDF’s pixels.

Runs the command: $KAPPA_DIR/stats .

Parameters:

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

starlink.kappa.sub(in1, in2, out, **kwargs)[source]¶

Subtracts one NDF data structure from another.

Runs the command: $KAPPA_DIR/sub .

Parameters:
  • 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

starlink.kappa.substitute(in_, out, oldval, newval, **kwargs)[source]¶

Replaces all occurrences of a given value in an NDF array with

Runs the command: $KAPPA_DIR/substitute .

Parameters:
  • 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

starlink.kappa.surfit(in_, out, **kwargs)[source]¶

Fits a polynomial or bi-cubic spline surface to two-dimensional

Runs the command: $KAPPA_DIR/surfit .

Parameters:
  • 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

starlink.kappa.thresh(in_, out, thrlo, thrhi, newlo, newhi, **kwargs)[source]¶

Edits an NDF to replace values between or outside given limits

Runs the command: $KAPPA_DIR/thresh .

Parameters:
  • 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

starlink.kappa.trandat(freename, ndf, **kwargs)[source]¶

Converts free-format text data into an NDF.

Runs the command: $KAPPA_DIR/trandat .

Parameters:
  • 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

starlink.kappa.trig(in_, trigfunc, out, **kwargs)[source]¶

Performs a trigonometric transformation on a NDF.

Runs the command: $KAPPA_DIR/trig .

Parameters:
  • 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

starlink.kappa.vecplot(ndf1, ndf2, **kwargs)[source]¶

Plots a two-dimensional vector map.

Runs the command: $KAPPA_DIR/vecplot .

Parameters:
  • 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

starlink.kappa.wcsadd(ndf, **kwargs)[source]¶

Creates a Mapping and optionally adds a new co-ordinate Frame into

Runs the command: $KAPPA_DIR/wcsadd .

Parameters:

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

starlink.kappa.wcsalign(in_, out, lbnd, ubnd, **kwargs)[source]¶

Aligns a group of NDFs using World Co-ordinate System information.

Runs the command: $KAPPA_DIR/wcsalign .

Parameters:
  • 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

starlink.kappa.wcsattrib(ndf, **kwargs)[source]¶

Manages attribute values associated with the WCS component of an

Runs the command: $KAPPA_DIR/wcsattrib .

Parameters:

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

starlink.kappa.wcscopy(ndf, like, **kwargs)[source]¶

Copies WCS information from one NDF to another.

Runs the command: $KAPPA_DIR/wcscopy .

Parameters:
  • 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

starlink.kappa.wcsframe(ndf, **kwargs)[source]¶

Change the current co-ordinate Frame in the WCS component of an NDF.

Runs the command: $KAPPA_DIR/wcsframe .

Parameters:

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

starlink.kappa.wcsmosaic(in_, out, **kwargs)[source]¶

Tiles a group of NDFs using World Co-ordinate System information.

Runs the command: $KAPPA_DIR/wcsmosaic .

Parameters:
  • 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

starlink.kappa.wcsremove(ndf, frames, **kwargs)[source]¶

Remove co-ordinate Frames from the WCS component of an NDF.

Runs the command: $KAPPA_DIR/wcsremove .

Parameters:
  • 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

starlink.kappa.wcsshow(ndf, object, **kwargs)[source]¶

Examines the internal structure of an AST Object.

Runs the command: $KAPPA_DIR/wcsshow .

Parameters:
  • 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

starlink.kappa.wcsslide(ndf, abs, **kwargs)[source]¶

Applies a translational correction to the WCS in an NDF.

Runs the command: $KAPPA_DIR/wcsslide .

Parameters:
  • 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

starlink.kappa.wcstran(ndf, posin, **kwargs)[source]¶

Transform a position from one NDF co-ordinate Frame to another.

Runs the command: $KAPPA_DIR/wcstran .

Parameters:
  • 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

starlink.kappa.wiener(in_, psf, out, xcentre, ycentre, **kwargs)[source]¶

Applies a Wiener filter to a 1- or 2-dimensional array.

Runs the command: $KAPPA_DIR/wiener .

Parameters:
  • 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

starlink.kappa.zaplin(in_, out, **kwargs)[source]¶

Replaces regions in a two-dimensional NDF by bad values or by

Runs the command: $KAPPA_DIR/zaplin .

Parameters:
  • 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

starlink.picard module¶

Module for running PICARD recipes from python.

starlink.picard.calc_scuba2_avpspec(*args, **kwargs)[source]¶

Run PICARD’S CALC_SCUBA2_AVPSPEC recipe.

starlink.picard.calc_scuba2_fcf(*args, **kwargs)[source]¶

Run PICARD’S CALC_SCUBA2_FCF recipe.

starlink.picard.calc_scuba2_nefd(*args, **kwargs)[source]¶

Run PICARD’S CALC_SCUBA2_NEFD recipe.

starlink.picard.calibrate_scuba2_data(*args, **kwargs)[source]¶

Run PICARD’S CALIBRATE_SCUBA2_DATA recipe.

starlink.picard.coadd_jsa_tiles(*args, **kwargs)[source]¶

Run PICARD’S COADD_JSA_TILES recipe.

starlink.picard.create_moments_map(*args, **kwargs)[source]¶

Run PICARD’S CREATE_MOMENTS_MAP recipe.

starlink.picard.create_png(*args, **kwargs)[source]¶

Run PICARD’S CREATE_PNG recipe.

starlink.picard.crop_scuba2_images(*args, **kwargs)[source]¶

Run PICARD’S CROP_SCUBA2_IMAGES recipe.

starlink.picard.estimate_image_alignment(*args, **kwargs)[source]¶

Run PICARD’S ESTIMATE_IMAGE_ALIGNMENT recipe.

starlink.picard.jsa_catalogue(*args, **kwargs)[source]¶

Run PICARD’S JSA_CATALOGUE recipe.

starlink.picard.mosaic_jcmt_images(*args, **kwargs)[source]¶

Run PICARD’S MOSAIC_JCMT_IMAGES recipe.

starlink.picard.picard_demonstrator(*args, **kwargs)[source]¶

Run PICARD’S PICARD_DEMONSTRATOR recipe.

starlink.picard.scuba2_check_cal(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_CHECK_CAL recipe.

starlink.picard.scuba2_check_rms(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_CHECK_RMS recipe.

starlink.picard.scuba2_display_pca(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_DISPLAY_PCA recipe.

starlink.picard.scuba2_jackknife(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_JACKKNIFE recipe.

starlink.picard.scuba2_jackknife_psf(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_JACKKNIFE_PSF recipe.

starlink.picard.scuba2_map_pspec(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_MAP_PSPEC recipe.

starlink.picard.scuba2_mapstats(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_MAPSTATS recipe.

starlink.picard.scuba2_matched_filter(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_MATCHED_FILTER recipe.

starlink.picard.scuba2_photom(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_PHOTOM recipe.

starlink.picard.scuba2_register_images(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_REGISTER_IMAGES recipe.

starlink.picard.scuba2_remove_background(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_REMOVE_BACKGROUND recipe.

starlink.picard.scuba2_sassy(*args, **kwargs)[source]¶

Run PICARD’S SCUBA2_SASSY recipe.

starlink.picard.stack_jcmt_frames(*args, **kwargs)[source]¶

Run PICARD’S STACK_JCMT_FRAMES recipe.

starlink.picard.uncalibrate_scuba2_data(*args, **kwargs)[source]¶

Run PICARD’S UNCALIBRATE_SCUBA2_DATA recipe.

starlink.picard.untrim_jsa_tiles(*args, **kwargs)[source]¶

Run PICARD’S UNTRIM_JSA_TILES recipe.

starlink.polpack module¶

Runs commands from the Starlink POLPACK 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)

starlink.polpack.polbin(in_, out, box, method, **kwargs)[source]¶

Bins a catalogue containing Stokes parameters.

Runs the command: $POLPACK_DIR/polbin .

Parameters:
  • in_ (str) – Input catalogue
  • out (str) – Output catalogue
  • box (List[float]) – Spatial bin size (pixels)
  • method (str) – Binning method [MEDIAN]
Keyword Arguments:
 
  • debias (bool) – Remove statistical bias? [!]
  • integrate (bool) – Integrate all input vectors into a single vector? [FALSE]
  • minval (int) – Min. number of good input values per bin [1]
  • radec (bool) – Produce RA & DEC columns, if possible? [current value]
  • sigmas (float) – Clipping limit (standard deviations) [4.0]
  • zbox (float) – Spectral bin size (pixels)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLBIN for full documentation of this command in the latest Starlink release

starlink.polpack.polcal(in_, out, **kwargs)[source]¶

Converts a set of analysed intensity images into a cube holding Stokes

Runs the command: $POLPACK_DIR/polcal .

Parameters:
  • in_ (str,filename) – Input intensity images
  • out (str,filename) – Output Stokes cube
Keyword Arguments:
 
  • dezero (bool) – Calculate zero-point corrections for the input data? [FALSE]
  • dualbeam (bool) – Is the dual-beam algorithm to be used? [!]
  • etol (float) – Tolerence for E factor convergence [0.01]
  • ilevel (int) – Level of information to display [1]
  • maxit (int) – Maximum number of iterations [dyn.]
  • minfrac (float) – Minimum fraction of good input pixels required [0.0]
  • nsigma (float) – Rejection threshold in single-beam mode [3.0]
  • pmode (str) – Polarimetric mode (LINEAR or CIRCULAR) [LINEAR]
  • setvar (bool) – Store estimated variances in input images? [FALSE]
  • skysup (float) – Sky supression factor [10]
  • smbox (int) – Size of Stokes vector smoothing box, in pixels [3]
  • step (int) – Correlation length of the noise, in pixels [1]
  • title (str) – Title for output NDF [dyn.]
  • tolr (int) – Iterative convergence criterion in single-beam mode [0]
  • tols (float) – Scale factor tolerance for image inter-comparisons [0.001]
  • tolz (float) – Zero point tolerance for image inter-comparisons [0.05]
  • trimbad (bool) – Trim the output cube to exclude any bad borders? [FALSE]
  • variance (bool) – Are output variance values to be generated? [!]
  • weights (int) – Scheme for choosing weights for input intensity values [1]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLCAL for full documentation of this command in the latest Starlink release

starlink.polpack.polcent(ndf, infile, outfile, **kwargs)[source]¶

Find the centroid of a set of positions in an image.

Runs the command: $POLPACK_DIR/polcent .

Parameters:
  • ndf (str,filename) – Input image
  • infile (str) – Text file containing initial positions
  • outfile (str) – Text file to receive accurate positions
Keyword Arguments:
 
  • isize (int) – Size of search box [9]
  • maxiter (int) – Maximum number of refining iterations [3]
  • maxshift (float) – Maximum shift in position [5.5]
  • positive (bool) – Features have positive signal [TRUE]
  • toler (float) – Positional tolerance in centroid [0.05]
Returns:

xyout (str) – Object to contain the x an y centroid positions

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLCENT for full documentation of this command in the latest Starlink release

starlink.polpack.polconcat(in_, out, **kwargs)[source]¶

Concatenate two or more vector catalogues.

Runs the command: $POLPACK_DIR/polconcat .

Parameters:
  • in_ (str) – Input catalogues
  • out (str) – Output catalogue

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLCONCAT for full documentation of this command in the latest Starlink release

starlink.polpack.polexp(in_, **kwargs)[source]¶

Copies information from the POLPACK extension to named FITS keywords.

Runs the command: $POLPACK_DIR/polexp .

Parameters:in_ (str) – Input images
Keyword Arguments:
 namelist (str) – File to contain a list of the NDFs [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLEXP for full documentation of this command in the latest Starlink release

starlink.polpack.polexpx(in_, **kwargs)[source]¶

Copies information from the POLPACK extension to named FITS keywords.

Runs the command: $POLPACK_DIR/polexpx .

Parameters:in_ (str,filename) – Input NDF

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLEXPX for full documentation of this command in the latest Starlink release

starlink.polpack.polext(in_, **kwargs)[source]¶

Sets explicit values in the POLPACK extension.

Runs the command: $POLPACK_DIR/polext .

Parameters:

in_ (str) – Input images

Keyword Arguments:
 
  • angrot (float) – A new ANGROT value [!]
  • anlang (float) – A new ANLANG value [!]
  • eps (float) – A new EPS value [!]
  • filter (str) – A new FILTER value [!]
  • imgid (str) – New IMGID value(s) [!]
  • namelist (str) – File to contain a list of the NDFs [!]
  • ray (str) – A new RAY value [!]
  • stokes (str) – A new STOKES value [!]
  • t (float) – A new T value [!]
  • wplate (str) – A new WPLATE value [!]
Returns:

  • vangrot (float)
  • vanlang (float)
  • veps (float)
  • vfilter (str)
  • vimgid (str)
  • vray (str)
  • vstokes (str)
  • vt (float)
  • vversion (str)
  • vwplate (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLEXT for full documentation of this command in the latest Starlink release

starlink.polpack.polimage(in_, out, coldat, **kwargs)[source]¶

Converts a catalogue into an NDF.

Runs the command: $POLPACK_DIR/polimage .

Parameters:
  • in_ (str) – Input catalogue
  • out (str,filename) – Output image
  • coldat (str) – Name of catalogue column holding data values
Keyword Arguments:
 
  • colvar (str) – Name of catalogue column holding variances [!]
  • colx (str) – Name of catalogue column holding X positions [X]
  • coly (str) – Name of catalogue column holding Y positions [Y]
  • method (str) – Binning method [MEAN]
  • colz (str) – Name of catalogue column holding Z positions [dyn.]
  • box (List[float]) – Bin size [1.0]
  • minval (int) – Min. number of good input values per bin [1]
  • shape (bool) – Use spatial information in the input catalogue? [TRUE]
  • sigmas (float) – Clipping limit (standard deviations) [4.0]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLIMAGE for full documentation of this command in the latest Starlink release

starlink.polpack.polimp(in_, **kwargs)[source]¶

Copies FITS keyword values into the POLPACK extension.

Runs the command: $POLPACK_DIR/polimp .

Parameters:

in_ (str) – Input images

Keyword Arguments:
 
  • table (str) – Import control table [!]
  • abort (bool) – Abort if any data file cannot be processed? [dyn.]
  • namelist (str) – File to contain a list of the NDFs [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLIMP for full documentation of this command in the latest Starlink release

starlink.polpack.polimpx(in_, **kwargs)[source]¶

Copies FITS keyword values into the POLPACK extension.

Runs the command: $POLPACK_DIR/polimpx .

Parameters:in_ (str,filename) – Input NDF

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLIMPX for full documentation of this command in the latest Starlink release

starlink.polpack.polka(in_, out_s, **kwargs)[source]¶

Creates Stokes vectors from a set of 2-dimensional intensity frames.

Runs the command: $POLPACK_DIR/polka .

Parameters:
  • in_ (str,filename) – Input object frames
  • out_s (str) – Output cube for Stokes parameters
Keyword Arguments:
 
  • badcol (str) – Colour with which to mark missing pixel data [CYAN]
  • curcol (str) – Colour with which to mark current objects [RED]
  • dpi (int) – Screen dots per inch [!]
  • dualbeam (bool) – Run in dual-beam mode? [TRUE]
  • fittype (int) – Fit type (1-5) for aligning images [1]
  • helparea (bool) – Display the help area? [TRUE]
  • items (str) – Required items in the status area (private) [.0]
  • logfile (str) – The name of a file in which to store all ATASK messages. [!]
  • oefittype (int) – Fit type (1-5) for aligning O and E rays [1]
  • out (str) – Aligned output intensity images [*_A]
  • out_e (str) – Aligned output images holding E-ray areas [*_E]
  • out_o (str) – Aligned output images holding O-ray areas [*_O]
  • percentiles (List[float]) – Percentiles for scaling [5,95]
  • pmode (str) – Type of polarisation being measured [Linear]
  • pol (bool) – Processing polarimetry data? [TRUE]
  • psfsize (int) – Typical size of star-like image features (in pixels) [3]
  • refcol (str) – Colour with which to mark reference objects [GREEN]
  • refin (str,filename) – Reference frame [!]
  • selcol (str) – Colour with which to mark the selected area [RED]
  • skyframes (str,filename) – Input sky frames [!]
  • skyoff (bool) – Subtract the sky background off the output images? [TRUE]
  • skypar (int) – Order of polynomial sky fit on each axis [0]
  • starthelp (bool) – Display hyper-text help automatically at start-up? [TRUE]
  • statusarea (bool) – Display the status area? [TRUE]
  • view (str) – View new images zoomed or unzoomed? [ZOOMED]
  • xhair (bool) – Use a cross-hair over the image display area? [TRUE]
  • xhaircol (str) – Colour with which to draw the cross-hair (if required) [YELLOW]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLKA for full documentation of this command in the latest Starlink release

starlink.polpack.polplot(cat, **kwargs)[source]¶

Plots a 2-dimensional vector map.

Runs the command: $POLPACK_DIR/polplot .

Parameters:

cat (str) – Input catalogue

Keyword Arguments:
 
  • angrot (float) – Orientation of reference direction [0.0]
  • arrow (float) – Fractional size of arrow heads [0.0]
  • axes (bool) – Are annotated axes to be drawn? [TRUE]
  • clear (bool) – Is the current picture to be cleared before plotting? [TRUE]
  • colang (str) – Name of catalogue column holding vector angles [dyn.]
  • colmag (str) – Name of catalogue column holding vector lengths [dyn.]
  • colx (str) – Name of catalogue column holding vector X position [dyn.]
  • coly (str) – Name of catalogue column holding vector Y position [dyn.]
  • colz (str) – Name of catalogue column holding vector Z position [dyn.]
  • device – Name of graphics device [Current graphics device]
  • epoch (float) – Epoch of observation
  • fill (bool) – Fill the plotting area? [FALSE]
  • frame (str) – Required co-ordinate Frame [!]
  • just (str) – Vector justification [“Centre”]
  • 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 [dyn.]
  • lbnd (List[float]) – Co-ordinates at lower left corner of plotting area [!]
  • margin (List[float]) – Widths of margins around DATA picture [dyn.]
  • negate (bool) – Are the supplied angles to be negated? [FALSE]
  • style (str) – Plotting style for the annotated axes and vectors [current value]
  • ubnd (List[float]) – Co-ordinates at upper right corner of plotting area [!]
  • vscale (float) – Data value for a 1-centimetre vector [dyn.]
  • zaxval (str) – The Z axis value to plot
  • zcolval (str) – The Z column value to plot [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLPLOT for full documentation of this command in the latest Starlink release

starlink.polpack.polprep(in_, out, ref, **kwargs)[source]¶

Prepare an input image for use by Polka.

Runs the command: $POLPACK_DIR/polprep .

Parameters:
  • in_ (str,filename) – Input NDF structure
  • out (str,filename) – Output NDF structure
  • ref (bool) – Is this the reference image?
Returns:

frame (str) – The Domain name

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLPREP for full documentation of this command in the latest Starlink release

starlink.polpack.polrdtcl(in_, ref, out, **kwargs)[source]¶

Reads a text file holding the contents of a specified catalogue in

Runs the command: $POLPACK_DIR/polrdtcl .

Parameters:
  • in_ (str) – Input text file
  • ref (str) – Reference catalogue
  • out (str) – Output catalogue

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLRDTCL for full documentation of this command in the latest Starlink release

starlink.polpack.polrotref(qin, uin, qout, uout, **kwargs)[source]¶

Rotate the reference direction in a pair of Q and U images.

Runs the command: $POLPACK_DIR/polrotref .

Parameters:
  • qin (str,filename) – Input Q NDF
  • uin (str,filename) – Input U NDF
  • qout (str,filename) – Output Q NDF
  • uout (str,filename) – Output U NDF
Keyword Arguments:
 
  • like (str,filename) – Template Q or U NDF [!]
  • axis (int) – Index of axis to use as reference direction [2]
  • epoch (float) – Epoch of observation
  • frame (str) – Co-ordinate Frame defining new reference direction [“PIXEL”]
  • useaxis (str) – The WCS axes spanning the spatial plane [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLROTREF for full documentation of this command in the latest Starlink release

starlink.polpack.polselect(in_, out, **kwargs)[source]¶

Select vectors from a catalogue.

Runs the command: $POLPACK_DIR/polselect .

Parameters:
  • in_ (str) – Input catalogue
  • out (str) – Output catalogue
Keyword Arguments:
 
  • exp (str) – Selection expression
  • invert (bool) – Invert the selection? [FALSE]
  • mask (str,filename) – Mask NDF
  • mode (str) – Type of selection [Expression]
  • ref (str,filename) – Reference NDF [!]
  • region (str) – File holding ARD description or AST Region
  • useaxis (str) – The WCS axes spanning the spatial plane [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLSELECT for full documentation of this command in the latest Starlink release

starlink.polpack.polsim(cube, in_, **kwargs)[source]¶

Produces intensity data corresponding to given Stokes vectors.

Runs the command: $POLPACK_DIR/polsim .

Parameters:
  • cube (str,filename) – Input Stokes cube
  • in_ (str) – Input intensity images
Returns:

out (str) – Output intensity images

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLSIM for full documentation of this command in the latest Starlink release

starlink.polpack.polstack(in_, out, **kwargs)[source]¶

Stack a set of intensity images.

Runs the command: $POLPACK_DIR/polstack .

Parameters:
  • in_ (str,filename) – Input intensity frames
  • out (str,filename) – Output intensity images
Keyword Arguments:
 
  • bin (float) – Bin size, in degrees [10]
  • ilevel (int) – Screen information level [1]
  • minin (int) – Minimum number of input images per output image [3]
  • origin (float) – Analysis angle at start of first bin, in degrees [0.0]
  • stack (str,filename) – 3D output stack [!]
  • twopi (bool) – Bin analysis angles in range 0 to 360 degrees? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLSTACK for full documentation of this command in the latest Starlink release

starlink.polpack.polvec(in_, cat, **kwargs)[source]¶

Calculates polarization vectors from supplied Stokes parameters.

Runs the command: $POLPACK_DIR/polvec .

Parameters:
  • in_ (str,filename) – Input Stokes cube
  • cat (str) – Output catalogue
Keyword Arguments:
 
  • i (str,filename) – Total intensity [!]
  • p (str,filename) – Percentage polarisation [!]
  • ang (str,filename) – Polarisation angle [!]
  • ip (str,filename) – Polarised intensity [!]
  • q (str,filename) – Stokes parameter Q [!]
  • u (str,filename) – Stokes parameter U [!]
  • v (str,filename) – Stokes parameter V [!]
  • box (List[int]) – Bin size [1]
  • debias (bool) – Remove statistical bias? [!]
  • method (str) – Binning method [MEDIAN]
  • radec (bool) – Produce RA & DEC columns, if possible? [current value]
  • refupdate (bool) – Update the output reference direction? [TRUE]
  • sigmas (float) – Clipping limit (standard deviations) [4.0]
  • variance (bool) – Are variance values to be generated? [TRUE]
  • wlim (float) – Min. fraction of good input values per bin [0.0]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLVEC for full documentation of this command in the latest Starlink release

starlink.polpack.polversion(*args, **kwargs)[source]¶

Checks the package version number.

Runs the command: $POLPACK_DIR/polversion .

Keyword Arguments:
 compare (str) – The version string for comparison [!]
Returns:result (int)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLVERSION for full documentation of this command in the latest Starlink release

starlink.polpack.polwcscopy(in_, out, ref, **kwargs)[source]¶

Copies WCS from one catalogue to another.

Runs the command: $POLPACK_DIR/polwcscopy .

Parameters:
  • in_ (str) – Input catalogue
  • out (str) – Output catalogue
  • ref (str) – Reference catalogue

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLWCSCOPY for full documentation of this command in the latest Starlink release

starlink.polpack.polwrtcl(in_, out, system, **kwargs)[source]¶

Creates a text file holding the contents of a specified catalogue in

Runs the command: $POLPACK_DIR/polwrtcl .

Parameters:
  • in_ (str) – Input catalogue
  • out (str) – Output text file
  • system (str) – Required WCS system

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLWRTCL for full documentation of this command in the latest Starlink release

starlink.polpack.polzconv(cat, **kwargs)[source]¶

Convert a Z axis value to a Z column value

Runs the command: $POLPACK_DIR/polzconv .

Parameters:

cat (str) – Input catalogue

Keyword Arguments:
 
  • colx (str) – Name of catalogue column holding vector X position [dyn.]
  • coly (str) – Name of catalogue column holding vector Y position [dyn.]
  • colz (str) – Name of catalogue column holding vector Z position [dyn.]
  • zaxval (str) – The Z axis value to convert
  • zcolval (str) – The Z column value to convert [!]
Returns:

  • zaxuse (str) – The Z axis value to use
  • zcoluse (str) – The Z column value to use

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun223.htx/sun223.html?xref_POLZCONV for full documentation of this command in the latest Starlink release

starlink.smurf module¶

Runs commands from the Starlink SMURF 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)

starlink.smurf.badbolos(in_, bad_columns, bad_rows, bad_bolos, **kwargs)[source]¶

Generate a map of random dead bolometers and add it as an NDF

Runs the command: $SMURF_DIR/badbolos .

Parameters:
  • in_ (str) – Input Simulated NDF File
  • bad_columns (int) – Number of bad columns of bolometers
  • bad_rows (int) – Number of bad rows of bolometers
  • bad_bolos (int) – Number of additional bad individual bolometers
Keyword Arguments:
 
  • seed (int) – [!]
  • ard (str) – Input ARD Description File
  • method (str) – Bad bolometer generation method [RANDOM]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_BADBOLOS for full documentation of this command in the latest Starlink release

starlink.smurf.calcdark(in_, out, **kwargs)[source]¶

Calculate the 2d dark frame from dark observation.

Runs the command: $SMURF_DIR/calcdark .

Parameters:
  • in_ (str,filename) – Input dark timeseries
  • out (str,filename) – Processed darks
Keyword Arguments:
 

bbm (str,filename) – Bad bolometer masks [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_CALCDARK for full documentation of this command in the latest Starlink release

starlink.smurf.calcflat(in_, out, **kwargs)[source]¶

Calculate a flatfield solution from a flatfield observation.

Runs the command: $SMURF_DIR/calcflat .

Parameters:
  • in_ (str,filename) – Input flatfield files
  • out (str,filename) – Processed flatfield file
Keyword Arguments:
 
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • method (str) – Flatfield calculation method [POLYNOMIAL]
  • order (int) – Order of polynomial to use for flatfield fitting [1]
  • resp (str,filename) – Responsivity map [!]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]
  • snrmin (float) – Signal-to-noise threshold for responsivity data [3.0]
Returns:

ngood (int) – Number of good responsivities

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_CALCFLAT for full documentation of this command in the latest Starlink release

starlink.smurf.calcnoise(in_, out, **kwargs)[source]¶

Calculate noise image

Runs the command: $SMURF_DIR/calcnoise .

Parameters:
  • in_ (str,filename) – Input files containing flatfield parameters
  • out (str,filename) – Noise images
Keyword Arguments:
 
  • config (str) – Configuration parameters for cleaning [current value]
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • flow (float) – Frequency to use for noise ratio image [0.5]
  • freq (float) – Frequency limits for white noise calculation [2,10]
  • nepcliphigh (float) – Clip NEP values this many standard deviations above median [!]
  • nepcliplog (bool) – Clip based on log of the NEP [TRUE]
  • nepcliplow (float) – Clip NEP values this many standard deviations below median [3]
  • noicliphigh (float) – Clip NOISE values this many standard deviations above median [!]
  • noicliplog (bool) – Clip based on log of the NOISE [TRUE]
  • noicliplow (float) – Clip NOISE values this many standard deviations below median [3]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • power (str,filename) – Power spectra files [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]
  • tseries (str,filename) – Cleaned time-series files [!]
Returns:

  • effnep (float) – Effective NEP of subarray
  • effnoise (float) – Effective noise of subarray
  • nepgoodbol (int) – Number of bolometers with good NEP measurements
  • noisegoodbol (int) – Number of bolometers with good NOISE measurements

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_CALCNOISE for full documentation of this command in the latest Starlink release

starlink.smurf.calcqu(in_, outq, outu, **kwargs)[source]¶

Calculate Q and U images from a set of time-series data files.

Runs the command: $SMURF_DIR/calcqu .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • outq (str,filename) – Output Q NDFs
  • outu (str,filename) – Output U NDFs
Keyword Arguments:
 
  • arcerror (float) – Max spatial shift in one time-slice block (arc-secs) [dyn.]
  • config (str) – Configuration parameters [!]
  • fix (bool) – Fix triggering issue? [FALSE]
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • harmonic (int) – The half-wave plate harmonic to use [4]
  • lsqfit (bool) – Use least-squares method? [FALSE]
  • maxsize (int) – Max no. of time slices in one block (0=no limit) [0]
  • minsize (int) – Min no. of time slices in one block [200]
  • north (str) – System to use as the reference direction [“TRACKING”]
  • outf (str,filename) – Output fitted data NDFs [!]
  • outfilesi (str) – New text file holding list of output I NDFs [!]
  • outfilesq (str) – New text file holding list of output Q NDFs [!]
  • outfilesu (str) – New text file holding list of output U NDFs [!]
  • outi (str,filename) – Output I NDFs [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_CALCQU for full documentation of this command in the latest Starlink release

starlink.smurf.calcresp(in_, out, **kwargs)[source]¶

Calculate bolometer responsivity from stored flatfield solution.

Runs the command: $SMURF_DIR/calcresp .

Parameters:
  • in_ (str,filename) – Input files containing flatfield parameters
  • out (str,filename) – Responsivity images
Keyword Arguments:
 

resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]

Returns:

ngood (List[int]) – Number of good responsivities in each file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_CALCRESP for full documentation of this command in the latest Starlink release

starlink.smurf.checkcoords(in_, **kwargs)[source]¶

Check for discrepancies between AZEL and TRACKING coordinates.

Runs the command: $SMURF_DIR/checkcoords .

Parameters:in_ (str,filename) – Input timeseries

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_CHECKCOORDS for full documentation of this command in the latest Starlink release

starlink.smurf.configmeld(*args, **kwargs)[source]¶

Compare two MAKEMAP configs using a visual file comparison tool.

Runs the command: $SMURF_DIR/configmeld.py .

Keyword Arguments:
 
  • config1 – The first configuration. This can be a normal config such as is supplied for the CONFIG parameter of MAKEMAP, or an NDF created by MAKEMAP.
  • config2 – The first configuration. This can be a normal config such as is supplied for the CONFIG parameter of MAKEMAP, or an NDF created by MAKEMAP. If a value is supplied for PARAM, then CONFIG2 defaults to null (!).
  • defaults – If TRUE, then each supplied configuration (CONFIG1 and CONFIG2) is extended to include default values are any MAKEMAP parameters that it does not specify. These defaults are read from file “$SMURF_DIR/smurf_makemap.def”. [TRUE]
  • param – If supplied, then the value used for the specified parameter is displayed on standard output, and no visual comparison is displayed. Separate values are displayed for CONFIG1 and (if supplied) CONFIG2. [!]
  • tool –

    Gives the name of the file comparison tool to use. The named command should be available on the current PATH. It should take the names of two files to compare as command line arguments. If null (!) is supplied, the first available tool in the following list is used:

    • meld: www.meldmerge.org
    • opendiff: developer.apple.com
    • diffmerge: www.sourcegear.com/diffmerge
    • kdiff3: kdiff3.sourceforge.net
    • tkdiff: sourceforge.net/projects/tkdiff
    • diffuse: diffuse.sourceforge.net [!]
  • waveband – This parameter is not used if either CONFIG1 or CONFIG2 is an NDF created by MAKEMAP. It should be one of “450” or “850”. It specifies which value should be displayed for configuration parameters that have separate values for 450 and 850 um. If either CONFIG1 or CONFIG2 is an NDF created by MAKEMAP, then the wavebands to use are determined from the headers in the NDFs.

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_CONFIGMELD for full documentation of this command in the latest Starlink release

starlink.smurf.copyflat(ref, in_, **kwargs)[source]¶

Copy the flatfield information from a reference file

Runs the command: $SMURF_DIR/copyflat .

Parameters:
  • ref (str,filename) – Input file containing flatfield parameters to copy
  • in_ (str,filename) – Files to receive the updated flatfield information

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_COPYFLAT for full documentation of this command in the latest Starlink release

starlink.smurf.dreamsolve(in_, out, **kwargs)[source]¶

Solve DREAM observations and generate 2-D images.

Runs the command: $SMURF_DIR/dreamsolve .

Parameters:
  • in_ (str,filename) – Input data file
  • out (str,filename) – Output data file
Keyword Arguments:
 
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • resist (str) – Heater resistance information [^$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_DREAMSOLVE for full documentation of this command in the latest Starlink release

starlink.smurf.dreamweights(ndf, out, config, **kwargs)[source]¶

Generate DREAM weights matrix.

Runs the command: $SMURF_DIR/dreamweights .

Parameters:
  • ndf (str,filename) – Input raw data file
  • out (str,filename) – Output weights file
  • config (str) – DREAM reconstruction parameters [current value]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_DREAMWEIGHTS for full documentation of this command in the latest Starlink release

starlink.smurf.dsutils(in_, **kwargs)[source]¶

A collection of utilities for estimating focal plane distortion.

Runs the command: $SMURF_DIR/dsutils .

Parameters:

in_ (str,filename) – Input time series cube

Keyword Arguments:
 
  • bmap (str) – File in which to put focal plane pixel to sky mapping [!]
  • border (int) – Width of border to exclude form each time slice (in pixels) [4]
  • colname (str) – Name of a columne to write to an output NDF [!]
  • colndf (str,filename) – Output NDF for values read from COLNAME column
  • forward (bool) – Produce code for forward transformation? [TRUE]
  • fpixsize (float) – Pixel size in focal plane units (mm) [1.0]
  • fxhi (float) – Upper focal plane X limit, in mm [50]
  • fxlo (float) – Lower focal plane X limit, in mm [-50]
  • fxoff (float) – Focal plane X value at ref point, in mm [!]
  • fyhi (float) – Upper focal plane Y limit, in mm [50]
  • fylo (float) – Lower focal plane Y limit, in mm [-50]
  • fyoff (float) – Focal plane Y value at ref point, in mm [!]
  • incat (str) – Name of input catalogue text file [!]
  • infitx (str,filename) – NDF containing polynomial fit for X distortion [!]
  • infity (str,filename) – NDF containing polynomial fit for Y distortion [!]
  • itime (int) – Index of time slice to dump to an output NDF [!]
  • lowfactor (float) – Factor for lowest usable data sum [0.5]
  • niter (int) – Number of sigma clips [3]
  • outang (str,filename) – Output NDF holding focal-plane distortion angles
  • outcat (str) – Name of output catalogue text file
  • outcode (str) – Name of output C source file
  • outdx (str,filename) – Output NDF holding focal-plane X offsets
  • outdy (str,filename) – Output NDF holding focal-plane Y offsets
  • outfx (str,filename) – Output NDF holding focal-plane X coords [!]
  • outfy (str,filename) – Output NDF holding focal-plane Y coords [!]
  • outmag (str,filename) – Output NDF holding focal-plane distortion magnitudes [!]
  • outslice (str,filename) – Output NDF holding time slice data
  • radius (float) – Radius of test circle (in bolometers) [!]
  • subarray (str) – SCUBA-2 sub-array name [s8d]
  • xbol (int) – X GRID index of test bolometer [!]
  • ybol (int) – Y GRID index of test bolometer [!]
  • zbox (int) – Smoothing box for timeslice data (in slices) [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_DSUTILS for full documentation of this command in the latest Starlink release

starlink.smurf.extinction(in_, out, **kwargs)[source]¶

Extinction correct SCUBA-2 data.

Runs the command: $SMURF_DIR/extinction .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • tausrc (str) – Source of opacity data [AUTO]
  • method (str) – Method to use for airmass calculation [ADAPTIVE]
  • bbm (str,filename) – Bad bolometer masks [!]
  • csotau (float) – Zenith optical depth at 225 GHz
  • filtertau (float) – Zenith optical depth for current filter
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • hasskyrem (bool) – Has sky removal been applied? [FALSE]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]
  • taurel (str) – Group containing tau relationships [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_EXTINCTION for full documentation of this command in the latest Starlink release

starlink.smurf.findslices(in_, xpos, ypos, **kwargs)[source]¶

Find time slices that are centred close to a given sky position.

Runs the command: $SMURF_DIR/findslices .

Parameters:
  • in_ (str,filename) – NDFs containing time-series data
  • xpos (str) – X position at search centre
  • ypos (str) – Y position at search centre
Keyword Arguments:
 
  • radius (float) – Radius of search circle in arc-sec [300]
  • frame (str,filename) – NDF defining coordinate frame [!]
  • closest (bool) – Display only closest time slices? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FINDSLICES for full documentation of this command in the latest Starlink release

starlink.smurf.fit1d(in_, out, rms, **kwargs)[source]¶

Fit 1-D profiles to a data cube

Runs the command: $SMURF_DIR/fit1d .

Parameters:
  • in_ (str,filename) – NDF with profiles to be fitted
  • out (str,filename) – NDF for fitted profiles
  • rms (float) – RMS in cube [data units]
Keyword Arguments:
 
  • config (str) – Config file with fit parameters [!]
  • userval (str) – File with user values for parameters [!]
  • pardir (str) – Directory with component parameter files [!]
  • parndf (str) – Input NDF with component parameter files [!]
  • parcomp (str) – Component parameter files files [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FIT1D for full documentation of this command in the latest Starlink release

starlink.smurf.fitsmerge(in_, ndf, **kwargs)[source]¶

Merge FITS headers.

Runs the command: $SMURF_DIR/fitsmerge .

Parameters:
  • in_ (str,filename) – Files containing input FITS headers
  • ndf (str,filename) – File to receive merged FITS headers

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FITSMERGE for full documentation of this command in the latest Starlink release

starlink.smurf.fixsteps(in_, out, **kwargs)[source]¶

Fix DC steps in a supplied SCUBA-2 time series NDF.

Runs the command: $SMURF_DIR/fixsteps .

Parameters:
  • in_ (str,filename) – Input timeseries
  • out (str,filename) – Cleaned timeseries
Keyword Arguments:
 
  • config (str) – Cleaning parameters [!]
  • continue_ (bool) – Continue to report further changes? [YES]
  • dcfitbox (int) – Number of samples in fitting box [dyn.]
  • dclimcorr (int) – Threshold for correction of correlated steps [dyn.]
  • dcmaxsteps (int) – Max. no. of steps before bolo is flagged as bad [dyn.]
  • dcsmooth (int) – Width of median filter used to smooth data [dyn.]
  • dcthresh (float) – Threshold signal to noise ratio to detect and flag steps [dyn.]
  • first (int) – Index of first changed step to report [1]
  • meanshift (bool) – Use a mean-shift filter before fixing steps? [FALSE]
  • newsteps (str) – Name of output text file holding new step descriptions [!]
  • oldsteps (str) – Name of input text file holding old step descriptions [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • sizetol (float) – Minimum significant relative error in step height [0.05]
Returns:

  • changed (bool) – Were and significant changes found?
  • nfixed (int) – Number of fixed steps
  • nrejected (int) – Number of rejected bolometers

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FIXSTEPS for full documentation of this command in the latest Starlink release

starlink.smurf.flatfield(in_, out, **kwargs)[source]¶

Flatfield SCUBA-2 data

Runs the command: $SMURF_DIR/flatfield .

Parameters:
  • in_ (str,filename) – Input timeseries
  • out (str,filename) – Flatfielded timeseries
Keyword Arguments:
 
  • bbm (str,filename) – Bad bolometer masks [!]
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FLATFIELD for full documentation of this command in the latest Starlink release

starlink.smurf.fts2deglitch(in_, out, **kwargs)[source]¶

Removes the glitches from the source.

Runs the command: $SMURF_DIR/fts2deglitch .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
Keyword Arguments:
 
  • ccsize (int) – Core cluster size [20]
  • deglitchmode (int) – Deglitching mode: 1=CORE, 2=TAIL and 0=ALL [0]
  • dshalflength (int) – Double-sided interferogrm half-length [500]
  • tcsigma (float) – Tail cutoff standard deviation as percentage [0.80]
  • tcsigmamul (float) – Tail cutoff standard deviation multiplier [4]
  • tcsize (int) – Tail cluster size [60]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2DEGLITCH for full documentation of this command in the latest Starlink release

starlink.smurf.fts2flatfield(in_, out, **kwargs)[source]¶

Corrects for the pixel-to-pixel variation in spectral responsivity,

Runs the command: $SMURF_DIR/fts2flatfield .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2FLATFIELD for full documentation of this command in the latest Starlink release

starlink.smurf.fts2freqcorr(in_, out, theta, **kwargs)[source]¶

Off-Axis frequency correction.

Runs the command: $SMURF_DIR/fts2freqcorr .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
  • theta (str,filename) – Theta file storing the off-axis angles

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2FREQCORR for full documentation of this command in the latest Starlink release

starlink.smurf.fts2gaia(*args, **kwargs)[source]¶

Display in-band FTS-2 spectrum in gaia

Runs the command: $SMURF_DIR/fts2gaia.py .

Keyword Arguments:
 in_ – The NDF FTS-2 spectrum file to be displayed.

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2GAIA for full documentation of this command in the latest Starlink release

starlink.smurf.fts2init(in_, out, zpd, **kwargs)[source]¶

Prepares the input to be processed by the FTS2 Data Reduction tasks

Runs the command: $SMURF_DIR/fts2init .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
  • zpd (str,filename) – ZPD calibration file
Keyword Arguments:
 
  • centre (float) – Moving mirror position at centre of travel (mm) [225.0]
  • fnyquist (float) – Override the default Nyquist frequency [0]
  • rtsdelay (float) – RTS delay (ms) [0.0]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2INIT for full documentation of this command in the latest Starlink release

starlink.smurf.fts2maskmap(in_, out, ftsport, **kwargs)[source]¶

Mask time series data for a SCUBA-2 map with FTS-2 in the beam.

Runs the command: $SMURF_DIR/fts2maskmap .

Parameters:
  • in_ (str,filename) – Input time series cubes
  • out (str,filename) – Output time series cubes
  • ftsport (str) – FTS-2 port: tracking or image [TRACKING]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2MASKMAP for full documentation of this command in the latest Starlink release

starlink.smurf.fts2opcorr(in_, out, **kwargs)[source]¶

Compansates for the effect of the FTS-2 optics on image distortion and

Runs the command: $SMURF_DIR/fts2opcorr .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2OPCORR for full documentation of this command in the latest Starlink release

starlink.smurf.fts2phasecorr(in_, out, **kwargs)[source]¶

Given a 3D data cube of single-sided interferograms, applies phase

Runs the command: $SMURF_DIR/fts2phasecorr .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
Keyword Arguments:
 
  • apodization (int) – Apodization method [0]
  • degree (int) – Fitting polynomial degree [1]
  • dshalflength (int) – Double-sided interferogram half-length [512]
  • pcfhalflength (int) – Phase correction function half-length [128]
  • wnlbound (float) – The lower bound of the wavenumber range [0]
  • wnubound (float) – The upper bound of the wavenumber range [0]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2PHASECORR for full documentation of this command in the latest Starlink release

starlink.smurf.fts2phasecorrds(in_, out, **kwargs)[source]¶

Given a 3D data cube of double-sided interferograms, applies phase

Runs the command: $SMURF_DIR/fts2phasecorrds .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
Keyword Arguments:
 
  • degree (int) – Fitting polynomial degree [1]
  • wnlbound (float) – The lower bound of the wavenumber range [0]
  • wnubound (float) – The upper bound of the wavenumber range [0]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2PHASECORRDS for full documentation of this command in the latest Starlink release

starlink.smurf.fts2portimbal(in_, out, **kwargs)[source]¶

Corrects for atmospheric transmission across the spectral dimension.

Runs the command: $SMURF_DIR/fts2portimbal .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2PORTIMBAL for full documentation of this command in the latest Starlink release

starlink.smurf.fts2removebse(in_, out, bse, **kwargs)[source]¶

Removes the Beam splitter Self Emission (BSE) from the source.

Runs the command: $SMURF_DIR/fts2removebse .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
  • bse (str,filename) – Beamsplitter self emission file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2REMOVEBSE for full documentation of this command in the latest Starlink release

starlink.smurf.fts2spectrum(in_, out, sfp, **kwargs)[source]¶

Computes the spectrum of the interferograms.

Runs the command: $SMURF_DIR/fts2spectrum .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
  • sfp (str,filename) – SFP calibration file [!]
Keyword Arguments:
 
  • resolution (float) – Spectral Resolution: [0.0]
  • wnsfpfirst (float) – Spectral Filter Profile Wave Number range starting from [0.0]
  • wnsfplast (float) – Spectral Filter Profile Wave Number range ending with [0.0]
  • zeropad (int) – Zero padding [1]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2SPECTRUM for full documentation of this command in the latest Starlink release

starlink.smurf.fts2split(in_, out, **kwargs)[source]¶

Convert multi scan NDFs for use in FTS-2 data reduction pipeline

Runs the command: $SMURF_DIR/fts2split .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
Keyword Arguments:
 
  • bandpass (float) – Distance to extract on either side of centre (mm) [0.0]
  • outfiles (str) – Text file in which to put the output NDF names [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2SPLIT for full documentation of this command in the latest Starlink release

starlink.smurf.fts2transcorr(in_, out, tau, **kwargs)[source]¶

Corrects for atmospheric transmission across the spectral dimension.

Runs the command: $SMURF_DIR/fts2transcorr .

Parameters:
  • in_ (str,filename) – Input data files
  • out (str,filename) – Output data files
  • tau (str,filename) – Atmospheric transmission calibration file
Keyword Arguments:
 

debug (bool) – If debug, does NOT include dry component! [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_FTS2TRANSCORR for full documentation of this command in the latest Starlink release

starlink.smurf.gsd2acsis(in_, directory, **kwargs)[source]¶

Convert a GSD format DAS data file to an ACSIS format NDF.

Runs the command: $SMURF_DIR/gsd2acsis .

Parameters:
  • in_ (str) – Input DAS or AOSC GSD File
  • directory (str) – Output Directory
Returns:

obsnum (int) – Observation Number

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_GSD2ACSIS for full documentation of this command in the latest Starlink release

starlink.smurf.gsdshow(in_, **kwargs)[source]¶

Display the contents of headers and arrays for GSD files.

Runs the command: $SMURF_DIR/gsdshow .

Parameters:

in_ (str) – Input DAS or AOSC GSD File

Keyword Arguments:
 
  • descriptions (bool) – Show descriptions? [FALSE]
  • showdata (bool) – Print out data array? [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_GSDSHOW for full documentation of this command in the latest Starlink release

starlink.smurf.impaztec(in_, out, **kwargs)[source]¶

Import AzTEC NetCDF files and produce SCUBA-2 ICD-compliant files

Runs the command: $SMURF_DIR/impaztec .

Parameters:
  • in_ (str) – Input AzTEC NETCDF File
  • out (str) – Output NDF file

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_IMPAZTEC for full documentation of this command in the latest Starlink release

starlink.smurf.jsadicer(in_, **kwargs)[source]¶

Dice an image or cube into JSA tiles

Runs the command: $SMURF_DIR/jsadicer .

Parameters:

in_ (str,filename) – Input map or cube

Keyword Arguments:
 
  • instrument (str) – JCMT instrument [dyn.]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • proj (str) – JSA projection [“HPX”]
  • trim (int) – How to trim the output NDFs [2]
Returns:

  • jsatilelist (List[int])
  • ntile (int)
  • out (str) – Basename for output NDFs

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_JSADICER for full documentation of this command in the latest Starlink release

starlink.smurf.jsajoin(*args, **kwargs)[source]¶

Create a single tangent-plane NDF from a set of JSA tiles.

Runs the command: $SMURF_DIR/jsajoin.py .

Keyword Arguments:
 
  • centre1 – The formatted RA or Galactic longitude at the centre of a circle that defines the required extent of the output NDF. See also CENTRE2 and RADIUS. The coordinate system is specified by parameter SYSTEM. It is only accessed if a null (!) value is supplied for parameter REGION. If a null value is supplied for both CENTRE1 and REGION, the output NDF will encompass all the data specified by parameter TILES. [!]
  • centre2 – The formatted Dec or Galactic latitude at the centre of a circle that defines the required extent of the output NDF. See also CENTRE1 and RADIUS. The coordinate system is specified by parameter SYSTEM. It is only accessed if a null (!) value is supplied for parameter REGION and a non-null value is supplied for parameter CENTRE1.
  • instrument – Selects the tiling scheme to be used. The following instrument names are recognised (unambiguous abbreviations may be supplied): “SCUBA-2(450)”, “SCUBA-2(850)”, “ACSIS”, “DAS”. If the first input NDF contains JCMT data, the default value for this parameter is determined from the FITS headers in the input NDF. Otherwise, there is no default and an explicit value must be supplied.
  • out – The output NDF.
  • pixsize – The pixel size to use for the output NDF, in arc-seconds. Not used if an NDF is supplied for parameter REGION. If a null (!) value is supplied, a default pixel size is used equal to the geometric mean of the pixel dimensions in the middle tile specified by parameter TILES. [!]
  • radius – The radius of the circle that defines the required extent of the output NDF, in arc-minutes. See also CENTRE1 and CENTRE2. It is only accessed if a null (!) value is supplied for parameter REGION and a non-null value is supplied for parameter CENTRE1.
  • region – Specifies the required extent of the output NDF. It can be either a text file holding an AST Region description, or an NDF. If it is an NDF, it also defines the WCS and pixel grid of the output NDF. If a null (!) value is supplied, the region is specified using parameter CENTRE1, CENTRE2 and RADIUS. [!]
  • retain – Should the temporary directory containing the intermediate files created by this script be retained? If not, it will be deleted before the script exits. If retained, a message will be displayed at the end specifying the path to the directory. [FALSE]
  • system – The celestial coordinate system used by the CENTRE1 and CENTRE2 parameters. It can be either “ICRS” or “Galactic”. The output NDF inherits this same system as its current WCS Frame. [“ICRS”]
  • tiles – A group of NDFs each of which corresponds to a JSA tile. They should all relate to a single instrument.

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_JSAJOIN for full documentation of this command in the latest Starlink release

starlink.smurf.jsapaster(in_, out, **kwargs)[source]¶

Paste several JSA tiles into a single mosaic.

Runs the command: $SMURF_DIR/jsapaster .

Parameters:
  • in_ (str,filename) – Input JSA tiles
  • out (str,filename) – Output mosaic
Keyword Arguments:
 

instrument (str) – JCMT instrument [dyn.]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_JSAPASTER for full documentation of this command in the latest Starlink release

starlink.smurf.jsasplit(*args, **kwargs)[source]¶

Split a single NDF up into a set of JSA tiles.

Runs the command: $SMURF_DIR/jsasplit.py .

Keyword Arguments:
 
  • glevel – Controls the level of information to write to a text log file. Allowed values are as for “ILEVEL”. The log file to create is specified via parameter “LOGFILE”. [“ATASK”]
  • ilevel –

    Controls the level of information displayed on the screen by the script. It can take any of the following values (note, these values are purposefully different to the SUN/104 values to avoid confusion in their effects):

    • ”NONE”: No screen output is created
    • ”CRITICAL”: Only critical messages are displayed such as warnings.
    • ”PROGRESS”: Extra messages indicating script progress are also displayed.
    • ”ATASK”: Extra messages are also displayed describing each atask invocation. Lines starting with “>>>” indicate the command name and parameter values, and subsequent lines hold the screen output generated by the command.
    • ”DEBUG”: Extra messages are also displayed containing unspecified debugging information. In addition scatter plots showing how each Q and U image compares to the mean Q and U image are displayed at this ILEVEL.

    In adition, the glevel value can be changed by assigning a new integer value (one of starutil.NONE, starutil.CRITICAL, starutil.PROGRESS, starutil.ATASK or starutil.DEBUG) to the module variable starutil.glevel. [“PROGRESS”]

  • in_ – The input NDF.
  • instrument – Selects the tiling scheme to be used. The following instrument names are recognised (unambiguous abbreviations may be supplied): “SCUBA-2(450)”, “SCUBA-2(850)”, “ACSIS”, “DAS”. If the input NDF contains JCMT data, the default value for this parameter is determined from the FITS headers in the input NDF. Otherwise, there is no default and an explicit value must be supplied.
  • logfile – The name of the log file to create if GLEVEL is not NONE. The default is “<command>.log”, where <command> is the name of the executing script (minus any trailing “.py” suffix), and will be created in the current directory. Any file with the same name is over-written.
  • msg_filter – Controls the default level of information reported by Starlink atasks invoked within the executing script. This default can be over-ridden by including a value for the msg_filter parameter within the command string passed to the “invoke” function. The accepted values are the list defined in SUN/104 (“None”, “Quiet”, “Normal”, “Verbose”, etc). [“Normal”]
  • out – The basename for the output NDFs. Each output NDF will have a name formed by appending the integer tile index to the supplied basename, preceeded by and underscore. A null (!) value causes the name of the input NDF to be used.
  • retain – Should the temporary directory containing the intermediate files created by this script be retained? If not, it will be deleted before the script exits. If retained, a message will be displayed at the end specifying the path to the directory. [FALSE]
  • trim – A zero or negative value results in each output NDF covering the full area of the corresponding JSAtile. A value of one results in each output NDF being cropped to the bounds of the supplied NDF. A value of two or more results in each output NDF being cropped to remove any blank borders. [2]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_JSASPLIT for full documentation of this command in the latest Starlink release

starlink.smurf.jsatileinfo(itile, **kwargs)[source]¶

Return information about a specified sky tile.

Runs the command: $SMURF_DIR/jsatileinfo .

Parameters:

itile (int) – Zero-based tile index

Keyword Arguments:
 
  • instrument (str) – JCMT instrument [dyn.]
  • create (bool) – Create tile NDF if it does not already exist? [FALSE]
  • region (str) – File to receive an AST Region for the tile [!]
  • header (str) – File to receive a FITS header for the tile [!]
  • allsky (str,filename) – Output NDF containing all-sky tile indices [!]
  • local (bool) – Put the reference point at the centre of the tile? [FALSE]
  • proj (str) – JSA projection [“HPX”]
  • target (str) – The target Region or NDF [!]
Returns:

  • deccen (float)
  • exists (bool)
  • lbnd (List[int])
  • maxtile (int)
  • racen (float)
  • size (float)
  • tilendf (str)
  • tlbnd (List[int])
  • tubnd (List[int])
  • ubnd (List[int])

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_JSATILEINFO for full documentation of this command in the latest Starlink release

starlink.smurf.jsatilelist(in_, **kwargs)[source]¶

List the sky tiles that overlap a given set of data files or an

Runs the command: $SMURF_DIR/jsatilelist .

Parameters:

in_ (str,filename) – Input Region or NDF

Keyword Arguments:
 
  • instrument (str) – JCMT instrument [dyn.]
  • vertex_dec (List[float]) – ICRS Dec at vertices (deg.s)
  • vertex_ra (List[float]) – ICRS RA at vertices (deg.s)
Returns:

  • proj (str)
  • tiles (List[int])

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_JSATILELIST for full documentation of this command in the latest Starlink release

starlink.smurf.jsatilemoc(*args, **kwargs)[source]¶

Create an image MOC based on a JSA tile.

Runs the command: $SMURF_DIR/jsatilemoc.py .

Keyword Arguments:
 
  • in_ – An NDF (or FITS) file containing a JSA tile. It must have a TILENUM header indicating the JSA tile number accompanied by a comment including the HEALPix Nside value. The JSA tile must not have been trimmed. It could either be created with the trimming options disabled, or be untrimmed using the UNTRIM_JSA_TILES PICARD recipe.
  • maxorder – The maximum HEALPix order to be included in the MOC. [29]
  • out – The output MOC FITS file name.

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_JSATILEMOC for full documentation of this command in the latest Starlink release

starlink.smurf.makecube(in_, out, **kwargs)[source]¶

Regrid ACSIS spectra into a data cube.

Runs the command: $SMURF_DIR/makecube .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • pixsize (List[float]) – Output pixel size(s) for spatial part of map (arcsec) [dyn.]
  • system (str) – Celestial coord system for output cube [TRACKING]
  • alignsys (bool) – Align data in the output spatial co-ordinate system? [FALSE]
  • autogrid (bool) – Determine projection parameters automatically? [FALSE]
  • badmask (str) – Scheme for determining the output bad bolometer mask [“OR”]
  • catepoch (float) – Output catalogue epoch
  • catframe (str) – Output catalogue coordinate Frame [!]
  • crota (float) – Position angle of second pixel axis in output (degs) [dyn.]
  • detectors (str) – Names of detectors to be included [!]
  • extracols (str) – JCMTState items to include in output catalogue [!]
  • genvar (str) – Method for calculating output variances [“Tsys”]
  • inweight (bool) – Weight input spectra when combining them? [TRUE]
  • jsatiles (bool) – Create the cube as a set of JSA tiles? [FALSE]
  • lbnd (List[int]) – Lower pixel index bounds for output spatial axes [dyn.]
  • outcat (str) – Output positions list [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • params (List[float]) – Auxiliary rebinning parameters
  • polbinsize (float) – Angular size of analyser angle bins (degs) [!]
  • polbinzero (float) – Angle at centre of first polarisation bin (degs) [0]
  • poserrfatal (bool) – Report error if RECEPPOS and FPLANEX/Y disagree? [FALSE]
  • poserrmax (float) – Max error between RECEPPOS and FPLANEX/Y (arcsec) [3.0]
  • ref (str,filename) – Reference NDF [!]
  • reflat (str) – Celestial latitude at output reference point [dyn.]
  • reflon (str) – Celestial longitude at output reference point [dyn.]
  • refpix1 (float) – X pixel coord at output reference point [!]
  • refpix2 (float) – Y pixel coord at output reference point [!]
  • sparse (bool) – Create a sparse output array? [dyn.]
  • specbounds (str) – Low and high bounds for output spectral axis [dyn.]
  • specunion (bool) – Use union of input spectral ranges as default for SPECBOUNDS? [FALSE]
  • spread (str) – Pixel spreading method [“Nearest”]
  • tileborder (int) – Width of tile overlap in pixels [0]
  • tiledims (List[int]) – Output tile dimensions in pixels [!]
  • trim (bool) – Trim the output cube to excluded unused detectors? [TRUE]
  • trimtiles (bool) – Trim the output tiles? [FALSE]
  • ubnd (List[int]) – Upper pixel index bounds for output spatial axes [dyn.]
  • usedetpos (bool) – Read detector positions from the input NDF? [TRUE]
  • weights (bool) – Save pixel weights in the output NDF? [FALSE]
Returns:

  • fbl (List[float])
  • fbr (List[float])
  • flbnd (List[float])
  • ftl (List[float])
  • ftr (List[float])
  • fubnd (List[float])
  • jsatilelist (List[int])
  • lbound (List[int])
  • npolbin (int)
  • ntile (int)
  • pixref (List[float])
  • ubound (List[int])

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_MAKECUBE for full documentation of this command in the latest Starlink release

starlink.smurf.makemap(in_, out, **kwargs)[source]¶

Make a map from SCUBA-2 data

Runs the command: $SMURF_DIR/makemap .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • pixsize (List[float]) – Output pixel size(s) for the map (arcsec) [dyn.]
  • system (str) – Celestial coord system for output cube [TRACKING]
  • abortsoon (bool) – Abort as soon as convergence seems unlikely? [FALSE]
  • alignsys (bool) – Align data in the output spatial co-ordinate system? [FALSE]
  • bbm (str,filename) – Bad bolometer masks [!]
  • config (str) – Map-maker tuning parameters [current value]
  • crota (float) – Position angle of second pixel axis in output (degs) [dyn.]
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • ftsport (str) – FTS-2 port: tracking, image or null [!]
  • intoption (int) – What to do now (1-3) [3]
  • ipref (str) – Total intensity map for IP calculation [!]
  • itermaps (str) – The file to receive any itermaps that are requested [!]
  • jsatiles (bool) – Create the map as a set of JSA tiles? [FALSE]
  • lbnd (List[int]) – Lower pixel index bounds for output spatial axes [dyn.]
  • mask2 (str,filename) – Second mask NDF [!]
  • mask3 (str,filename) – Third mask NDF [!]
  • maxmem (int) – Maximum memory available for map-making in Mb [dyn.]
  • method (str) – Map-making method [ITERATE]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • params (List[float]) – Auxiliary rebinning parameters
  • pointing (str) – Text file containing pointing corrections [!]
  • ref (str,filename) – Reference NDF [!]
  • reflat (str) – Celestial latitude at output reference point [dyn.]
  • reflon (str) – Celestial longitude at output reference point [dyn.]
  • refpix1 (float) – X pixel coord at output reference point [!]
  • refpix2 (float) – Y pixel coord at output reference point [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]
  • spread (str) – Pixel spreading method [“Nearest”]
  • tileborder (int) – Width of tile overlap in pixels [0]
  • tiledims (List[int]) – Output tile dimensions in pixels [!]
  • trim (bool) – Trim bad border from output image? [FALSE]
  • trimtiles (bool) – Trim the output tiles? [FALSE]
  • ubnd (List[int]) – Upper pixel index bounds for output spatial axes [dyn.]
Returns:

  • abortedat (int)
  • chunkchange (List[float])
  • fbl (List[float])
  • fbr (List[float])
  • flbnd (List[float])
  • ftl (List[float])
  • ftr (List[float])
  • fubnd (List[float])
  • jsatilelist (List[int])
  • lbound (List[int])
  • nboloeff (float)
  • ncontchunk (int)
  • nmcnvg (int)
  • nminsmp (int)
  • ntile (int)
  • pixref (float)
  • rate_limited (bool) – Was MAPTOL_RATE limit hit?
  • tausrc (str)
  • ubound (List[int])

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_MAKEMAP for full documentation of this command in the latest Starlink release

starlink.smurf.nanten2acsis(in_, directory, **kwargs)[source]¶

Convert NANTEN2 FITS format data files to an ACSIS format NDF.

Runs the command: $SMURF_DIR/nanten2acsis .

Parameters:
  • in_ (str) – Input NANTEN2 FITS Files
  • directory (str) – Output Directory

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_NANTEN2ACSIS for full documentation of this command in the latest Starlink release

starlink.smurf.pol2check(in_, **kwargs)[source]¶

Check if specified NDFs probably hold POL-2 data.

Runs the command: $SMURF_DIR/pol2check .

Parameters:

in_ (str,filename) – Input NDFs

Keyword Arguments:
 
  • junkfile (str) – File in which to put non-POL2 NDF paths [!]
  • mapfile (str) – File in which to put POL-2 map NDF paths [!]
  • mapinfo (str) – File in which to put Stokes map NDF information [!]
  • missing (str) – File in which to put missing raw sub-scans [!]
  • multiobject (bool) – Allow data for multiple objects? [FALSE]
  • rawfile (str) – File in which to put raw POL2 time-series NDF paths [!]
  • rawinfo (str) – File in which to put raw data time-series NDF information [!]
  • stokesfile (str) – File in which to put Stokes POL2 time-series NDF paths [!]
  • stokesinfo (str) – File in which to put Stokes time-series NDF information [!]
Returns:

  • junkfound (bool)
  • mapfound (bool)
  • rawfound (bool)
  • stokesfound (bool)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_POL2CHECK for full documentation of this command in the latest Starlink release

starlink.smurf.pol2ip(*args, **kwargs)[source]¶

Create an Instrumental Polarisation (IP) model from a set of POL2

Runs the command: $SMURF_DIR/pol2ip.py .

Keyword Arguments:
 
  • diam – The diameter of the circle (in arc-seconds), centred on the source, over which the mean Q, U and I values are found. If zero, or a negative value, is supplied, the fit is based on the weighted mean values within the source, where the spatial weiging function is a fitted beam shape determined using kappa:beamfit. In this case, a text file called “beamfit.asc” is created in the current directory. This is a table containg columns of the geometric properties of the polarised intensity beam in each observation. The header for this file contains the parameters of quadratic fits to these properties, which are used within pol2scan. [40]
  • ilevel –

    Controls the level of information displayed on the screen by the script. It can take any of the following values (note, these values are purposefully different to the SUN/104 values to avoid confusion in their effects):

    • ”NONE”: No screen output is created
    • ”CRITICAL”: Only critical messages are displayed such as warnings.
    • ”PROGRESS”: Extra messages indicating script progress are also displayed.
    • ”ATASK”: Extra messages are also displayed describing each atask invocation. Lines starting with “>>>” indicate the command name and parameter values, and subsequent lines hold the screen output generated by the command.
    • ”DEBUG”: Extra messages are also displayed containing unspecified debugging information. In addition scatter plots showing how each Q and U image compares to the mean Q and U image are displayed at this ILEVEL.

    In adition, the glevel value can be changed by assigning a new integer value (one of starutil.NONE, starutil.CRITICAL, starutil.PROGRESS, starutil.ATASK or starutil.DEBUG) to the module variable starutil.glevel. [“PROGRESS”]

  • iref – A 2D NDF holding a map of total intensity (in pW) for the object covered by the observations in OBSLIST. It is assumed that the object is centred at the reference point in the map. The supplied map is resampled to to give it the pixel size specified by parameter PIXSIZE. If a null value(!) is supplied, the total intensity is determined from the POL2 data itself.
  • logfile – The name of the log file to create if GLEVEL is not NONE. The default is “<command>.log”, where <command> is the name of the executing script (minus any trailing “.py” suffix), and will be created in the current directory. Any file with the same name is over-written. The script can change the logfile if necessary by assign the new log file path to the module variable “starutil.logfile”. Any old log file will be closed befopre the new one is opened.
  • mapdir – Path to a directory containing any pre-existing Q/U/I maps. Each UT date should have a separate subdirectory within “mapdir”, and each observation should have a separate subdirectory within its <UT> date subdirectory. Any new Q/U/I maps created by this script are placed in this directory. If null (!) is supplied, the root directory containing the Q/U maps is placed within the temporary directory used to store all other intermediate files. [!]
  • msg_filter – Controls the default level of information reported by Starlink atasks invoked within the executing script. This default can be over-ridden by including a value for the msg_filter parameter within the command string passed to the “invoke” function. The accepted values are the list defined in SUN/104 (“None”, “Quiet”, “Normal”, “Verbose”, etc). [“Normal”]
  • obslist – The path to a text file listing the POL2 observations to use. Each line should contain a string of the form “<ut>/<obs>”, where <ut> is the 8 digit UT date (e.g. “20151009”) and <obs> is the 5 digit observation number (e.g. “00034”). Blank lines and lines starting with “#” are ignored. The raw data for all observations is expected to reside in a directory given by environment variable “SC2”, within subdirectories with paths of the form: $SC2/[s4a|s8a]/20150918/00056/ etc. The choice of “s8” or “s4” is made on the basis of parameter WAVEBAND.
  • pixsize – Pixel dimensions in the Q and U maps, in arcsec. The default is 4 arc-sec for 850 um data and 2 arc-sec for 450 um data.
  • qudir – Path to a directory containing any pre-existing Q/U/I time streams. Each UT date should have a separate subdirectory within “qudir”, and each observation should have a separate subdirectory within its <UT> date subdirectory. Any new Q/U/I time streams created by this script are placed in this directory. If null (!) is supplied, the root directory containing the Q/U time streams is placed within the temporary directory used to store all other intermediate files. [!]
  • restart – If a value is assigned to this parameter, it should be the path to a directory containing the intermediate files created by a previous run of POL2IP (it is necessry to run POL2IP with RETAIN=YES otherwise the directory is deleted after POL2IP terminates). If supplied, any files which can be re-used from the supplied directory are re-used, thus speeding things up. The path to the intermediate files can be found by examining the log file created by the previous run. [!]
  • retain – Should the temporary directory containing the intermediate files created by this script be retained? If not, it will be deleted before the script exits. If retained, a message will be displayed at the end specifying the path to the directory. [FALSE]
  • table – The path to a new text file to create in which to place a table holding columns of elevation, Q, U, Qfit and Ufit (and various other useful things), in TOPCAT ASCII format. [!]
  • tablein – The path to an existing text file containing a table created by a previous run of this script, using the TABLE parameter. If supplied, none of the other parameters are accessed, and a fit is performed to the values in the supplied table. [!]
  • waveband – Indicates the waveband - “450” or “850”.

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_POL2IP for full documentation of this command in the latest Starlink release

starlink.smurf.pol2map(*args, **kwargs)[source]¶

Create Q, U and I maps from a group of POL-2 “spin&scan” data files.

Runs the command: $SMURF_DIR/pol2map.py .

Keyword Arguments:
 
  • binsize – The bin size in the output vector catalogue, in arcsec. The value supplied for parameter PIXSIZE is used as the default for BINSIZE. An error is reported if BINSIZE is smaller than PIXSIZE.
  • cat – The output FITS vector catalogue. No catalogue is created if null (!) is supplied. The Q, U and PI values in this catalogue will be in units of pW or mJy/beam, as selected using parameter JY . The bin size is specified by parameter BINSIZE. [!]
  • config –

    Extra parameter values to include in the MAKEMAP configuration used to create both the I maps and the Q/U maps.

    In general, it is important that the I, Q and U maps are all created using the same configuration so that they can be compared directly. However, if it is necessary to use a different configuration for I and Q/U maps, the differences may be specified using the ADAM parameters “ICONFIG” and “QUCONFIG”. The ADAM parameter “CONFIG” specifies the configuration parameters that are always used, whether an I map or a Q/U map is being created. In all cases the configuration parameters specified by “CONFIG” are applied first, followed by the configuration parameters specified by “ICONFIG” (if creating an I map) or “QUCONFIG” (if creating a Q or U map). Thus values supplied in “ICONFIG” or “QUCONFIG” over-ride values for the same parameters specified in “CONFIG”.

    The configurations specified by CONFIG, ICONFIG and QUCONFIG are applied on top of the following set of default parameters:

    —
    ^$STARLINK_DIR/share/smurf/.dimmconfig_pol2.lis numiter = -200 modelorder=(com,gai,pca,ext,flt,ast,noi)
    maptol = 0.05 maptol_mask = <undef> maptol_mean = 0 maptol_box = 60 maptol_hits = 1

    ast.mapspike_freeze = 5 pca.pcathresh = -150 pca.zero_niter = 0.5 com.zero_niter = 0.5 flt.zero_niter = 0.5 com.freeze_flags = 30

    —
    Additional parameters are also set, depending on the value of parameter MASK. If MASK is set to “AUTO”, the following parameters are added to the above default config:
    —
    ast.skip = 10 ast.zero_snr = 3 ast.zero_snrlo = 2 ast.zero_freeze = 0.2
    pca.pcathresh = -50 pca.zero_snr = 5 pca.zero_snrlo = 3 pca.zero_freeze = -1

    com.zero_snr = 5 com.zero_snrlo = 3 com.zero_freeze = -1

    flt.zero_snr = 5 flt.zero_snrlo = 3 flt.zero_freeze = -1

    —
    If MASK is set to “CIRCLE”, the following parameters are added to the above default config:
    —
    ast.zero_circle = 0.0083 (degrees, i.e. 30 arc-seconds) pca.zero_circle = 0.0038 com.zero_circle = 0.0083 flt.zero_circle = 0.0083
    —
    The default value for pca.pcathresh indicated above will be changed if it is too high to allow convergence of the I maps within the number of iterations allowed by numiter (this change only occurs if parameter SKYLOOP is FALSE).

    If MASK is set to the name of an NDF, this script creates fixed masks from the NDF, and the following parameters are added to the above default config:

    —
    ast.zero_mask = ref pca.zero_mask = mask2 com.zero_mask = mask2 flt.zero_mask = mask2
    —
    The above “ref” mask consists of clumps of pixel with SNR greater than 3, extended down to an SNR level of 2. The “mask2” mask consists of clumps of pixel with SNR greater than 5, extended down to an SNR level of 3. However, the above SNR levels are raised if necessary to ensure that the source occupies no more than 20% of the pixels within the “ref” mask, and 10% of the pixels within the “mask2” mask.

    The same configuration is used for all three Stokes parameters - I, Q and U with the exception that “com.noflag=1” is added to the configuration when creating maps for Q and U.

    If a configuration is supplied using parameter CONFIG, values supplied for any of the above parameters will over-write the values specified above. In addition, the following mandatory values are always appended to the end of the used configuration:

    —
    flagslow = 0.01 downsampscale = 0 noi.usevar=1
    —
    If null (!) or “def” is supplied, the above set of default configuration parameters are used without change. [“def”]
  • debias – TRUE if a correction for statistical bias is to be made to percentage polarization and polarized intensity in the output vector catalogue specified by parameter CAT. [FALSE]
  • fcf – The FCF value that is used to convert I, Q and U values from pW to Jy/Beam. If a null (!) value is supplied a default value is used that depends on the waveband in use - 725.0 for 850 um and 962.0 for 450 um. [!]
  • glevel – Controls the level of information to write to a text log file. Allowed values are as for “ILEVEL”. The log file to create is specified via parameter “LOGFILE. In adition, the glevel value can be changed by assigning a new integer value (one of starutil.NONE, starutil.CRITICAL, starutil.PROGRESS, starutil.ATASK or starutil.DEBUG) to the module variable starutil.glevel. [“ATASK”]
  • iconfig – Extra parameter values to include in the MAKEMAP configuration used to create I maps. The values specified by “ICONFIG” are applied after those specified by “CONFIG”. [!]
  • ilevel –

    Controls the level of information displayed on the screen by the script. It can take any of the following values (note, these values are purposefully different to the SUN/104 values to avoid confusion in their effects):

    • ”NONE”: No screen output is created
    • ”CRITICAL”: Only critical messages are displayed such as warnings.
    • ”PROGRESS”: Extra messages indicating script progress are also displayed.
    • ”ATASK”: Extra messages are also displayed describing each atask invocation. Lines starting with “>>>” indicate the command name and parameter values, and subsequent lines hold the screen output generated by the command.
    • ”DEBUG”: Extra messages are also displayed containing unspecified debugging information.

    In adition, the glevel value can be changed by assigning a new integer value (one of starutil.NONE, starutil.CRITICAL, starutil.PROGRESS, starutil.ATASK or starutil.DEBUG) to the module variable starutil.glevel. [“PROGRESS”]

  • in_ –

    A group of input files. Each specified file must be one of the following types:

    • a raw POL-2 data file. Any supplied raw POL-2 data files will be converted into time-series Q,U and I files using SMURF:CALCQU and placed in the directory specified by parameter QUDIR. These will then be converted into maps using SMURF:MAKEMAP, and placed in the directory specified by parameter MAPDIR.
    • a time-series file holding Stokes Q, U or I values. Any supplied time-series files will be converted into individual maps (one for each file) using SMURF:MAKEMAP, and placed in the directory specified by parameter MAPDIR. These maps are created only for the required Stokes parameters - as indicated by parameters IOUT, QOUT and UOUT.
    • a two-dimensional map holding Stokes Q, U or I values. Any maps must be in units of pW. The final output I map is created by coadding any supplied I maps with the I maps created by this script. These coadded maps are created only for the required Stokes parameters - as indiciated by parameters IOUT, QOUT and UOUT.

    Any combination of the above types can be supplied. Note, if parameter REUSE is TRUE, then any required output files that already exist in the directory specified by parameter MAPDIR are re-used rather than being re-created from the corresponding input data.

  • iout – The output NDF in which to return the total intensity (I) map including all supplied observations. This will be in units of pW. Supply null (!) if the I map is not to be retained on exit. In this case, the I map will only be created if it is needed to create the output vector catalogue (see parameter CAT) and will be deleted on exit.
  • ipcor – If TRUE, then IP correction is used when creating Q and U maps, based on the values in the total intensity map specified by parameter IPREF. If FALSE, then no IP correction is performed. The default is TRUE if any Q or U output maps are being created, and FALSE otherwise.
  • ipref – The total intensity map to be used for IP correction. Only accessed if parameter IPCOR is set TRUE. If null (!) is supplied for IPREF, the map supplied for parameter REF is used. The map must be in units of pW. If the same value is supplied for both IOUT and IPREF, the output I map will be used for IP correction. [!]
  • jy – If TRUE, the I, Q and U values in the output catalogue will be in units of mJy/beam. Otherwise they will be in units of pW. Note, the Q, U and I maps are always in units of pW. The same FCF value is used to convert all three Stokes parameters from pW to mJy/beam, derived from the value supplied for parameter FCF. [TRUE]
  • logfile – The name of the log file to create if GLEVEL is not NONE. The default is “<command>.log”, where <command> is the name of the executing script (minus any trailing “.py” suffix), and will be created in the current directory. Any file with the same name is over-written. The script can change the logfile if necessary by assign the new log file path to the module variable “starutil.logfile”. Any old log file will be closed befopre the new one is opened.
  • mapdir – The name of a directory in which to put the Q, U an I maps made from each individual observation supplied via “IN”, before coadding them. If null is supplied, the new maps are placed in the same temporary directory as all the other intermediate files and so will be deleted when the script exists (unless parameter RETAIN is set TRUE). Note, these maps are always in units of pW. Each one will contain FITS headers specifying the pointing corrections needed to align the map with the reference map. [!]
  • mapvar –

    Determines how the variance information in the final I, Q and U coadded maps (parameters IOUT, QOUT and UOUT) are derived.

    If MAPVAR is FALSE, the variances in the coadded maps are calculated by propagating the variance information from the individual observation maps. These variances are determined by makemap and are based on the spread of bolometer I, Q or U values that fall in each pixel of the individual observation map.

    If MAPVAR is TRUE, the variances in the coadded maps are determined from the spread of input values (i.e. the pixel values from the individual observation maps) that fall in each pixel of the coadd.

    The two methods produce similar variance estimates in the background regions, but MAPDIR=TRUE usually creates much higher on-source errors than MAPDIR=FALSE. Only use MAPDIR=TRUE if you have enough input observations to make the variance between the individual observation maps statistically meaningful. [FALSE]

  • mask –

    Specifies the type of masking to be used within makemap (the same type of masking is used to create all three maps - I, Q and U):

    • ”AUTO”: makemap uses automatically generated masks based on the SNR map at the end of each iteration. The SNR levels used are specified by the “xxx.ZERO_SNR” and “xxx.ZERO_SNRLO” configuration parameters (see parameter CONFIG).
    • ”CIRCLE”: makemap uses a fixed circular mask of radius 60 arc-seconds centred on the expected source position.
    • Any other value is assumed to be a group of one or two NDFs that specify the “external” AST and PCA masks to be used. The way in which these NDFs are used depends on the value of parameter MASKTYPE. These NDFs must be aligned in pixel coordinates with the reference map (parameter REF). [“AUTO”]
  • maskout1 – If a non-null value is supplied for MASKOUT, it specifies the NDF in which to store the AST mask created from the NDF specified by parameter MASK. Only used if an NDF is supplied for parameter MASK. [!]
  • maskout2 – If a non-null value is supplied for MASKOUT, it specifies the NDF in which to store the PCA mask created from the NDF specified by parameter MASK. Only used if an NDF is supplied for parameter MASK. [!]
  • masktype –

    Specifies the way in which NDFs supplied for parameter MASK are to be used. This parameter can be set to either of the following values:

    • ”Signal”: A single NDF should be supplied for parameter MASK holding the astronomical signal level at each pixel within the astronomical field being mapped. It can be in any units, but must have a Variance component. The AST and PCA masks are created from this map by finding all clumps of contiguous pixels above a fixed SNR limit, and then extending these clumps down to a lower SNR limit. For the AST model, the upper and lower SNR limits are of 3.0 and 2.0. For the PCA mask, the limits are 5.0 and 3.0. The AST and PCA masks created in this way can be saved using parameters MASKOUT1 and MASKOUT2.
    • ”Mask”: A pair of NDFs should be supplied for parameter MASK, each holding a mask in which background pixels have bad values and source pixels have good values. The first supplied NDF is used directly as the AST mask, and the second is used as the PCA mask. [“Signal”]
  • msg_filter – Controls the default level of information reported by Starlink atasks invoked within the executing script. This default can be over-ridden by including a value for the msg_filter parameter within the command string passed to the “invoke” function. The accepted values are the list defined in SUN/104 (“None”, “Quiet”, “Normal”, “Verbose”, etc). [“Normal”]
  • multiobject – Indicates if it is acceptable for the list of input files to include data for multiple objects. If FALSE, an error is reported if data for more than one object is specified by parameter IN. Otherwise, no error is reported if multiple objects are found. [FALSE]
  • newmaps – The name of a text file to create, in which to put the paths of all the new maps written to the directory specified by parameter MAPDIR (one per line). If a null (!) value is supplied no file is created. [!]
  • normalise – If TRUE, scale corrections for individual observations found in any pre-existing auto-masked maps (e.g. made on a previous run of this script) are applied when creating new maps. If False, no scale corrections are applied. Scale correction factors are created and stored at the same time as the pointing corrections. The correction factor for a single observation is found by comparing the data values in the map made from the single observation with those in the mean of the maps made from all observation. The factor found in this way is stored in the FITS extension of the map made from the observation (header “CHUNKFAC”). [FALSE]
  • north – Specifies the celestial coordinate system to use as the reference direction in any newly created Q and U time series files. For instance if NORTH=”AZEL”, then they use the elevation axis as the reference direction, and if “ICRS” is supplied, they use the ICRS Declination axis. If “TRACKING” is supplied, they use north in the tracking system - what ever that may be. [“TRACKING”]
  • obsweight – This parameter affects how maps from separate observations are weighted when they are combined together to form a coadd. If it is FALSE, each pixel in each map is weighted simply using the reciprocal of the Variance value stored in the map. If it is TRUE, an extra factor is included in the pixel weights that is constant for all pixels in a map but varies from observation to observation. In other words, each observation is assigned a weight, which is used to factor the pixel weights derived from the Variance values. The purpose of this per-observation weight is to down-weight observations that are very different to the other observations and which would therefore contribute to a high Variance if parameter MAPVAR is set TRUE. These weights are proportional to 1/(RMS*RMS), where “RMS” is the RMS residual between an individual observation map and the coadd of all observation maps, after they have been aligned spatially to take account of any pointing error in the individual observation. [FALSE]
  • pixsize – Pixel dimensions in the output I, Q and U maps, in arcsec. The default is 4 arc-sec for both 450 and 850 um data. The bin size for the output catalogue can be specified separately - see parameter BINSIZE and CAT. [4]
  • qout – The output NDF in which to return the Q map including all supplied observations. This will be in units of pW. Supply null (!) if no Q map is required.
  • quconfig – Extra parameter values to include in the MAKEMAP configuration used to create Q and U maps. The values specified by “QUCONFIG” are applied after those specified by “CONFIG”. [!]
  • qudir – The name of a directory in which to put the Q, U and I time series generated by SMURF:CALCQU, prior to generating maps from them. If null (!) is supplied, they are placed in the same temporary directory as all the other intermediate files and so will be deleted when the script exists (unless parameter RETAIN is set TRUE). [!]
  • ref – An optional map defining the pixel grid for the output maps, and which is used to determine pointing corrections. If null (!) is supplied, then the map (if any) specified by parameter MASK is used. See also parameter REFFCF. [!]
  • reffcf – The FCF that should be used to convert the supplied REF map to pW. This parameter is only used if the supplied REF map is not already in units of pW. The default is the FCF value stored in the FITS extension of the map, or the standard FCF for the band concerned (450 or 840) if there is no FCF value in the FITS header. Specify a new value on the pol2map command line if the default value described above is inappropriate.
  • retain – Should the temporary directory containing the intermediate files created by this script be retained? If not, it will be deleted before the script exits. If retained, a message will be displayed at the end specifying the path to the directory. [FALSE]
  • reuse – If TRUE, then any output maps or time-treams that already exist (for instance, created by a previous run of this script) are re-used rather than being re-created from the corresponding input files. If FALSE, any previously created output maps or time-streams are ignored and new ones are created from the corresponding input files. [TRUE]
  • skyloop – Should the skyloop script be used in place of makemap to create the maps from the I, Q and U time-series data? Note, when using skyloop it is not possible to add in new observations to an existing collection of I, Q and U maps - all observations must be processed together. Therefore the value supplied for parameter REUSE will be ignored and a value of FALSE assumed if the MAPDIR directory is missing maps for any of the supplied observations. [FALSE]
  • uout – The output NDF in which to return the U map including all supplied observations. This will be in units of pW. Supply null (!) if no U map is required.

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_POL2MAP for full documentation of this command in the latest Starlink release

starlink.smurf.pol2scan(*args, **kwargs)[source]¶

Create Q and U maps from a set of POL-2 “spin&scan” data

Runs the command: $SMURF_DIR/pol2scan.py .

Keyword Arguments:
 
  • align – If TRUE, and if a non-null value is supplied for parameter REF, then corrections to the telescope pointing are determined and applied when creating the Q and U maps for each observation. To determine this pointing correction for an observation, a total intensity map is created from the raw POL2 data for the observation using the supplied reference map (see parameter REF) to specify the pixel grid. Due to pointing errors, this total intensity map may not be aligned accurately with the reference map (errors of up to 8 arc-seconds have been seen). The positional shift required to minimise the residuals between the shifted total intensity map and the reference map is found, and used to correct the pointing when creating the Q and U map. Note, this option slows down the operation of pol2scan as it requires an extra invocation of smurf:makemap for each observation, to create the total intensity maps (which is not required if ALIGN is FALSE). [TRUE]
  • cat – The output FITS vector catalogue. No catalogue is created if null (!) is supplied. [!]
  • config –

    The MAKEMAP configuration parameter values to use. If a null value (!) or “def” is supplied, the following defaults will be used:

    —
    ast.zero_snr=3 ast.zero_snrlo=2 maptol=0.05 modelorder=(pca,ext,ast,noi) noisecliphigh=3 numiter=-20 pca.pcathresh=4 spikebox=10 spikethresh=5
    —
    If a configuration is supplied, it is used in place of the above default configurations. In either case, the following values are always appended to the end of the used config (whether external or defaulted):
    —
    flagslow = 0.01 downsampscale = 0 noi.usevar=1

    —

  • debias – TRUE if a correction for statistical bias is to be made to percentage polarization and polarized intensity in the output vector catalogue specified by parameter CAT and the polarised intensity map specified by parameter PI. [FALSE]
  • glevel – Controls the level of information to write to a text log file. Allowed values are as for “ILEVEL”. The log file to create is specified via parameter “LOGFILE. In adition, the glevel value can be changed by assigning a new integer value (one of starutil.NONE, starutil.CRITICAL, starutil.PROGRESS, starutil.ATASK or starutil.DEBUG) to the module variable starutil.glevel. [“ATASK”]
  • ilevel –

    Controls the level of information displayed on the screen by the script. It can take any of the following values (note, these values are purposefully different to the SUN/104 values to avoid confusion in their effects):

    • ”NONE”: No screen output is created
    • ”CRITICAL”: Only critical messages are displayed such as warnings.
    • ”PROGRESS”: Extra messages indicating script progress are also displayed.
    • ”ATASK”: Extra messages are also displayed describing each atask invocation. Lines starting with “>>>” indicate the command name and parameter values, and subsequent lines hold the screen output generated by the command.
    • ”DEBUG”: Extra messages are also displayed containing unspecified debugging information.

    In adition, the glevel value can be changed by assigning a new integer value (one of starutil.NONE, starutil.CRITICAL, starutil.PROGRESS, starutil.ATASK or starutil.DEBUG) to the module variable starutil.glevel. [“PROGRESS”]

  • in_ –

    A group of input files. Each specified file must be one of the following types:

    • a raw POL-2 data file
    • a time-series file holding Stokes Q, U or I values
    • a two-dimensional map holding Stokes Q or U values (Q and U maps must be in units of pW). Any combination of the above types can be supplied.
  • ipbeamfix – Should the supplied total intensity reference image (parameter IPREF) be modified so that its beam shape matches the expected IP beam shape at the elevation of each supplied POL2 observation, before doing IP correction? This is currently an experimental feature. [FALSE]
  • ipfcf – The FCF that should be used to convert the supplied IP REF map to pW. This parameter is only used if the supplied IPREF map is not already in units of pW, and if the FCF is not stored in the FITS extension of the map. The suggested default is the standard FCF for the band concerned (450 or 840). Just press return at the prompt to use this default, or enter a new value if the suggested value is not the FCF that was actually used to create the map.
  • ipref – A 2D NDF holding a map of total intensity within the sky area covered by the input POL2 data, in units of pW, mJy/beam, Jy/beam, mJy/arcsec**2, Jy/arcsec**2 (“^” may be used in place of “**”). If supplied, the returned Q and U maps will be corrected for instrumental polarisation, based on the total intensity values in IPREF. The supplied IPREF map need not be pre-aligned with the output Q and U maps - it will be resampled as necessary using a transformation derived from its WCS information. The total intensity values in this map are also used to calculate the percentage polarisation values stored in the output vector catalogue specified by parameter CAT. [!]
  • jy – If TRUE, the output catalogue, and the output maps specified by parameters “Q”, “U” and “PI”, will be in units of Jy/beam. Otherwise they will be in units of pW (in this case, the I values in the output catalogue will be scaled to take account of the different FCFs for POL-2 and non-POL-2 observations). Note, the Q and U maps made from individual observations (see parameter MAPDIR) are always in units of pW. [True]
  • logfile – The name of the log file to create if GLEVEL is not NONE. The default is “<command>.log”, where <command> is the name of the executing script (minus any trailing “.py” suffix), and will be created in the current directory. Any file with the same name is over-written. The script can change the logfile if necessary by assign the new log file path to the module variable “starutil.logfile”. Any old log file will be closed befopre the new one is opened.
  • mapdir – The name of a directory in which to put the Q and U maps made from each individual observation supplied via “IN”, before coadding them (the QMAP and UMAP parameters specify the final coadded Q and U maps). If null is supplied, they are placed in the same temporary directory as all the other intermediate files and so will be deleted when the scrip exists (unless parameter RETAIN is set TRUE). Note, these maps are always in units of pW. [!]
  • msg_filter – Controls the default level of information reported by Starlink atasks invoked within the executing script. This default can be over-ridden by including a value for the msg_filter parameter within the command string passed to the “invoke” function. The accepted values are the list defined in SUN/104 (“None”, “Quiet”, “Normal”, “Verbose”, etc). [“Normal”]
  • north – Specifies the celestial coordinate system to use as the reference direction in any newly created Q and U time series files. For instance if NORTH=”AZEL”, then they use the elevation axis as the reference direction, and if “ICRS” is supplied, they use the ICRS Declination axis. If “TRACKING” is supplied, they use north in the tracking system - what ever that may be. [“TRACKING”]
  • obstable –

    The path of a new text file to create, to which will be written statistics describined the Q and U maps for each individual observation present in the list of files specified by parameter IN. No file is created if null (!) is supplied. The values are written in the form of a TOPCAT “ascii” table, with one row for each observation. The columns are:

    • UT: UT date of observation
    • OBS: Observation number
    • SUBSCAN: The first subscan included in the map
    • WVM: The mean of the starting and ending WVM tau values
    • NEFD_Q: The measured NEFD in the Q map (mJy.sec^(0.5))
    • NEFD_U: The measured NEFD in the U map (mJy.sec^(0.5))
    • NEFD_EXP: The expected NEFD based on WVM and elevation (mJy.sec^(0.5))
    • TIME: The elapsed time of the data included in the maps (s)
    • SIZE_Q: The total area of the source regions in the Q map (square arc-mins)
    • SIZE_U: The total area of the source regions in the U map (square arc-mins)
    • RMS_Q: The RMS Q value within the source regions (pW)
    • RMS_U: The RMS U value within the source regions (pW)
    • NBOLO_Q: Number of bolometers contributing to Q map
    • NBOLO_U: Number of bolometers contributing to U map
    • DX: Pointing correction in azimuth (arc-sec)
    • DY: Pointing correction in elevation (arc-sec) The last two columns (DX and DY) are only created if parameter ALIGN is TRUE. [!]
  • pi – An output NDF in which to return the polarised intensity map. No polarised intensity map will be created if null (!) is supplied. [!]
  • pixsize – Pixel dimensions in the output Q and U maps, in arcsec. The default is 4 arc-sec for 850 um data and 2 arc-sec for 450 um data.
  • q – The output NDF in which to return the total Q intensity map including all supplied observations.
  • qudir – The name of a directory in which to put the Q, U and I time series generated by SMURF:CALCQU. If null (!) is supplied, they are placed in the same temporary direcory as all the other intermediate files. [!]
  • ref – An optional map defining the pixel grid for the output maps. If no value is specified for REF on the command line, it defaults to the value supplied for parameter IPREF. See also parameter ALIGN.
  • retain – Should the temporary directory containing the intermediate files created by this script be retained? If not, it will be deleted before the script exits. If retained, a message will be displayed at the end specifying the path to the directory. [FALSE]
  • u – The output NDF in which to return the total U intensity map including all supplied observations.

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_POL2SCAN for full documentation of this command in the latest Starlink release

starlink.smurf.pol2stack(*args, **kwargs)[source]¶

Combine multiple Q, U and I images and create a vector catalogue

Runs the command: $SMURF_DIR/pol2stack.py .

Keyword Arguments:
 
  • cat – The output FITS vector catalogue.
  • debias – TRUE if a correction for statistical bias is to be made to percentage polarization and polarized intensity. [FALSE]
  • glevel – Controls the level of information to write to a text log file. Allowed values are as for “ILEVEL”. The log file to create is specified via parameter “LOGFILE. In adition, the glevel value can be changed by assigning a new integer value (one of starutil.NONE, starutil.CRITICAL, starutil.PROGRESS, starutil.ATASK or starutil.DEBUG) to the module variable starutil.glevel. [“ATASK”]
  • ilevel –

    Controls the level of information displayed on the screen by the script. It can take any of the following values (note, these values are purposefully different to the SUN/104 values to avoid confusion in their effects):

    • ”NONE”: No screen output is created
    • ”CRITICAL”: Only critical messages are displayed such as warnings.
    • ”PROGRESS”: Extra messages indicating script progress are also displayed.
    • ”ATASK”: Extra messages are also displayed describing each atask invocation. Lines starting with “>>>” indicate the command name and parameter values, and subsequent lines hold the screen output generated by the command.
    • ”DEBUG”: Extra messages are also displayed containing unspecified debugging information. In addition scatter plots showing how each Q and U image compares to the mean Q and U image are displayed at this ILEVEL.

    In adition, the glevel value can be changed by assigning a new integer value (one of starutil.NONE, starutil.CRITICAL, starutil.PROGRESS, starutil.ATASK or starutil.DEBUG) to the module variable starutil.glevel. [“PROGRESS”]

  • in_ – A group of container files, each containing three 2D NDFs in components Q, U and I, as created using the QUI parameter of the pol2cat script. Parameters INQ, INU and INI are used if a null (!) value is supplied for IN. [!]
  • ini – A group of input I maps in units of pW. Only used if a null value is supplied for parameter IN.
  • inq – A group of input Q maps in unts of pW. Only used if a null value is supplied for parameter IN.
  • inu – A group of input U maps in units of pW. Only used if a null value is supplied for parameter IN.
  • jy – If TRUE, the output catalogue, and the output Q, U, PI and I maps will be in units of Jy/beam. Otherwise they will be in units of pW (in this case, the I values will be scaled to take account of any difference in FCFs for POL-2 and non-POL-2 observations). [True]
  • logfile – The name of the log file to create if GLEVEL is not NONE. The default is “<command>.log”, where <command> is the name of the executing script (minus any trailing “.py” suffix), and will be created in the current directory. Any file with the same name is over-written. The script can change the logfile if necessary by assign the new log file path to the module variable “starutil.logfile”. Any old log file will be closed befopre the new one is opened.
  • msg_filter – Controls the default level of information reported by Starlink atasks invoked within the executing script. This default can be over-ridden by including a value for the msg_filter parameter within the command string passed to the “invoke” function. The accepted values are the list defined in SUN/104 (“None”, “Quiet”, “Normal”, “Verbose”, etc). [“Normal”]
  • pi – The output NDF in which to return the polarised intensity map. No polarised intensity map will be created if null (!) is supplied. If a value is supplied for parameter IREF, then PI defaults to null. Otherwise, the user is prompted for a value if none was supplied on the command line.
  • qui – If a value is supplied for QUI, the total Q, U and I images that go into the final polarisation vector catalogue will be saved to disk as a set of three 2D NDFs. The three NDFs are stored in a single container file, with path given by QUI. So for instance if QUI is set to “stokes.sdf”, the Q, U and I images can be accessed as “stokes.q”, “stokes.u” and “stokes.i”. [!]
  • retain – Should the temporary directory containing the intermediate files created by this script be retained? If not, it will be deleted before the script exits. If retained, a message will be displayed at the end specifying the path to the directory. [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_POL2STACK for full documentation of this command in the latest Starlink release

starlink.smurf.qucovar(qres, ures, qlut, ulut, ref, out, **kwargs)[source]¶

Find co-variance of Q and U from a POL2 observation.

Runs the command: $SMURF_DIR/qucovar .

Parameters:
  • qres (str,filename) – Input Q residuals time-stream NDF
  • ures (str,filename) – Input U residuals time-stream NDF
  • qlut (str,filename) – Input Q LUT time-stream NDF
  • ulut (str,filename) – Input U LUT time-stream NDF
  • ref (str,filename) – Input reference map
  • out (str,filename) – Output Q/U co-variance map

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_QUCOVAR for full documentation of this command in the latest Starlink release

starlink.smurf.rawfixmeta(in_, out, **kwargs)[source]¶

Fix metadata associated with a raw data file.

Runs the command: $SMURF_DIR/rawfixmeta .

Parameters:
  • in_ (str,filename) – Input timeseries
  • out (str,filename) – Uncompressed timeseries
Returns:

steptime (float)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_RAWFIXMETA for full documentation of this command in the latest Starlink release

starlink.smurf.rawpress(in_, out, **kwargs)[source]¶

Compress raw data

Runs the command: $SMURF_DIR/rawpress .

Parameters:
  • in_ (str,filename) – Input timeseries
  • out (str,filename) – Compressed timeseries
Keyword Arguments:
 

method (str) – Compression method [DELTA]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_RAWPRESS for full documentation of this command in the latest Starlink release

starlink.smurf.rawrecreatewcs(ndf, **kwargs)[source]¶

Fix broken raw ACSIS files by enabling the spectral WCS to be reconstructed

Runs the command: $SMURF_DIR/rawrecreatewcs .

Parameters:ndf (str,filename) – Input ACSIS timeseries

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_RAWRECREATEWCS for full documentation of this command in the latest Starlink release

starlink.smurf.rawrewrtsc2wcs(ndf, **kwargs)[source]¶

Fix broken WCS in raw SCUBA-2 file by re-writing it

Runs the command: $SMURF_DIR/rawrewrtsc2wcs .

Parameters:ndf (str,filename) – Input SCUBA-2 timeseries to be fixed

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_RAWREWRTSC2WCS for full documentation of this command in the latest Starlink release

starlink.smurf.rawunpress(in_, out, **kwargs)[source]¶

Uncompress raw data

Runs the command: $SMURF_DIR/rawunpress .

Parameters:
  • in_ (str,filename) – Input timeseries
  • out (str,filename) – Uncompressed timeseries

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_RAWUNPRESS for full documentation of this command in the latest Starlink release

starlink.smurf.remsky(in_, out, method, **kwargs)[source]¶

Remove sky background from SCUBA-2 data

Runs the command: $SMURF_DIR/remsky .

Parameters:
  • in_ (str,filename) – Input timeseries
  • out (str,filename) – Sky-subtracted timeseries
  • method (str) – Sky removal method
Keyword Arguments:
 
  • group (bool) – Group related files? [FALSE]
  • bbm (str,filename) – Bad bolometer masks [!]
  • fit (str) – Remove mean, slope or plane?
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_REMSKY for full documentation of this command in the latest Starlink release

starlink.smurf.sc2clean(in_, out, **kwargs)[source]¶

Clean SCUBA-2 time-series data.

Runs the command: $SMURF_DIR/sc2clean .

Parameters:
  • in_ (str,filename) – Input timeseries
  • out (str,filename) – Cleaned timeseries
Keyword Arguments:
 
  • bbm (str,filename) – Bad bolometer masks [!]
  • com (bool) – Write common-mode to NDF if calculated? [!]
  • config (str) – Cleaning parameters [current value]
  • flat (bool) – If set ensure data are flatfielded [TRUE]
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • gai (bool) – Write common-mode gain to NDF if calculated? [!]
  • maxlen (float) – Maximum concatenated length in seconds [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • padend (int) – Number of samples to pad at start [!]
  • padstart (int) – Number of samples to pad at end [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]
  • usedarks (bool) – If set mask data using darks [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2CLEAN for full documentation of this command in the latest Starlink release

starlink.smurf.sc2concat(in_, **kwargs)[source]¶

Concatenate files into a larger file.

Runs the command: $SMURF_DIR/sc2concat .

Parameters:

in_ (str,filename) – Input NDF data structure

Keyword Arguments:
 
  • out (str,filename) – Output NDF data structure [./*_con]
  • flat (bool) – If set ensure data are flatfielded [TRUE]
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • maxlen (float) – Maximum concatenated length in seconds [!]
  • outbase (str) – Base-name for output NDF data structures [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • padend (int) – Number of samples to pad at start [!]
  • padstart (int) – Number of samples to pad at end [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]
  • usedarks (bool) – If set mask data using darks [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2CONCAT for full documentation of this command in the latest Starlink release

starlink.smurf.sc2expandmodel(in_, **kwargs)[source]¶

Expand a DIMM model component into a full time-series data cube

Runs the command: $SMURF_DIR/sc2expandmodel .

Parameters:in_ (str,filename) – Input NDF data structure
Keyword Arguments:
 out (str,filename) – Output NDF data structure [./*_con]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2EXPANDMODEL for full documentation of this command in the latest Starlink release

starlink.smurf.sc2fft(in_, out, **kwargs)[source]¶

Fourier Transform SCUBA-2 time-series data

Runs the command: $SMURF_DIR/sc2fft .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • avpspec (bool) – Calculate average power spectrum of good detectors? [FALSE]
  • avpspecthresh (float) – N-sigma threshold for defining good detectors for average power spectrum [5]
  • bbm (str,filename) – Bad bolometer masks [!]
  • flat (bool) – If set ensure data are flatfielded [TRUE]
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • inverse (bool) – Perform inverse transformation if set [FALSE]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • polar (bool) – Use polar instead of cartesian representation of FFT? [FALSE]
  • power (bool) – Calculate power spectrum (in polar coordinates)? [FALSE]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]
  • weightavpspec (bool) – Weight bolos in avpspec as 1/noise^2? [TRUE]
  • zerobad (bool) – Set bad values to 0 before calculating FFT? [TRUE]
Returns:

ngood (int) – Number of good bolometers in average power spectrum

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2FFT for full documentation of this command in the latest Starlink release

starlink.smurf.sc2filtermap(in_, out, **kwargs)[source]¶

Filter a 2-d map

Runs the command: $SMURF_DIR/sc2filtermap .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • filt_edgehigh (float) – High-pass filter frequency (1/arcsec)? [0]
  • filt_edgelow (float) – Low-pass filter frequency (1/arcsec)? [0]
  • outfilter (str,filename) – Output NDF container for filter [!]
  • whiten (bool) – Whiten the map power spectrum? [FALSE]
  • whiterefmap (str,filename) – Reference map for whitening filter [FALSE]
  • zerobad (bool) – Set bad values to 0 before calculating FFT? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2FILTERMAP for full documentation of this command in the latest Starlink release

starlink.smurf.sc2mapfft(in_, out, **kwargs)[source]¶

Fourier Transform 2D maps

Runs the command: $SMURF_DIR/sc2mapfft .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • azavpspec (bool) – Calculate azimuthally averaged angular power spectrum? [FALSE]
  • inverse (bool) – Perform inverse transformation if set [FALSE]
  • polar (bool) – Use polar instead of cartesian representation of FFT? [FALSE]
  • power (bool) – Calculate power spectrum (in polar coordinates)? [FALSE]
  • zerobad (bool) – Set bad values to 0 before calculating FFT? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2MAPFFT for full documentation of this command in the latest Starlink release

starlink.smurf.sc2pca(in_, outamp, outcomp, **kwargs)[source]¶

Use principal component analysis to identify correlated SCUBA-2 signals

Runs the command: $SMURF_DIR/sc2pca .

Parameters:
  • in_ (str,filename) – Input timeseries
  • outamp (str,filename) – Amplitude files of the principal component
  • outcomp (str,filename) – Principal component files
Keyword Arguments:
 
  • bbm (str,filename) – Bad bolometer masks [!]
  • flat (bool) – If set ensure data are flatfielded [TRUE]
  • flatmeth (str) – Flatfield calculation method [POLYNOMIAL]
  • flatorder (int) – Order of polynomial to use for flatfield fitting [1]
  • flatsnr (float) – Signal-to-noise threshold for responsivity data [3.0]
  • flatusenext (bool) – Should we compare with following flatfield? [!]
  • outampfiles (str) – Text file in which to put the output amplitude NDF names [!]
  • outcompfiles (str) – Text file in which to put the output component NDF names [!]
  • resist (str) – Heater resistance information [$STARLINK_DIR/share/smurf/resist.cfg]
  • respmask (bool) – Mask bolometers with bad responsivity? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2PCA for full documentation of this command in the latest Starlink release

starlink.smurf.sc2sim(obspar, simpar, **kwargs)[source]¶

SCUBA-2 Simulator

Runs the command: $SMURF_DIR/sc2sim .

Parameters:
  • obspar (str) – Observation parameters
  • simpar (str) – Simulation parameters
Keyword Arguments:
 
  • seed (int) – [!]
  • maxwrite (int) – Number of samples to write in output file [12000]
  • overwrite (bool) – Overwrite existing files? [TRUE]
  • simstats (bool) – Report simulation statistics only? [FALSE]
  • simtype (str) – Simulation type (FULL or WEIGHTS)
  • badbol (str) – ARD Description File for Bad Bolometer mask [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2SIM for full documentation of this command in the latest Starlink release

starlink.smurf.sc2threadtest(*args, **kwargs)[source]¶

Task for testing speeds of different threading schemes

Runs the command: $SMURF_DIR/sc2threadtest .

Keyword Arguments:
 
  • nchunks (int) – Number of time chunks [2]
  • nsub (int) – Number of subarrays [4]
  • nthread (int) – Number of threads to use [2]
  • tsteps (int) – Number of time samples in simulated data chunk [6000]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SC2THREADTEST for full documentation of this command in the latest Starlink release

starlink.smurf.skyloop(*args, **kwargs)[source]¶

Create a map using the “inside-out” algorithm.

Runs the command: $SMURF_DIR/skyloop.py .

Keyword Arguments:
 
  • chunkwgt – Controls the weight used for each chunk. If False, then the weights are determined by the value of the CHUNKWGT FITS header in each input time-stream data file (unit weight is used for any data file that has no CHUNKWGT FITS header). If True, the weight for each chunk is based on the normalised map change for each chunk calculated on the previous iteration - the weight for a chunk is the ratio of the mean of all the chunk map changes to the chunk’s own map change. Weights above 1.0 are limited to 1.0. [False]
  • config –

    The MAKEMAP configuration parameter values to use. Additions will be made as follows:

    • First iteration:
      —
      numiter=1 noi.export=1 exportNDF=(lut,ext,res,qua) noexportsetbad=1 exportclean=1 ast.zero_notlast = 0 flt.zero_notlast = 0 com.zero_notlast = 0 pca.zero_notlast = 0 itermap=0 shortmap=0 bolomap=0 flagmap=<undef> sampcube=0 diag.append=0

      —

    • Subsequent iterations:
      —
      numiter=1 noi.import=1 exportNDF=(res,qua) doclean=0 importsky=ref importlut=1 ext.import=1 ast.zero_notlast = 0 flt.zero_notlast = 0 com.zero_notlast = 0 pca.zero_notlast = 0 flt.notfirst = 0 pca.notfirst = 0 pln.notfirst = 0 smo.notfirst = 0 itermap=0 shortmap=0 bolomap=0 flagmap=<undef> sampcube=0 diag.append=1 downsampscale=0 downsampfreq=0 fakemap=<undef>

      —

    • Last iteration:
      —
      numiter=1 noi.import=1 doclean=0 importsky=ref importlut=1 ext.import=1 ast.zero_notlast = 1 flt.zero_notlast = 1 com.zero_notlast = 1 pca.zero_notlast = 1 flt.notfirst = 0 pca.notfirst = 0 pln.notfirst = 0 smo.notfirst = 0 itermap=0 shortmap=0 bolomap=0 flagmap=<undef> sampcube=0 diag.append=1 downsampscale=0 downsampfreq=0 fakemap=<undef>

      —

  • extra – A string holding any extra command line options to be passed to MAKEMAP (all invocations). [!]
  • glevel – Controls the level of information to write to a text log file. Allowed values are as for “ILEVEL”. The log file to create is specified via parameter “LOGFILE. [“ATASK”]
  • ilevel –

    Controls the level of information displayed on the screen by the script. It can take any of the following values (note, these values are purposefully different to the SUN/104 values to avoid confusion in their effects):

    • ”NONE”: No screen output is created
    • ”CRITICAL”: Only critical messages are displayed such as warnings.
    • ”PROGRESS”: Extra messages indicating script progress are also displayed.
    • ”ATASK”: Extra messages are also displayed describing each atask invocation. Lines starting with “>>>” indicate the command name and parameter values, and subsequent lines hold the screen output generated by the command.
    • ”DEBUG”: Extra messages are also displayed containing unspecified debugging information. [“PROGRESS”]
  • in_ – The group of time series NDFs to include in the output map.
  • ipref – An existing NDF that is to be used to define the correction to be made for instrumental polarisation (IP). It is only accessed if the input data contains POL2 Q or U time-series values, as created by SMURF:CALCQU. No IP correction is made if a null (!) value is supplied. If a non-null value is supplied, it should be an NDF that holds the total intensity (in pW) within the area of sky covered by the output map. The supplied NDF need not be pre-aligned with the output map - the WCS information in the NDF will be used to aligned them. For each Q or U value in the input time-streams, the corresponding total intensity (I) value is found by sampling the supplied IPREF map at the sky position of the Q/U value. This I value is multipled by a factor that depends on elevation and focal plane position, to get the IP correction. These Q and U corrections are rotated so that they use the same reference direction as the input Q/U data, corrected for extinction, and are then subtracted from the input Q or U value before going on to make a map from the corrected values. [!]
  • itermap – A 3D NDF to create holding the maps from all iterations. [!]
  • logfile – The name of the log file to create if GLEVEL is not NONE. The default is “<command>.log”, where <command> is the name of the executing script (minus any trailing “.py” suffix), and will be created in the current directory. Any file with the same name is over-written.
  • mask2 – An existing NDF that can be used to specify a second external mask for use with either the AST, PCA, FLT or COM model. See configuration parameters AST.ZERO_MASK, PCA.ZERO_MASK, FLT.ZERO_MASK and COM.ZERO_MASK. Note, it is assumed that this image is aligned in pixel coordinate with the output map. [!]
  • mask3 – An existing NDF that can be used to specify a third external mask for use with either the AST, PCA, FLT or COM model. See configuration parameters AST.ZERO_MASK, PCA.ZERO_MASK, FLT.ZERO_MASK and COM.ZERO_MASK. Note, it is assumed that this image is aligned in pixel coordinate with the output map. [!]
  • msg_filter – Controls the default level of information reported by Starlink atasks invoked within the executing script. The accepted values are the list defined in SUN/104 (“None”, “Quiet”, “Normal”, “Verbose”, etc). [“Normal”]
  • niter – The number of iterations to perform. A positive value specifies a fixed number of iterations to perform. A negative value indicates that iterations should continue until the normalized change in the map between iterations is less than the value of the “maptol” parameter in the configuration supplied by parameter CONFIG (a maptol value of 0.05 is used if CONFIG does not specify maptol). If a value of zero is supplied for NITER, the value used will be read from the “numiter” parameter in the configuration. [0]
  • obsdir – The name of a directory in which to put maps made from the individual observations. These are generated on the final iteration. If null is supplied, individual observation maps will not be created. Each map is stored in a file with name <UT>_<OBS>.sdf. If a single observation is split into multiple chunks, the first chunk will use the above naming scheme but the second and subsequent chunks will have names of the form <UT>_<OBS>_<CHUNK>.sdf. [!]
  • out – The NDF holding the output map.
  • pixsize – Pixel dimensions in the output image, in arcsec. The same value will be used for both axes. The default depends on the wavelength of the input data.
  • ref –

    An existing NDF that is to be used to define the output grid. If supplied, the output grid will be aligned with the supplied reference NDF. The reference can be either 2D or 3D and the spatial frame will be extracted. If a null (!) value is supplied then the output grid is determined by parameters REFLON, REFLAT, etc. In addition, this NDF can be used to mask the AST, PCA, FLT or COM model. See configuration parameters AST.ZERO_MASK, PCA.ZERO_MASK, FLT.ZERO_MASK and COM.ZERO_MASK.

    On the second and subsequent invocations of MAKEMAP, any supplied REF image is replaced by the map created by the previous invocation of MAKEMAP. [!]

  • restart – If a value is assigned to this parameter, it should be the path to a directory containing the intermediate files created by a previous run of SKYLOOP. If supplied, execution of skyloop will restart from the point where the previous run finished. This is useful for continuing runs that have been interupted accidentally. The path to the intermediate files can be found by examining the log file created by the previous run. [!]
  • retain – Should the temporary directory containing the intermediate files created by this script be retained? If not, it will be deleted before the script exits. If retained, a message will be displayed at the end specifying the path to the directory. [FALSE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SKYLOOP for full documentation of this command in the latest Starlink release

starlink.smurf.skynoise(obspar, simpar, **kwargs)[source]¶

Generate a simulated sky background with spatial noise.

Runs the command: $SMURF_DIR/skynoise .

Parameters:
  • obspar (str) – Observation file
  • simpar (str) – Simulation file
Keyword Arguments:
 
  • seed (int) – [!]
  • exponent (float) – Power-Law Exponent [1.8]
  • filename (str) – [atm]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SKYNOISE for full documentation of this command in the latest Starlink release

starlink.smurf.smurfcopy(in_, out, slice, **kwargs)[source]¶

Copy a 2d image out of a time series file.

Runs the command: $SMURF_DIR/smurfcopy .

Parameters:
  • in_ (str,filename) – Input timeseries
  • out (str,filename) – Output filename
  • slice (int) – Index of time slice to extract (0 for last)
Keyword Arguments:
 
  • ftsport (str) – FTS-2 port: tracking, image or null [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • pointing (str) – Text file containing pointing corrections [!]
  • resist (str) – Heater resistance information [^$STARLINK_DIR/share/smurf/resist.cfg]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SMURFCOPY for full documentation of this command in the latest Starlink release

starlink.smurf.smurfhelp(*args, **kwargs)[source]¶

Gives help about SMURF.

Runs the command: $SMURF_DIR/smurfhelp .

Keyword Arguments:
 
  • topic (str) – Help topic [” “]
  • subtopic (str) – Help subtopic [” “]
  • subsubtopic (str) – Help subsubtopic [” “]
  • subsubsubtopic (str) – Help subsubsubtopic [” “]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SMURFHELP for full documentation of this command in the latest Starlink release

starlink.smurf.stackframes(in_, out, sort, sortby, **kwargs)[source]¶

Stack 2d processed frames into time series cube

Runs the command: $SMURF_DIR/stackframes .

Parameters:
  • in_ (str,filename) – Input processed 2d frames
  • out (str,filename) – Stacked frames
  • sort (bool) – [TRUE]
  • sortby (str) – Sort key [MJD]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_STACKFRAMES for full documentation of this command in the latest Starlink release

starlink.smurf.starecalc(in_, out, **kwargs)[source]¶

Calculate image for SCUBA-2 STARE observations

Runs the command: $SMURF_DIR/starecalc .

Parameters:
  • in_ (str,filename) – Input data file(s)
  • out (str,filename) – Output data file(s)
Keyword Arguments:
 
  • bbm (str,filename) – Bad bolometer masks [!]
  • naver (int) – Number of samples to average together to produce an image [!]
  • outfiles (str) – Text file in which to put the output NDF names [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_STARECALC for full documentation of this command in the latest Starlink release

starlink.smurf.supercam2acsis(in_, directory, **kwargs)[source]¶

Convert a Supercam SDFITS format data file to an ACSIS format NDF.

Runs the command: $SMURF_DIR/supercam2acsis .

Parameters:
  • in_ (str) – Input SuperCam SDFITS File
  • directory (str) – Output Directory

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_SUPERCAM2ACSIS for full documentation of this command in the latest Starlink release

starlink.smurf.timesort(in_, out, **kwargs)[source]¶

Re-order the time slices in a raw ACSIS data cube into increasing time.

Runs the command: $SMURF_DIR/timesort .

Parameters:
  • in_ (str,filename) – Input NDF data structure
  • out (str,filename) – Output NDF data structure
Keyword Arguments:
 
  • detectors (str) – Names of detectors to be included [!]
  • detpurge (bool) – Remove dead detectors? [FALSE]
  • genvar (bool) – [FALSE]
  • limittype (str) – Type of limit specified by LIMITSIZE [“FILESIZE”]
  • merge (bool) – Merge input NDFs? [dyn.]
  • outfiles (str) – Text file in which to put the output NDF names [!]
  • sizelimit (int) – Size limit for each output NDF [!]
  • specbnd (str) – How to choose pixel bounds on output spectral axis [“FIRST”]
Returns:

nout (int)

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_TIMESORT for full documentation of this command in the latest Starlink release

starlink.smurf.unmakecube(in_, ref, out, **kwargs)[source]¶

Produce simulated time series data from a regrided ACSIS data cube.

Runs the command: $SMURF_DIR/unmakecube .

Parameters:
  • in_ (str,filename) – Input sky cubes
  • ref (str,filename) – Template time series cubes
  • out (str,filename) – Output time series cubes
Keyword Arguments:
 
  • detectors (str) – Names of detectors to be included [!]
  • interp (str) – Pixel interpolation method [current value]
  • params (List[float]) – Auxiliary interpolation parameters
  • usedetpos (bool) – Read detector positions from the input NDF? [TRUE]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_UNMAKECUBE for full documentation of this command in the latest Starlink release

starlink.smurf.unmakemap(in_, ref, out, **kwargs)[source]¶

Produce simulated time series data from a SCUBA-2 map.

Runs the command: $SMURF_DIR/unmakemap .

Parameters:
  • in_ (str,filename) – Input sky map
  • ref (str,filename) – Template time series cubes
  • out (str,filename) – Output time series cubes
Keyword Arguments:
 
  • alignsys (bool) – Align data in the spatial co-ordinate system of the map? [FALSE]
  • amp16 (float) – Amplitude of 16 Hz signal as a fraction of I [0.0]
  • amp2 (float) – Amplitude of 2 Hz signal as a fraction of I [0.0]
  • amp4 (float) – Amplitude of 4 Hz signal as a fraction of I [0.0]
  • angrot (float) – Angle from focal plane X to fixed analyser (degs) [90.0]
  • com (str,filename) – Common-mode time-series NDFs [!]
  • comval (List[float]) – Constant comon-mode value for all time slices (pW) [!]
  • gai (str,filename) – 2-dimensional GAI model NDFs [!]
  • harmonic (int) – The half-wave plate harmonic to use [4]
  • instq (str,filename) – Instrumental Q value for each boloemeter
  • instu (str,filename) – Instrumental U value for each boloemeter
  • interp (str) – Pixel interpolation method [current value]
  • ipform (str) – Instrumental polarisation model to use [“PL3”]
  • jkdata (str) – Johnstone/Kennedy IP model data [‘$STARLINK_DIR/share/smurf/ipdata.sdf’]
  • paoff (float) – Angle from fixed analyser to POL_ANG=0 (degs) [18.65]
  • params (List[float]) – Auxiliary interpolation parameters
  • pasign (bool) – POL_ANG in sense of rotation from focal plane X to Y? [FALSE]
  • perror (float) – Sigma of random pointing errors to add, in arc-seconds [0.0]
  • phase16 (float) – Phase of 16 Hz signal in degrees [0.0]
  • phase2 (float) – Phase of 2 Hz signal in degrees [0.0]
  • phase4 (float) – Phase of 4 Hz signal in degrees [0.0]
  • pldata (List[float]) – Parameter values for PL1 PL2 or PL3 IP model [2.624E-3,4.216E-2,-2.410E-2,-3.400E-2]
  • pointing (str) – Text file containing pointing corrections [!]
  • qin (str,filename) – Input map of sky Q values [!]
  • sigma (float) – Stndard deviation of Gaussian noise to add [0.0]
  • uin (str,filename) – Input map of sky U values [!]
  • useaxis (str) – The sky map WCS axes to use [!]

Notes

See http://www.starlink.ac.uk/cgi-bin/htxserver/sun258.htx/sun258.html?xref_UNMAKEMAP for full documentation of this command in the latest Starlink release

starlink.utilities module¶

Convenience utilities when using Starlink in python.

starlink.utilities.get_module_function_summary(module)[source]¶

Return a summary of module functions

starlink.utilities.get_ndf_fitshdr(datafile)[source]¶

Return a astropy.io.fits header object.

If an NDF is provided, it will look up the .more.FITS component of the NDF file. It will raise an error if that does not exist.

Requires a astropy.io.fits to be installed.

starlink.utilities.starhelp(myobj)[source]¶

Get long help on a starlink module or command.

starlink.wrapper module¶

starlink.wrapper: A module for running Starlink commands from python.

This uses subprocess.Popen to run Starlink commands, and therefore requires a separate working installation of the Starlink Software Suite.

You must specify the location of your Starlink installation by eitherj

  • a) setting $STARLINK_DIR to the location of your Starlink installation before running Python.
  • b) running the command starlink.wrapper.change_starpath after importing the module.

This module allows you to use standard keyword arguments to call the starlink commands. Shell escapes do not need to be used.

By default, when you run commands using this module it will create a new temporary ADAM directory in the current folder, and use that as the ADAM directory for the starlink processes. In order to avoid returning values from a previous run, it will delete the <commandname>.sdf files from the ADAM directory after reading them back in. This also means it will not remember which options you used on the previous call to the command (unlike the command line Starlink).

This code was written to allow quick calling of kappa, smurf and cupid in a more ‘pythonic’ way.

exception starlink.wrapper.StarError(command, arg, stderr)[source]¶

Bases: Exception

starlink.wrapper.change_starpath(starlinkdir)[source]¶

Change the $STARLINK_DIR used by this module.

Note that this changes the module level env and starpath variables.

starlink.wrapper.oracdr(instrument, loop='file', dataout=None, datain=None, recipe=None, recpars=None, onegroup=False, rawfiles=None, utdate=None, obslist=None, headeroverride=None, calib=None, verbose=False, debug=False, warn=False)[source]¶

Run oracdr on a batch of files.

Parameters:

instrument (str) – Name of instrument

Keyword Arguments:
 
  • loop (str) – ‘file’ or ‘list’. determine if input obs are specified as raw file names/paths or as a list of observation numbers and a utdate. [‘file’]
  • dataout (str) – Location of output data directory; defaults to current dir.
  • datain (str) – Location of input data; defaults to current dir.
  • str (recpars) – Name of recipe to run. If None, use recipe from headers.
  • str – Value to pass as a recipe parameter option – either a filename or the recpars themselves.
  • onegroup (Bool) – Force all observations into one processing group.
  • rawfiles (str or list of filenames/paths) – If a string, this is a text file giving names of all input files. If list, then list of all input files as python list. Files are taken relative to datain, or can be given as absolute path. Only used if loop=’file’
  • utdate (int, YYYYMMDD) – The utdate of the input data. Only used if loop=’list’
  • obslist (List(int)) – List of input scan numbers. Input file names will be generated assuming JCMT/UKIRT directory structure, similar to <datain>/<utdate>/<scannumber>/rawfiles .
  • headeroverride (str, filename) – File with optional header overrides.
  • calib (str) – Calibration overrides. Accepts comma separated key=value pairs.
  • verbose (bool) – Include output from Starlink commands in log/stdout.
  • debug (bool) – Include debug output in log/stdout.
  • warn (bool) – Show Perl warning messages.
Returns:

Return value is a named tuple with the following attributes –

  • runlog: name of output logfile.
  • outputdir: path of output directory
  • datafiles: list of output data files.
  • imagefiles: list of output image files.
  • logfiles: list of log.* files
  • status: int, return code from suprocess.Popen
  • pid (int): pid of perl parent process.

Notes

This will not raise an exception if ORAC-DR ended with an error; it is up to the calling code to check the status if required.

starlink.wrapper.oracdr_envsetup(instrument, utdate=None, ORAC_DIR=None, ORAC_DATA_IN=None, ORAC_DATA_OUT=None, ORAC_CAL_ROOT=None, ORAC_DATA_CAL=None, ORAC_PERL5LIB=None)[source]¶

Setup the various ORAC-DR environmental variables.

Uses the modules ‘env’ variable as a starting point (via a copy).

Returns an updated environment dictionary.

class starlink.wrapper.oracoutput(runlog, outdir, datafiles, imagefiles, logfiles, status, pid)¶

Bases: tuple

datafiles¶

Alias for field number 2

imagefiles¶

Alias for field number 3

logfiles¶

Alias for field number 4

outdir¶

Alias for field number 1

pid¶

Alias for field number 6

runlog¶

Alias for field number 0

status¶

Alias for field number 5

starlink.wrapper.picard(recipe, files, dataout=None, recpars=None, oracdir=None, verbose=False, debug=False, warn=False)[source]¶

Run a picard recipe on a group of files.

Parameters:
  • recipe (str) – Name of recipe
  • files (str or list of str) – If str: name of textfile containing list of files. If list: list of input files. All paths interpreted relative to current directory.
Keyword Arguments:
 
  • dataout (str) – Location of output data directory; defaults to curr dir.
  • recpars (str) – Passed to the picard –recpars option.
  • oracdir (str) – Specify a custom ORAC src tree directory; by default <starpath>/bin/oracdr/src will be used.
  • verbose (bool) – provide output from Starlink commands in log/stdout
  • debug (bool) – Provide debug output.
  • warn (bool) – Show Perl warning messages in stdout.
Returns:

Return value is a named tuple with the following attributes –

  • runlog: name of output logfile.
  • outputdir: path of output directory
  • datafiles: list of output data files.
  • imagefiles: list of output image files.
  • logfiles: list of log.* files
  • status: int, return code from suprocess.Popen
  • pid (int): pid of perl parent process.

starlink.wrapper.set_HDS_version(version)[source]¶

Use this to switch between HDS_VERSION=4 and HDS_VERSION=5.

The default is determined by your Starlink installation. Please note that this package will not currently pay attention to an HDS_VERSION set in your environment before running Python.

starlink.wrapper.setup_starlink_environ(starpath, adamdir, noprompt=True)[source]¶

Create a suitable ENV dict to pass to subprocess.Popen.

starlink.wrapper.starcomm(command, commandname, *args, **kwargs)[source]¶

Execute a Starlink application

Carries out the starlink ‘commandname’, and returns a namedtuple of the starlink parameter values (taken from $ADAM_DIR/<com>.sdf

Parameters:
  • command (str) – The path of a command to run, e.g. ‘$SMURFDIR/makecube’
  • commandname (str) – The name of command (used for getting output values).
Keyword Arguments:
 

returnstdout (bool) – Have the string that would have been written to stdout in a normal starlink session be returned from this function as a string.

Other arguments and keyword arguments are evaluated by the command being called. Please see the Starlink documentation for the command. The standard Starlink package environmental variables (e.g. KAPPA_DIR, SMURF_DIR etc.) can be used inside the command name.

Returns:
  • namedtuple (Containing all the input and output params for this command as attributes.)
  • stdout (the stdout as a string (only returned if returnStdOut=True))

Example

>>> res = starcomm('$KAPPA_DIR/stats', 'stats', ndf='myndf.sdf')

Notes

Starlink parameters or functions that are reserved python names (e.g. ‘in’) should be called by appending an underscore. E.g.

>>> in_='myndf.sdf'
starlink.wrapper.subprocess_setup()[source]¶

Module contents¶

License¶

Copyright 2009-2011 Tom Marsh All Rights Reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.


© Copyright 2016, SF Graves. Revision 6d3298a9.

Built with Sphinx using a theme provided by Read the Docs.