Extract the floating point RA,DEC values from a cdfp file and produce 3 ASCII files:
list.RA_DEC_hd = Ra,Dec in unist of hours and degrees list.RA_DEC_dd = Ra,Dec in unist of degrees and degrees list.RA_DEC_sex = Ra,Dec in sexigecimal format % cdfp_rdlists.sh --help Usage: cdfp_rdists.sh a.cdfp arg1 - name of input cdfp file Additional options: -v = print verbose comments --help = view a help documentAlthough very simple, this turns out to be very useful for writing scripts involving cdfp files. Here is a full example:
% cat aps1.cdfp Ra_hrs,Dec_deg,Xcent,Ycent,isomag30,NumPix, 19.740600586 26.221525192 737.840 209.030 12.182 2081.000 19.739345551 26.207641602 472.520 90.990 14.993 468.000 19.736711502 26.249803543 168.150 756.530 15.865 365.000 19.739686966 26.216396332 562.440 186.810 16.122 320.000 19.738698959 26.235244751 458.890 475.300 16.337 289.000 % cdfp_rdlists.sh aps1.cdfp % cat list.RA_DEC_hd 19.740600586 26.221525192 19.739345551 26.207641602 19.736711502 26.249803543 19.739686966 26.216396332 19.738698959 26.235244751 % cat list.RA_DEC_dd 296.10900878906 26.22152519226 296.09017944336 26.20764160156 296.05065917969 26.24980354309 296.09530639648 26.21639633179 296.08047485352 26.23524475098 % cat list.RA_DEC_sex 19:44:26.1621 +26:13:17.491 19:44:21.6440 +26:12:27.510 19:44:12.1614 +26:14:59.293 19:44:22.8731 +26:12:59.027 19:44:19.3163 +26:14:06.881We so often have need of using one of these three position formats, and it is very easy to paste and awk these files to creat a variety of desired output files in a script.