1 KAPLIBS_library Expires: ??? KAPLIBS is a package containing several Fortran subroutine libraries which provide general-purpose algorithms required by the KAPPA package, and which may be of use to anyone developing their own KAPPA-like applications (see SUN/238). Version 3.6 - New routine KPG1_ALIGN aligns an input 2-d NDF with a reference 2-d NDF using an affine transformation which minimises the residuals between the reference NDF and the transformed input NDF. Version 3.5 - New generic KPG_STOCx calculates clipped ordered statistics, enabling the API of KPG_STOSx to remain unchanged. - New routine kpgPutOutline creates and stores an STC polygon describing the spatial extent of an NDF. It has an option to define a convex hull enclosing specified pixels in an array. - KPG1_WRCAT can store arbitrary headers in the output catalogue. - KPG1_CORRx has a new argument, N, which returns the number of used points. - The random number seed can now be set via environment variable STAR_SEED. - kpgGtobj can now create an AST Region describing the coverage of a supplied NDF. - Fixed a bug in CCG\_FLX1 affecting variance calculations where the width was not squared in summations. This would affect the integ estimator in tasks such as KAPPA::COLLAPSE. - Prevent values falling outside the histogram in KPG1_OPGR1. - Fixed a memory leak in kpg1Kygp1. Version 3.4 - New KPG1_KY2HD and kpg1Ky2hd have been moved to the ATL library. - Added KPG1_QUOTE to put single quotes round a string and escape any embedded single quotes. - Handles 64-bit integers. Version 3.3 - New generic KPG1_CORRx routine to calculate the Pearson correlation coefficient of two arrays. - New methods in CCG_COMNB1/2 to combine lines to give the number or fraction) of good (or bad) pixels. Version 3.2 - New KPG_TYPSZ routine (adapted from CONVERT equivalent) that returns the number of bytes for a given numeric HDS data type. - Routine KPG1_BADBX now has an extra argument that indicates how the calculated bounding box should be used. - Routine KPG1_ASSET now allows the new pseudo-attribute "TEXTMARGIN" to be used to specify a margin to clear around a text string. The value of the attribute gives the width of the margin in units of the text height. - C wrappers added for KPG1_BADBX, KPG1_GTOBJ, and KPG1_PXSCL. - Fixed bug handling default-configuration settings by kpg1Config. Version 3.1 - New C function kpg1Config gets a KeyMap containing configuration parameters from the user, with name checking and default values supplied. - The new routine KPG1_DSSFM displays information about the storage form of an NDF array. - There is a new generic routine KPG_FISEx that fills a section of a multi-dimensional array. - The new KPG1_GTGPT routine is a variant of KPG1_GTGRP to obtain groups of strings. KPG1_GTGPT supports group members that are not `sticky', in other words the strings only last for the current invocation of an application. - The new more-general KPG_ISEQN replaces the old IRCAM-specific NXTNAM routine. This increments trailing sequence numbers in strings, most often used to generate a series of filenames. - Added new routine KPG_LR2Ax that is the same as KPG_LDA2x (formerly LD2AR) except it processes single-precision sparse data. - There is a new routine KPG_NORVx to replace the old NORMAL. It has the benefits of being generic and can operate on an array. - KPG_OSTAx added. It uses recurrence formulae to calculate simple statistics robustly. It also extends KPG1_STATx by deriving the skewness and kurtosis. - DIMLST is renamed KPG_DIMLS. - ICMMM has been renamed KPG_IMMMx and made generic. The calculations are now in performed double precision. Note that the API has changed: the first two arguments have been transposed to the standard order, and the returned floating- point statistics are now double precision. - LD2AR has been renamed KPG_LD2Ax and made generic. - Remove FTS1_TREAD since the MAG library has now been removed from the main Starlink source tree. - A number of long-deprecated old routines without a package prefix have been removed. These are listed below. The corresponding replacement routines appear in the right column. BAD2Dx KPG_FISEx setting the fill value to VAL__BADx CHVALx KPG1_CHVAx COPAx VEC_xTOx or KPG1_COPY COPY1D " " COPY2D " " COPY3D " " CPSECR KPG1_CPNDx CREOUT NDF_CREP and NDF_CPUT ELNMBx KPG1_ELNMx EXPARR KPG1_EXPOx INSET CHR_INSET LOGARR KPG1_LOGAx NXTNAM KPG_ISEQN NORMAL KPG_NORVx POWARR KPG1_POWx ZERO1D KPG1_FILLx setting the fill value to 0.0. ZERO2D KPG1_FILLx " " " - KPG1_ASSET now parses the supplied parameter name for a non-alphanumeric prefix and suffix to determine whether or not temporary attributes are supported via the new KPG1_GTGPT routine. A suffix indicates that KPG1_ASSET will be called again for the same parameter, affecting the value to write to the parameter file. - The KPG1_PLTLN routine now accepts a value 6 for the MODE argument, which causes a staircase plot to be produced in which bad values are not flanked by vertical lines to the lower edge of the plot (as are produced by Mode 1), leaving a gap. - KPG1_STDSx and KPG1_STFLx can respectively report or log the skewness and kurtosis via two additional arguments. Users of these routines will need to modify calling routines accordingly; without skewness or kurtosis values to document supply VAL__BADD for each undefined statistic. - Support for FITS tapes was removed from FTS1_PHEAD, FTS1_RDATA, FTS1_RGRDA, FTS1_RSTAB, FTS1_SKIP. Argument MEDIUM in these routines now only accepts the value 'DISK'. - Config files can now include "" to revert to the default value. - Config files can now include "" to store an undefined value using kpg1Kymap. Version 3.0 - CCG routines' NBAD argument excludes bad elements not attributable to the MINPIX threshold. - CCG_CS1 and CCG_CS3 now return the clipped standard deviations instead of the clipped variances. - CTG, IRQ, and LPG libraries are no longer in KAPLIBS. They are autonomous libraries each with its own documentation and link scripts. - KPG_BLONx added. It smooths an n-dimensional image using box mean filter (unlike KPG1_BLOCx which is limited to two-dimensional data). - KPG_BMDNx added. It smooths an n-dimensional array using a box median filter (unlike KPG1_BMEDx which is limited to two-dimensional data). - kpg1Ch2pm added. It creates an AST PolyMap that performs a polynomial transformation equivalent to a supplied Starlink POLYNOMIAL structure (Chebyshev and simple are both supported). - kpg1Chcof added. It returns coefficients for a set of Starlink POLYNOMIAL structures. - KPG_ENV0C added. It reads a string value from an environment variable using a default value if the variable is undefined. - Further bug fixes and improvements to KPG1_FRAC: + Works for data ranges smaller than the type precision. + The minimum sparseness increased from 4 to 16 percent to cope with extreme outliers, at the cost of poorer handling of quantized distributions. + Generates new histogram between the narrowed limits to yield more-accurate statistics. - KPG1_FIT1D re-written in C (kpg1Fit1d) for thread-safety. - KPG1_GRAPH: The IPLOT argument is now "Given and Returned" and must be initialised before calling KPG1_GRAPH. - KPG1_MVBDx added. It modifies an array index (such as produced by PDA_QSIAx) to exclude indices that refer to bad data values. - KPG1_SAXAX added. It sets the attributes of an axis in an AST Frame so that they describe an array component of an NDF. - KPG_STOSx added. It calculates accurate order statistics by sorting an array by means of an index, returning the median and optionally percentiles. - Added C interfaces for KPG1_DARAD (kpg1Darad), KPG1_LOCTD (kpg1Loctd), and KPG1_PIXSC (kpgPixsc). Version 2.8 - KPG1_ELGAU added from KAPPA routine KPS1_ELGAU. It finds ellipse parameters given the ellipse width in four different directions. - KPG1_RDCAT added. It reads a catalogue, exactly like KPG1_RDTAB, except that it allows an arbitrary set of extra columns to be returned, specified via an AST KeyMap. - KPG1_WRCAT added. It writes a catalogue, exactly like KPG1_WRTAB, except that it allows an arbitrary set of extra columns to be supplied, specified via an AST KeyMap. - KPG1_BADBX added. It returns an NDF identifier for the smallest section of a supplied NDF that encloses all the good data values in the NDF. - KPG1_BBOXx added. It obtains the pixel bounding box of a given value within an N-dimensional data array. - KPG1_LIKE added. It obtains a section of an NDF that matches either the pixel or WCS shape of a given template NDF. - KPG1_KYMAP can read vectors as well as scalars from a GRP group into an AST keyMap. - Added KPG1_MXMNX, which provides a single interface to the existing generic KPG1_MXMN routines. - Added KPG1_CGET, which returns the value of an NDF character component removing any AST or PGPLOT escape sequences. - The kaplibs_link script now works without attempting to load ADAM symbols. - Can now be built as a shared library. - Added KPG1_ASTCMN to provide access to KPG_AST private common block. - The HLP helper routines are no longer part of kaplibs. Use SHL library instead. - KPG1_SCRSZ no longer present. Please use ONE_SCRSZ instead. - now released under the GPL - kpgGtfts and kpgPtfts can now be used to read and write AST FitsChan objects from/to an NDF - KAPLIBS no longer links against Tk (the one Tk routine has been removed from kaplibs) - KAPLIBS now has a public C interface (but not for all routines) Version 2.7. includes the following changes: - New routine LPG_REPLA controls a new option which allows a single NDF to be used as both input and output for an ADAM task. The default is for this option to be disabled.