/usr/share/gnudatalanguage/astrolib/ftkeeprow.pro is in gdl-astrolib 2018.02.16+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | pro ftkeeprow,h,tab,subs
;+
; NAME:
; FTKEEPROW
; PURPOSE:
; Subscripts (and reorders) a FITS table. A companion piece to FTDELROW.
;
; CALLING SEQUENCE:
; ftkeeprow, h, tab, subs
;
; INPUT PARAMETERS:
; h = FITS table header array
; tab = FITS table data array
; subs = subscript array of FITS table rows. Works like any other IDL
; subscript array (0 based, of course).
;
; OUTPUT PARAMETERS:
; h and tab are modified
;
; MODIFICATION HISTORY:
; Written by R. S. Hill, ST Sys. Corp., 2 May 1991.
; Converted to IDL V5.0 W. Landsman September 1997
;-
On_error,2 ;Return to caller
if N_params() LT 3 then begin
print,'Syntax - ftkeeprow, h, tab, subs'
return
endif
insize = sxpar(h,'NAXIS2')
tab = tab[*,subs]
outsize = N_elements(subs)
sxaddpar, h, 'NAXIS2', outsize
tag = 'FTKEEPROW '+systime(0)+': '
sxaddhist, tag + 'table subscripted', h
sxaddhist, tag + strtrim(string(insize),2) + ' rows in, ' + $
strtrim(string(outsize),2) + ' rows out',h
return
end
|