[SCM] Create, display and manipulate the world coordinate system branch, upstream, updated. fea45cb381c40a42879231b939c8469b393dc5e1
Ole Streicher
debian at liska.ath.cx
Mon May 7 16:26:29 UTC 2012
The following commit has been merged in the upstream branch:
commit fea45cb381c40a42879231b939c8469b393dc5e1
Author: Ole Streicher <debian at liska.ath.cx>
Date: Mon May 7 18:26:04 2012 +0200
New upstream version 3.8.5
diff --git a/Install b/Install
index fe8f92d..ea34b68 100644
--- a/Install
+++ b/Install
@@ -12,20 +12,20 @@ Brief descriptions of file contents are in the Programs file.
A history of this software is in the NEWS file.
The complete source code is in
-ftp://cfa-ftp.harvard.edu/pub/gsc/WCSTools/wcstools-3.8.0.tar.gz and
+ftp://cfa-ftp.harvard.edu/pub/gsc/WCSTools/wcstools-3.8.4.tar.gz and
ftp://cfa-ftp.harvard.edu/pub/gsc/WCSTools/wcstls37.zip and
-http://tdc-www.harvard.edu/software/wcstools/wcstools-3.8.0.tar.gz
+http://tdc-www.harvard.edu/software/wcstools/wcstools-3.8.4.tar.gz
Documentation, with examples and installation directions, is on the
World Wide Web at http://tdc-www.harvard.edu/software/wcstools/
To install the code, create a directory for it, download it, and run
- gzcat wcstools-3.8.0.tar.gz | tar xvf -
+ gzcat wcstools-3.8.4.tar.gz | tar xvf -
or
unzip wcstls37.zip
-The directory wcstools-3.8.0 will contain the source code for the programs,
+The directory wcstools-3.8.4 will contain the source code for the programs,
and a subdirectory, libwcs, will contain the source code for the subroutines.
Catalog access subroutines, gscread.c, actread, uacread.c, ubcread.c,
@@ -73,5 +73,5 @@ systems, and even that has been minimized. The package even compiles and runs
under Windows using the free Cygwin environment. If you have any problems,
feel free to write the author.
--Doug Mink, SAO, 2009-11-12
+-Doug Mink, SAO, 2011-09-21
http://tdc-www.harvard.edu/mink/
diff --git a/Makefile b/Makefile
index 644ee24..74c72e9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CFLAGS= -g
+CFLAGS= -g -D_FILE_OFFSET_BITS=64
CC= cc
LIBWCS = libwcs/libwcs.a
LIBNED = libned/libned.a
diff --git a/NEWS b/NEWS
index c3bd4fe..0c3baaf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+Version 3.8.5 (April 12, 2012)
+getdate: Fix string overflow in ts0 assignment (2012-03-27)
+gethead: If length of header/file content string is zero, exit with error
+sumpix: Improve argument parsing so order doesn't matter (2012-02-01)
+matchstar.c: Fix bug in WCSMatch() which miscomputed means
+fitsfile.c: Always check first 8 characters of FITS files for "SIMPLE"
+imhfile.c: Fix potential overflow in newpixfile assignment (2012-03-27)
+imio.c: Change 8-bit pixel values from char to unsigned char
+
Version 3.8.4 (September 1, 2011)
cphead, keyhead, sethead: Fix overflow bug by increasing size of history from 72 to 128
imgetwcs.c, wcsinit.c, wcs.c, wcs.h, worldpos.c: Add TPV WCS for TAN with PV terms
diff --git a/Readme b/Readme
index 1eeca93..e2c0cde 100644
--- a/Readme
+++ b/Readme
@@ -1,4 +1,4 @@
-WCSTools 3.8.4
+WCSTools 3.8.5
WCSTools is a set of software utilities, written in C, which create,
display and manipulate the world coordinate system of a FITS or IRAF
@@ -14,8 +14,8 @@ in the main directory or, on Solaris machines
make -f Makefile.solaris
-This is version 3.8.4 of the WCSTools package developed by Doug Mink
-(dmink at cfa.harvard.edu) at the Smithsonian Astrophysical Observatory,
+This is version 3.8.5 of the WCSTools package developed by Jessica Mink
+(jmink at cfa.harvard.edu) at the Smithsonian Astrophysical Observatory,
with significant code or algorithms from
Mark Calabretta of CSIRO (projection),
@@ -39,9 +39,14 @@ all of the variables initialized.
Details of updates are in the NEWS file, but here is what is new:
-Version 3.8.4 (September 1, 2011)
-cphead, keyhead, sethead: Fix overflow bug by increasing size of history from 72 to 128
-imgetwcs.c, wcsinit.c, wcs.c, wcs.h, worldpos.c: Add TPV WCS for TAN with PV terms
+Version 3.8.5 (April 12, 2012)
+getdate: Fix string overflow in ts0 assignment (2012-03-27)
+gethead: If length of header/file content string is zero, exit with error
+sumpix: Improve argument parsing so order doesn't matter (2012-02-01)
+matchstar.c: Fix bug in WCSMatch() which miscomputed means
+fitsfile.c: Always check first 8 characters of FITS files for "SIMPLE"
+imhfile.c: Fix potential overflow in newpixfile assignment (2012-03-27)
+imio.c: Change 8-bit pixel values from char to unsigned char
Documentation, with examples and installation directions, is on the
World Wide Web at
@@ -60,38 +65,45 @@ The paper presented at ADASS in 1996 is the best published description
of the IMWCS world coordinate system fitting program:
"WCSTools: Putting Image World Coordinate Systems to Use",
Douglas J. Mink, 1997, in Astronomical Data Analysis Software and
- Systems VI, A.S.P. Conference Series, Vol. 125, Gareth Hunt and
- H. E. Payne, eds., pp. 249-252.
+ Systems VI, A.S.P. Conference Series, Vol. 125. Edited by Gareth Hunt
+ and H. E. Payne.
+ San Francisco: Astronomical Society of the Pacific, pp. 249-252.
The 1998 ADASS paper is the best published description of the other tools
in the WCSTools package, including SAOimage when used for WCS work:
"WCSTools: An Image Astrometry Toolkit",
- Douglas J. Mink (1998), in Astronomical Data Analysis Software and
- Systems VIII, A.S.P. Conference Series, Vol. 172, 1999, Dave Mehringer,
- Ray Plante, Doug Roberts, eds., pp. 498-501.
+ Douglas J. Mink, 1999, in Astronomical Data Analysis Software and
+ Systems VIII A.S.P. Conference Series, Vol. 172. Edited by Dave
+ Mehringer, Ray Plante, and Doug Roberts.
+ San Francisco: Astronomical Society of the Pacific, pp. 498-501.
A paper presented at the 2001 ADASS conference describes how the
WCSTools package uses the web, among other new features:
"WCSTools 3.0: More Tools for Image Astrometry and Catalog Searching",
- Douglas J. Mink, 2001, to be published in Astronomical Data Analysis
- Software and Systems XI, whenever it comes out.
+ Douglas J. Mink, in Astronomical Data Analysis Software and Systems XI,
+ A.S.P. Conference Series, Vol. 281, 2002. Edited by David
+ Bohlender, Daniel Durand, and T.H. Handley.
+ San Francisco: Astronomical Society of the Pacific, pp. 169-172.
This paper presented at the 2002 ADASS conference describes interesting
ways to use the SCAT program:
"Federating Catalogs and Interfacing Them with Archives: A VO Prototype",
- Douglas J. Mink and Michael J. Kurtz, 2002, to be published in
- Astronomical Data Analysis Software and Systems XII, whenever it comes out.
+ Douglas J. Mink and Michael J. Kurtz, 2003, in Astronomical Data Analysis
+ Software and Systems XII, A.S.P. Conference Proceedings, Vol. 295.
+ Edited by Harry Payne, Robert Jedrzejewski, and Richard Hook.
+ San Francisco: Astronomical Society of the Pacific, pp. 51-54.
To assist users in selecting the best catalog to use, we tested the accuracy of
the various catalogs one is likely to use with imwcs, showing how well it works
in a pipeline mode on 1728 images. This ADASS paper is an improved version of
our AAS/DDA paper, adding the UCAC2 catalog and emphasizing usefulness more than
astrometry:
- "A Comparison of Large All-Sky Catalogs" Douglas J. Mink, Warren R. Brown,
-and Michael J. Kurtz in Astronomical Data Analysis Software and Systems XIII,
-ASP Conference Proceedings, Vol. 314. Edited by Francois Oschenbein, Mark Allen,
-and Daniel Egret. San Francisco: Astronomical Society of the Pacific,
-ISSN: 1080-7926, 2004., p. 141.
+ "A Comparison of Large All-Sky Catalogs",
+ Douglas J. Mink, Warren R. Brown, and Michael J. Kurtz, 2004, in
+ Astronomical Data Analysis Software and Systems XIII, A.S.P. Conference
+ Proceedings, Vol. 314. Edited by Francois Oschenbein, Mark Allen,
+ and Daniel Egret.
+ San Francisco: Astronomical Society of the Pacific, pp. 141-144.
Program Descriptions
@@ -155,4 +167,4 @@ wcshead Print basic world coordinate system information on one line per image
xy2sky Print sky coordinates for given image pixel coordinates on the command
line or in a list file.
--Doug Mink, SAO, 2011-09-01
+-Jessica Mink, SAO, 2012-04-12
diff --git a/addpix.c b/addpix.c
index 794bcca..02797f1 100644
--- a/addpix.c
+++ b/addpix.c
@@ -1,7 +1,7 @@
/* File addpix.c
* June 21, 2006
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -34,7 +34,7 @@
static void usage();
static int newimage = 0;
static int verbose = 0; /* verbose flag */
-static char *RevMsg = "ADDPIX WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "ADDPIX WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static void AddPix();
static int version = 0; /* If 1, print only program name and version */
diff --git a/revup b/addup
similarity index 79%
copy from revup
copy to addup
index 540b9fb..195c757 100755
--- a/revup
+++ b/addup
@@ -3,7 +3,7 @@ while test $1
a=$1
b=$1x
mv $a $b
- sed -f revup.sed $b >$a
+ sed -f addup.sed $b >$a
echo $1 updated
/bin/rm $b
shift
diff --git a/addup.sed b/addup.sed
new file mode 100644
index 0000000..080f06f
--- /dev/null
+++ b/addup.sed
@@ -0,0 +1 @@
+1,$s/dmink/jmink/g
diff --git a/bincat.c b/bincat.c
index 0687f29..c9bb881 100644
--- a/bincat.c
+++ b/bincat.c
@@ -1,7 +1,7 @@
/* File bincat.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2003-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -48,7 +48,7 @@ extern void setrefpix();
extern void setcdelt();
extern struct WorldCoor *GetFITSWCS();
-static char *RevMsg = "BINCAT WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "BINCAT WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose flag */
static int debug = 0; /* debugging flag */
static int bitpix = 0; /* number of bits per pixel (FITS code, 0=no image) */
diff --git a/caphot.c b/caphot.c
index fc9b6df..aeb8e09 100644
--- a/caphot.c
+++ b/caphot.c
@@ -1,6 +1,6 @@
/*** File caphot.c
*** January 30, 2002
- *** By Doug Mink from Fortran code by Sam Conner (MIT, 1984)
+ *** By Jessica Mink from Fortran code by Sam Conner (MIT, 1984)
*** Copyright (C) 2002
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
@@ -19,8 +19,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Correspondence concerning WCSTools should be addressed as follows:
- Internet email: dmink at cfa.harvard.edu
- Postal address: Doug Mink
+ Internet email: jmink at cfa.harvard.edu
+ Postal address: Jessica Mink
Smithsonian Astrophysical Observatory
60 Garden St.
Cambridge, MA 02138 USA
diff --git a/catrot.c b/catrot.c
index 402b7d0..c9be46c 100644
--- a/catrot.c
+++ b/catrot.c
@@ -1,7 +1,7 @@
/* File catrot.c
* April 6, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -46,7 +46,7 @@ static int bitpix = 0; /* number of bits per pixel (FITS code) */
static int fitsout = 0; /* Output FITS file from IRAF input if 1 */
static int nsplit = 0; /* Output multiple FITS files from n-extension file */
static int overwrite = 0; /* allow overwriting of input image file */
-static char *RevMsg = "IMROT WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMROT WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int version = 0; /* If 1, print only program name and version */
static int xshift = 0;
static int yshift = 0;
diff --git a/char2sp.c b/char2sp.c
index f523e86..bc032f0 100644
--- a/char2sp.c
+++ b/char2sp.c
@@ -1,7 +1,7 @@
/* File char2sp.c
* June 20, 2006
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -39,7 +39,7 @@ static int verbose = 0; /* verbose/debugging flag */
static int version = 0; /* If 1, print only program name and version */
static char spchar = '_';
-static char *RevMsg = "CHAR2SP WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "CHAR2SP WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/conpix.c b/conpix.c
index d1de2fb..f6ad27d 100644
--- a/conpix.c
+++ b/conpix.c
@@ -1,7 +1,7 @@
/* File conpix.c
* July 5, 2006
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -52,7 +52,7 @@ static int version = 0; /* If 1, print only program name and version */
static int setgnoise = 0; /* If 1, pixels have been set to random noise */
static int addgnoise = 0; /* If 1, pixels have random noise added */
-static char *RevMsg = "CONPIX WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "CONPIX WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/cphead.c b/cphead.c
index df0cff0..9615324 100644
--- a/cphead.c
+++ b/cphead.c
@@ -1,7 +1,7 @@
/* File cphead.c
* September 1, 2011
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2000-2011
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -41,7 +41,7 @@ static void CopyValues();
extern char *GetFITShead();
static int verbose = 0; /* verbose/debugging flag */
-static char *RevMsg = "CPHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "CPHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int copyall = 0; /* Copy entire header, overwriting old one */
static int nfile = 0;
static int ndec0 = -9;
diff --git a/crlf.c b/crlf.c
index d9925e7..e107c13 100644
--- a/crlf.c
+++ b/crlf.c
@@ -1,7 +1,7 @@
/* File crlf.c
* June 20, 2006
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/delhead.c b/delhead.c
index e2c7024..63a42f0 100644
--- a/delhead.c
+++ b/delhead.c
@@ -1,7 +1,7 @@
/* File delhead.c
* September 25, 2009
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1998-2009
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -53,7 +53,7 @@ static int nproc = 0;
static int overwrite = 0; /* If 1, overwrite input image */
static int first_file = 1;
-static char *RevMsg = "DELHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "DELHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/delwcs.c b/delwcs.c
index 5d40e78..88abbce 100644
--- a/delwcs.c
+++ b/delwcs.c
@@ -1,8 +1,8 @@
/* File delwcs.c
* June 21, 2006
- * By Doug Mink, after University of Iowa code
+ * By Jessica Mink, after University of Iowa code
* (Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -38,7 +38,7 @@ extern int DelWCSFITS ();
static int verbose = 0; /* Verbose/debugging flag */
static int newimage = 0; /* New image flag */
static int readimage = 1; /* Read and write image as well as header */
-static char *RevMsg = "DELWCS WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "DELWCS WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int version = 0; /* If 1, print only program name and version */
int
diff --git a/edhead.c b/edhead.c
index 6000d67..26a8460 100644
--- a/edhead.c
+++ b/edhead.c
@@ -1,7 +1,7 @@
/* File edhead.c
* October 31, 2006
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -21,8 +21,8 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
@@ -39,7 +39,7 @@ static void EditHead();
static int newimage = 0;
static int verbose = 0; /* verbose flag */
static char *editcom0; /* Editor command from command line */
-static char *RevMsg = "EDHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "EDHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int version = 0; /* If 1, print only program name and version */
diff --git a/filedir.c b/filedir.c
index 14bddaf..7271665 100644
--- a/filedir.c
+++ b/filedir.c
@@ -1,7 +1,7 @@
/* File filedir.c
* June 30, 2010
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2010
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/filename.c b/filename.c
index 1076fe1..0eb5185 100644
--- a/filename.c
+++ b/filename.c
@@ -1,7 +1,7 @@
/* File filename.c
* February 6, 2008
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006-2008
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/fileroot.c b/fileroot.c
index 211024a..2b17bf1 100644
--- a/fileroot.c
+++ b/fileroot.c
@@ -1,7 +1,7 @@
/* File fileroot.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2000-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/filext.c b/filext.c
index 18113f4..6378cf2 100644
--- a/filext.c
+++ b/filext.c
@@ -1,7 +1,7 @@
/* File filext.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2002-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/fixpix.c b/fixpix.c
index 60bd2fa..7d2a3bb 100644
--- a/fixpix.c
+++ b/fixpix.c
@@ -1,7 +1,7 @@
/* File fixpix.c
* December 30, 2010
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1997-2010
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -47,7 +47,7 @@ static int nfix = 0; /* Number of regions to fix
static int version = 0; /* If 1, print only program name and version */
static int xl[MAXFIX],yl[MAXFIX]; /* Lower left corners of regions (1 based) */
static int xr[MAXFIX],yr[MAXFIX]; /* Upper right corners of regions (1 based) */
-static char *RevMsg = "FIXPIX WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "FIXPIX WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/getcol.c b/getcol.c
index df90f6d..6e2cbdd 100644
--- a/getcol.c
+++ b/getcol.c
@@ -1,7 +1,7 @@
/* File getcol.c
* April 18, 2011
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1999-2011
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -37,7 +37,7 @@
#define MAXFILES 2000
#define MAXLINES 100000
-static char *RevMsg = "GETCOL WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "GETCOL WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
static void usage();
static int ListFile();
diff --git a/getdate.c b/getdate.c
index eb38600..d08be98 100644
--- a/getdate.c
+++ b/getdate.c
@@ -1,9 +1,9 @@
/* File getdate.c
- * July 15, 2011
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * March 27, 2012
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
- Copyright (C) 1999-2011
+ Copyright (C) 1999-2012
Smithsonian Astrophysical Observatory, Cambridge, MA USA
This program is free software; you can redistribute it and/or
@@ -66,7 +66,7 @@
#define MST 3
#define LST 4
-static char *RevMsg = "GETDATE WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "GETDATE WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
static void usage();
static void ConvertDate();
@@ -98,6 +98,9 @@ char **av;
int outtype = 0; /* Output date type */
int appdate = 0; /* Append date to input file */
int typeset = 0;
+ int ntok = 0;
+ struct Tokens tokens;
+ int itok;
int lline;
char line[82];
FILE *fd;
@@ -247,17 +250,13 @@ char **av;
/* Set RA, Dec, and equinox if WCS-generated argument */
if (ac > 3 &&
- strsrch (*av,":") != NULL && strsrch (*(av+1),":") != NULL &&
- (strcsrch(*(av+2),"j")!=NULL || strcsrch(*(av+2),"b")!=NULL)) {
- if (ac < 3)
- usage();
- else {
- ra = str2ra (*av);
- ac--;
- dec = str2dec (*++av);
- ac--;
- coorsys = wcscsys (*++av);
- }
+ strsrch (*av,":") != NULL && strsrch (*(av+1),":") != NULL &&
+ (strcsrch(*(av+2),"j")!=NULL || strcsrch(*(av+2),"b")!=NULL)) {
+ ra = str2ra (*av);
+ ac--;
+ dec = str2dec (*++av);
+ ac--;
+ coorsys = wcscsys (*++av);
}
/* Read command line parameters */
@@ -335,14 +334,34 @@ char **av;
timestring = (char *) calloc (80,1);
while (fgets (line, 80, fd)) {
lline = strlen (line);
- if ((int)line[lline-1] < 32)
- line[lline-1] = (char) 0;
+ ntok = setoken (&tokens, line, NULL);
+
+ /* Set RA, Dec, and equinox if WCS-generated argument */
+ if (ntok > 3 &&
+ strnsrch (tokens.tok1[0],":",tokens.ltok[0])!=NULL &&
+ strnsrch (tokens.tok1[1],":",tokens.ltok[1])!=NULL &&
+ (strncsrch (tokens.tok1[2],"j",tokens.ltok[1])!=NULL ||
+ strncsrch (tokens.tok1[2],"b",tokens.ltok[1])!=NULL)){
+ ra = str2ra (tokens.tok1[0]);
+ dec = str2dec (tokens.tok1[1]);
+ coorsys = wcscsys (tokens.tok1[2]);
+ itok = 3;
+ }
+ else
+ itok = 0;
if (appdate)
printf ("%s ", line);
- if (nftok > 1)
- sscanf (line, "%s %s", datestring, timestring);
- else
- sscanf (line, "%s", datestring);
+ if (nftok > 1) {
+ strncpy (datestring, tokens.tok1[itok],tokens.ltok[itok]);
+ datestring[tokens.ltok[itok]] = (char) 0;
+ itok++;
+ strncpy (timestring, tokens.tok1[itok],tokens.ltok[itok]);
+ timestring[tokens.ltok[itok]] = (char) 0;
+ }
+ else {
+ strncpy (datestring, tokens.tok1[itok],tokens.ltok[itok]);
+ datestring[tokens.ltok[itok]] = (char) 0;
+ }
ConvertDate (intype, outtype, datestring, timestring);
}
free (datestring);
@@ -399,7 +418,7 @@ usage ()
if (version)
exit (-1);
fprintf (stderr,"Convert date and time between various formats\n");
- fprintf (stderr,"Usage: [-dv][-n dec][-f format] itype2otype [date and/or time] [ra dec sys]\n");
+ fprintf (stderr,"Usage: [-dv][-n dec][-f format] [ra dec sys] itype2otype [date and/or time]\n");
fprintf (stderr," [-dv][-n dec][-f format] itype2otype @file\n");
fprintf(stderr," itype: nfd=ISOFITS fd=FITS, dt=yyyy.mmdd, hr=hh:mm:ss, deg=dd:mm:ss\n");
fprintf(stderr," jd=Julian Date, mjd=Modified Julian Date\n");
@@ -444,7 +463,7 @@ char *timestring; /* Input time string */
char *fitsdate, *newfdate, *stdate;
char temp[64];
char fyear[16];
- char ts0[8];
+ char ts0[16];
char *tchar;
int its, its1;
time_t lts;
@@ -568,6 +587,8 @@ char *timestring; /* Input time string */
if (datestring != NULL) {
if (strcmp (datestring, "now")) {
vdate = atof (datestring);
+ if (vdate > 9999.0)
+ vdate = floor (vdate) * 0.0001;
if (timestring != NULL)
vtime = atof (timestring);
else {
@@ -2256,4 +2277,8 @@ char *timestring; /* Input time string */
*
* Jul 14 2011 Print correct help hjd instead of jhd
* Jul 15 2011 Fix bug so ST's print as time only withoug preceding junk
+ *
+ * Jan 24 2012 Add scale factor to convert date RFN's to DT date
+ * Feb 15 2012 Add option to read ra dec sys before time from file
+ * Mar 27 2012 Fix bug copying string to ts0 found by Michal Szymanski
*/
diff --git a/getfits.c b/getfits.c
index 48afcfc..bf150ac 100644
--- a/getfits.c
+++ b/getfits.c
@@ -1,7 +1,7 @@
/* File getfits.c
* April 13, 2010
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2002-2010
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -44,7 +44,7 @@ static void nextname(); /* Find next available name (namea, nameb, ...) */
static int ExtractFITS();
static int verbose = 0; /* verbose/debugging flag */
-static char *RevMsg = "GETFITS WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "GETFITS WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int version = 0; /* If 1, print only program name and version */
static char outname[128]; /* Name for output image */
static char outdir[256]; /* Output directory pathname */
diff --git a/getftab.c b/getftab.c
index 63e72b3..5b439d6 100644
--- a/getftab.c
+++ b/getftab.c
@@ -1,7 +1,7 @@
/* File getftab.c
* January 10, 2007
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1999-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -40,7 +40,7 @@ static void usage();
static void PrintValues();
static int maxncond = 100;
-static char *RevMsg = "GETFTAB WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "GETFTAB WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose/debugging flag */
static int nfile = 0;
diff --git a/gethead.c b/gethead.c
index 9139100..bc01572 100644
--- a/gethead.c
+++ b/gethead.c
@@ -1,7 +1,7 @@
/* File gethead.c
- * August 12, 2011
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * December 14, 2011
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2011
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -47,7 +47,7 @@ extern char *GetFITShead();
static char nextnsp();
static int PrintValues();
-static char *RevMsg = "GETHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "GETHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose/debugging flag */
static int nfile = 0;
@@ -818,6 +818,19 @@ char *kwd[]; /* Names of keywords for which to print values */
free (mstring);
if (namext != NULL)
free (namext);
+ if (verbose) fprintf (stderr, "GETHEAD: file %s has no content\n",
+ filepath);
+ if (filepath != NULL)
+ free (filepath);
+ return (-1);
+ }
+ else if (strlen (header) == 0) {
+ if (mstring != NULL)
+ free (mstring);
+ if (namext != NULL)
+ free (namext);
+ if (verbose) fprintf (stderr, "GETHEAD: file %s has null at start\n",
+ filepath);
if (filepath != NULL)
free (filepath);
return (-1);
@@ -1430,4 +1443,5 @@ char *string;
* Jun 21 2011 If FILENAME keyword is requested, first column is FILE_NAME
* Aug 12 2011 Fix range of extensions from -x
* Aug 12 2011 Add prefixed range of extensions from -x
+ * Dec 14 2011 If length of header/file content string is zero, exit with error
*/
diff --git a/getpix.c b/getpix.c
index 21f9074..dd0b0d7 100644
--- a/getpix.c
+++ b/getpix.c
@@ -1,7 +1,7 @@
/* File getpix.c
* September 21, 2010
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2010
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -36,7 +36,7 @@ static void usage();
static void PrintPix();
static void procpix();
-static char *RevMsg = "GETPIX WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "GETPIX WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
static int verbose = 0; /* verbose/debugging flag */
static int version = 0; /* If 1, print only program name and version */
diff --git a/gettab.c b/gettab.c
index e05d65d..0b77196 100644
--- a/gettab.c
+++ b/gettab.c
@@ -1,7 +1,7 @@
/* File gettab.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1999-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -40,7 +40,7 @@ static void usage();
static void PrintValues();
static int maxncond = 100;
-static char *RevMsg = "GETTAB WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "GETTAB WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose/debugging flag */
static int nfile = 0;
diff --git a/gsc2cat.c b/gsc2cat.c
index 348c476..8217643 100644
--- a/gsc2cat.c
+++ b/gsc2cat.c
@@ -1,6 +1,6 @@
/*** File gsc2cat.c
*** November 28, 2007
- *** By Doug Mink, SAO
+ *** By Jessica Mink, SAO
Copyright (C) 2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -37,7 +37,7 @@ static int nlog = 10000;
static void usage();
void SaveGSC2();
-static char *RevMsg = "GSC2CAT WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "GSC2CAT WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
main (ac, av)
int ac;
diff --git a/httpget.c b/httpget.c
index 8dd3696..4359d38 100644
--- a/httpget.c
+++ b/httpget.c
@@ -1,6 +1,6 @@
/* File httpget.c
* July 17, 2007
- * By Doug Mink and John Roll
+ * By Jessica Mink and John Roll
* Test http access to scat
* Load with -lnsl -lsocket
diff --git a/i2f.c b/i2f.c
index 1c141ee..aa87267 100644
--- a/i2f.c
+++ b/i2f.c
@@ -1,7 +1,7 @@
/* File i2f.c
* May 11 2009
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2009
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -34,7 +34,7 @@ static void usage();
static void IRAFtoFITS ();
static int verbose = 0; /* verbose/debugging flag */
-static char *RevMsg = "I2F WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "I2F WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int version = 0; /* If 1, print only program name and version */
static int delirafkey = 0; /* If 1, delete IRAF .imh keywords */
static int deliraffile = 0; /* If 1, delete IRAF .imh files */
diff --git a/imcat.c b/imcat.c
index 1255a51..7e532fe 100644
--- a/imcat.c
+++ b/imcat.c
@@ -1,7 +1,7 @@
/* File imcat.c
* June 3, 2010
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2010
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -65,7 +65,7 @@ extern void setdateobs();
extern void setparm();
extern void setnpix();
-static char *RevMsg = "WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose/debugging flag */
static int wfile = 0; /* True to print output file */
@@ -2426,7 +2426,7 @@ double *decmin, *decmax; /* Declination limits in degrees (returned) */
* Jul 9 2008 Free catalog arrays at end of program not of image
* Nov 17 2008 Drop computed spectral type from Tycho and Tycho-2 catalogs
*
- * Sep 25 2009 Add FreeBuffers() and AllocBuffers() after Douglas Burke
+ * Sep 25 2009 Add FreeBuffers() and AllocBuffers() after Jessicalas Burke
* Nov 10 2009 Fix image limits for 90 degree rotation
* Nov 10 2009 Allocat MAXNMAG magnitude vectors
* Nov 18 2009 Add UCAC3 catalog
diff --git a/imextract.c b/imextract.c
index 9fc40f9..2dcdbba 100644
--- a/imextract.c
+++ b/imextract.c
@@ -1,7 +1,7 @@
/* File imextract.c
* November 12, 2009
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1999-2009
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -37,7 +37,7 @@
static void usage();
static int ExtractImage();
-static char *RevMsg = "IMEXTRACT WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMEXTRACT WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose flag */
static int krename = 0;
diff --git a/imfill.c b/imfill.c
index ddcb38a..3c81133 100644
--- a/imfill.c
+++ b/imfill.c
@@ -1,7 +1,7 @@
/* File imfill.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -63,7 +63,7 @@ static char *badheader; /* FITS bad pixel header */
static double minpixval = -9999.0; /* Minimum good pixel value */
static double maxpixval = -9999.0; /* Maximum good pixel value */
-static char *RevMsg = "IMFILL WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMFILL WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/imhead.c b/imhead.c
index ab61f61..e653304 100644
--- a/imhead.c
+++ b/imhead.c
@@ -1,7 +1,7 @@
/* File imhead.c
* December 1, 2008
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2008
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -39,7 +39,7 @@ static int nfiles = 0; /* Nuber of files for headers */
static int verbose = 0; /* verbose/debugging flag */
static int fitsout = 0; /* If 1, write exact FITS header */
static int zbitpix = 0; /* If 1, set BITPIX to 0 for dataless header */
-static char *RevMsg = "IMHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "IMHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
static int version = 0; /* If 1, print only program name and version */
int
diff --git a/immatch.c b/immatch.c
index 337a0e7..d1a3057 100644
--- a/immatch.c
+++ b/immatch.c
@@ -1,8 +1,8 @@
/* File immatch.c
* April 6, 2007
- * By Doug Mink, after Elwood Downey
+ * By Jessica Mink, after Elwood Downey
* (Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1997-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -41,7 +41,7 @@ static void MatchCat();
#define MAXFILES 1000
static int maxnfile = MAXFILES;
-static char *RevMsg = "WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose/debugging flag */
static int rot = 0;
diff --git a/imresize.c b/imresize.c
index 16b86c7..15f8412 100644
--- a/imresize.c
+++ b/imresize.c
@@ -1,7 +1,7 @@
/* File imresize.c
* June 12, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -62,7 +62,7 @@ static int bitpix = 0; /* Bits per output pixel */
static int mean = 0; /* 1 if mean for regrouped pixels */
static int northup = 0; /* 1 to rotate to north up, east left */
-static char *RevMsg = "IMRESIZE WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMRESIZE WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/imrot.c b/imrot.c
index 79f1718..6d3ecdc 100644
--- a/imrot.c
+++ b/imrot.c
@@ -1,7 +1,7 @@
/* File imrot.c
* September 25, 2009
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
*/
#include <stdio.h>
@@ -38,7 +38,7 @@ static int inverted = 0; /* If 1, invert intensity (-1 * (z-zmax)) */
static int deletewcs = 0; /* If 1, delete FITS WCS keywords in image */
static int rotatewcs = 1; /* If 1, rotate FITS WCS keywords in image */
static int extnum = 0; /* Use extension number instead of EXTNAME for output */
-static char *RevMsg = "IMROT WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMROT WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/imsize.c b/imsize.c
index 2fcb825..a0315d9 100644
--- a/imsize.c
+++ b/imsize.c
@@ -1,7 +1,7 @@
/* File imsize.c
* March 24, 2009
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2009
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -44,7 +44,7 @@ static char coorsys[8];
static double size = 0.0;
static double frac = 0.0;
-static char *RevMsg = "IMSIZE WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMSIZE WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose/debugging flag */
static int dss = 0; /* Flag to drop extra stuff for DSS */
diff --git a/imsmooth.c b/imsmooth.c
index 2d00d03..55dc157 100644
--- a/imsmooth.c
+++ b/imsmooth.c
@@ -1,7 +1,7 @@
/* File imsmooth.c
* January 5, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2005-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -55,7 +55,7 @@ static double ghwidth = 1.0; /* Gaussian half-width */
static int filter = 0; /* Filter code */
static int nlog = 100; /* Number of lines between log messages */
-static char *RevMsg = "IMSMOOTH WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMSMOOTH WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/imstack.c b/imstack.c
index d48f883..f4f50a2 100644
--- a/imstack.c
+++ b/imstack.c
@@ -1,7 +1,7 @@
/* File imstack.c
* August 30, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1997-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -37,7 +37,7 @@ static int StackImage();
static int verbose = 0; /* verbose flag */
static int wfits = 1; /* if 1, write FITS header before data */
static char *newname = NULL;
-static char *RevMsg = "IMSTACK WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMSTACK WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int nfiles = 0;
static int nbstack = 0;
static int extend = 0; /* If 1, output multi-extension FITS file */
diff --git a/imstar.c b/imstar.c
index 513312a..65c95a6 100644
--- a/imstar.c
+++ b/imstar.c
@@ -1,7 +1,7 @@
/* File imstar.c
* October 15, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -41,7 +41,7 @@
#define MAXFILES 1000
static int maxnfile = MAXFILES;
-static char *RevMsg = "IMSTAR WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "IMSTAR WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose flag */
static int debug = 0; /* debugging flag */
diff --git a/imwcs.c b/imwcs.c
index 18e7e64..d3e588c 100644
--- a/imwcs.c
+++ b/imwcs.c
@@ -1,8 +1,8 @@
/* File imwcs.c
* April 6, 2007
- * By Doug Mink, after Elwood Downey
+ * By Jessica Mink, after Elwood Downey
* (Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -40,7 +40,7 @@ static int maxnfile = MAXFILES;
static void PrintUsage();
static void FitWCS();
-static char *RevMsg = "WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose/debugging flag */
static int writeheader = 0; /* write header fields; else read-only */
diff --git a/isfits.c b/isfits.c
index 7aafa25..aa24788 100644
--- a/isfits.c
+++ b/isfits.c
@@ -1,9 +1,9 @@
/* File isfits.c
- * October 29, 2010
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * December 14, 2011
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
- Copyright (C) 2008-2010
+ Copyright (C) 2008-2011
Smithsonian Astrophysical Observatory, Cambridge, MA USA
This program is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@
#include <string.h>
#include "libwcs/fitsfile.h"
-static char *RevMsg = "ISFITS WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "ISFITS WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
@@ -49,7 +49,7 @@ char **av;
exit (1);
}
- /* check to see if this is a number */
+ /* check to see if this is a FITS file */
else
printf ("%d\n", isfits (str));
@@ -58,4 +58,6 @@ char **av;
/* Apr 25 2008 New program
*
* Oct 29 2010 Include fitsfile.h instead of fitshead.h
+ *
+ * Dec 14 2011 Fix comments
*/
diff --git a/isimlist.c b/isimlist.c
index f80b134..4c7ad41 100644
--- a/isimlist.c
+++ b/isimlist.c
@@ -1,7 +1,7 @@
/* File isimlist.c
* January 30, 2009
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2009
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -28,7 +28,7 @@
#include <string.h>
#include "libwcs/fitshead.h"
-static char *RevMsg = "ISIMLIST WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "ISIMLIST WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/isnum.c b/isnum.c
index 1dde7b8..a770593 100644
--- a/isnum.c
+++ b/isnum.c
@@ -1,7 +1,7 @@
/* File isnum.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2001-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -28,7 +28,7 @@
#include <string.h>
#include "libwcs/fitshead.h"
-static char *RevMsg = "ISNUM WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "ISNUM WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/isrange.c b/isrange.c
index 5843994..48e0a5b 100644
--- a/isrange.c
+++ b/isrange.c
@@ -1,7 +1,7 @@
/* File isrange.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2001-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -27,7 +27,7 @@
#include <stdlib.h>
#include <string.h>
-static char *RevMsg = "ISRANGE WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "ISRANGE WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int isrange();
diff --git a/keyhead.c b/keyhead.c
index 024f9e2..fcf5855 100644
--- a/keyhead.c
+++ b/keyhead.c
@@ -1,7 +1,7 @@
/* File keyhead.c
* August 19, 2009
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1997-2009
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -50,7 +50,7 @@ static int logfile = 0;
static int nproc = 0;
static int first_file = 1;
-static char *RevMsg = "KEYHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "KEYHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/libwcs/Makefile b/libwcs/Makefile
index e0e0d09..ec2fae0 100644
--- a/libwcs/Makefile
+++ b/libwcs/Makefile
@@ -1,4 +1,4 @@
-CFLAGS= -g
+CFLAGS= -g -D_FILE_OFFSET_BITS=64
CC= cc
OBJS = imsetwcs.o imgetwcs.o matchstar.o findstar.o daoread.o wcscon.o \
diff --git a/libwcs/NEWS b/libwcs/NEWS
index 4adb3aa..a2fe5a4 100644
--- a/libwcs/NEWS
+++ b/libwcs/NEWS
@@ -1,5 +1,9 @@
WCSTools WCS subroutine release history
+Version 3.8.5 (April 12, 2012)
+imio.c: Change 8-bit pixel values from char to unsigned char
+fitsfile.c: Always check first 8 characters of FITS files for "SIMPLE"
+
Version 3.8.4 (September 1, 2011)
imgetwcs.c, wcsinit.c, wcs.c, wcs.h, worldpos.c: Add TPV WCS for TAN with PV terms
diff --git a/libwcs/binread.c b/libwcs/binread.c
index f05e3de..e934c5a 100644
--- a/libwcs/binread.c
+++ b/libwcs/binread.c
@@ -1,8 +1,8 @@
/*** File libwcs/binread.c
- *** September 25, 2009
+ *** September 16, 2011
*** By Doug Mink, dmink at cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
- *** Copyright (C) 1998-2009
+ *** Copyright (C) 1998-2011
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
This library is free software; you can redistribute it and/or
@@ -44,14 +44,15 @@ char bindir[64]="/data/astrocat";
static double *tdist; /* Array of distances to sources from search center */
static int ndist = 0;
-#include <unistd.h>
#include <stdlib.h>
+#include <unistd.h>
#include <stdio.h>
+#include <fcntl.h>
+#include <sys/file.h>
#include <math.h>
+#include <errno.h>
#include <string.h>
-#include <strings.h>
#include <sys/types.h>
-#include <fcntl.h>
#include "wcs.h"
#include "fitsfile.h"
#include "wcscat.h"
@@ -1312,15 +1313,15 @@ int istar; /* Star sequence number in binary catalog */
st->num = (double) st->xno;
break;
case 2:
- bcopy ((char *)&st->xno, (char *) &ino, 4);
+ memcpy ((char *) &ino, (char *)&st->xno, 4);
st->num = 0.0001 * (double) ino;
break;
case 3:
- bcopy ((char *)&st->xno, (char *) &ino, 4);
+ memcpy ((char *) &ino, (char *)&st->xno, 4);
st->num = 0.00001 * (double) ino;
break;
case 4:
- bcopy ((char *)&st->xno, (char *) &ino, 4);
+ memcpy ((char *) &ino, (char *)&st->xno, 4);
st->num = (double) ino;
break;
default:
@@ -1595,4 +1596,6 @@ char *filename; /* Name of file to check */
* Nov 28 2007 Move moveb() to catutil.c
*
* Sep 25 2009 Call movebuff() instead of moveb() and move mvebuff() to catutil.c
+ *
+ * Sep 16 2011 Change depricated bcopy() to memcpy()
*/
diff --git a/libwcs/dateutil.c b/libwcs/dateutil.c
index 6a6772d..afee4f0 100644
--- a/libwcs/dateutil.c
+++ b/libwcs/dateutil.c
@@ -53,7 +53,9 @@
tsu = UT seconds since 1970-01-01T00:00 (used as Unix system time)
tsd = UT seconds of current day
ut = Universal Time (UTC)
- et = Ephemeris Time (or TDB or TT)
+ et = Ephemeris Time (or TDB or TT) = TAI + 32.184 seconds
+ tai = International Atomic Time (Temps Atomique International) = ET - 32.184 seconds
+ gps = GPS time = TAI - 19 seconds
mst = Mean Greenwich Sidereal Time
gst = Greenwich Sidereal Time (includes nutation)
lst = Local Sidereal Time (includes nutation) (longitude must be set)
@@ -122,6 +124,10 @@
* Convert date (yyyy.ddmm) and time (hh.mmsss) to ephemeris time
* edt2dt (date, time)
* Convert ephemeris date (yyyy.ddmm) and time (hh.mmsss) to UT
+ * dt2tai (date, time)
+ * Convert date (yyyy.ddmm) and time (hh.mmsss) to TAI date and time
+ * tai2dt (date, time)
+ * Convert TAI date (yyyy.ddmm) and time (hh.mmsss) to UT
* ts2ets (tsec)
* Convert from UT in seconds since 1950-01-01 to ET in same format
* ets2ts (tsec)
@@ -2005,12 +2011,14 @@ char *string; /* FITS date string, which may be:
/* TAI-UTC from the U.S. Naval Observatory */
/* ftp://maia.usno.navy.mil/ser7/tai-utc.dat */
-static double taijd[23]={2441317.5, 2441499.5, 2441683.5, 2442048.5, 2442413.5,
+static double taijd[26]={2441317.5, 2441499.5, 2441683.5, 2442048.5, 2442413.5,
2442778.5, 2443144.5, 2443509.5, 2443874.5, 2444239.5, 2444786.5,
2445151.5, 2445516.5, 2446247.5, 2447161.5, 2447892.5, 2448257.5,
- 2448804.5, 2449169.5, 2449534.5, 2450083.5, 2450630.5, 2451179.5};
-static double taidt[23]={10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,
- 20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0,31.0,32.0};
+ 2448804.5, 2449169.5, 2449534.5, 2450083.5, 2450630.5, 2451179.5,
+ 2453736.5, 2454832.5, 2456293.5};
+static double taidt[26]={10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,
+ 20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0,31.0,32.0,
+ 33.0,34.0,35.0};
static double dttab[173]={13.7,13.4,13.1,12.9,12.7,12.6,12.5,12.5,12.5,12.5,
12.5,12.5,12.5,12.5,12.5,12.5,12.5,12.4,12.3,12.2,12.0,11.7,11.4,
11.1,10.6,10.2, 9.6, 9.1, 8.6, 8.0, 7.5, 7.0, 6.6, 6.3, 6.0, 5.8,
@@ -2029,6 +2037,93 @@ static double dttab[173]={13.7,13.4,13.1,12.9,12.7,12.6,12.5,12.5,12.5,12.5,
42.23};
+/* TAI2FD-- convert from TAI in FITS format to UT in FITS format */
+
+char *
+tai2fd (string)
+
+char *string; /* FITS date string, which may be:
+ fractional year
+ dd/mm/yy (FITS standard before 2000)
+ dd-mm-yy (nonstandard use before 2000)
+ yyyy-mm-dd (FITS standard after 1999)
+ yyyy-mm-ddThh:mm:ss.ss (FITS standard after 1999) */
+{
+ double dj0, dj, tsec, dt;
+
+ dj0 = fd2jd (string);
+ dt = utdt (dj0);
+ dj = dj0 - (dt / 86400.0);
+ dt = utdt (dj);
+ tsec = fd2ts (string);
+ tsec = tsec - dt + 32.184;
+ return (ts2fd (tsec));
+}
+
+
+/* FD2TAI-- convert from UT in FITS format to TAI in FITS format */
+
+char *
+fd2tai (string)
+
+char *string; /* FITS date string, which may be:
+ fractional year
+ dd/mm/yy (FITS standard before 2000)
+ dd-mm-yy (nonstandard use before 2000)
+ yyyy-mm-dd (FITS standard after 1999)
+ yyyy-mm-ddThh:mm:ss.ss (FITS standard after 1999) */
+{
+ double dj, tsec, dt;
+
+ dj = fd2jd (string);
+ dt = utdt (dj);
+ tsec = fd2ts (string);
+ tsec = tsec + dt - 32.184;
+ return (ts2fd (tsec));
+}
+
+
+/* DT2TAI-- convert from UT as yyyy.mmdd hh.mmssss to TAI in same format */
+
+void
+dt2tai (date, time)
+double *date; /* Date as yyyy.mmdd */
+double *time; /* Time as hh.mmssxxxx
+ *if time<0, it is time as -(fraction of a day) */
+{
+ double dj, dt, tsec;
+
+ dj = dt2jd (*date, *time);
+ dt = utdt (dj);
+ tsec = dt2ts (*date, *time);
+ tsec = tsec + dt - 32.184;
+ ts2dt (tsec, date, time);
+ return;
+}
+
+
+/* TAI2DT-- convert from TAI as yyyy.mmdd hh.mmssss to UT in same format */
+
+void
+tai2dt (date, time)
+double *date; /* Date as yyyy.mmdd */
+double *time; /* Time as hh.mmssxxxx
+ *if time<0, it is time as -(fraction of a day) */
+{
+ double dj, dt, tsec, tsec0;
+
+ dj = dt2jd (*date, *time);
+ dt = utdt (dj);
+ tsec0 = dt2ts (*date, *time);
+ tsec = tsec0 + dt;
+ dj = ts2jd (tsec);
+ dt = utdt (dj);
+ tsec = tsec0 + dt + 32.184;
+ ts2dt (tsec, date, time);
+ return;
+}
+
+
/* ET2FD-- convert from ET (or TDT or TT) in FITS format to UT in FITS format */
char *
@@ -2196,7 +2291,7 @@ double dj; /* Julian Date (UT) */
if (dj >= taijd[i])
dt = taidt[i];
}
- dt = dt + 32.84;
+ dt = dt + 32.184;
}
/* For 1800-01-01 to 1972-01-01, use table of ET-UT from AE */
@@ -4454,4 +4549,6 @@ double dnum, dm;
* Oct 8 2008 Clean up sidereal time computations
*
* Sep 24 2009 Add end to comment "Coefficients for fundamental arguments"
+ *
+ * Jan 11 2012 Add TAI, TT, GPS time
*/
diff --git a/libwcs/fitsfile.c b/libwcs/fitsfile.c
index 9ef0707..944c390 100644
--- a/libwcs/fitsfile.c
+++ b/libwcs/fitsfile.c
@@ -1,8 +1,8 @@
/*** File libwcs/fitsfile.c
- *** March 31, 2010
+ *** September 15, 2011
*** By Doug Mink, dmink at cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
- *** Copyright (C) 1996-2010
+ *** Copyright (C) 1996-2011
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
This library is free software; you can redistribute it and/or
@@ -87,15 +87,15 @@
static int verbose=0; /* Print diagnostics */
static char fitserrmsg[80];
-static int fitsinherit = 1; /* Append primary header to extension header */
+static int fitsinherit = 1; /* Append primary header to extension header */
void
setfitsinherit (inh)
int inh;
{fitsinherit = inh; return;}
-static int ibhead = 0; /* Number of bytes read before header starts */
+static off_t ibhead = 0; /* Number of bytes read before header starts */
-int
+off_t
getfitsskip()
{return (ibhead);}
@@ -545,7 +545,8 @@ int *nbhead; /* Number of bytes before start of data (returned) */
int fd;
char *header; /* FITS image header (filled) */
int nbytes, i, ndiff;
- int nbr, irec, offset;
+ int nbr, irec;
+ off_t offset;
char *mwcs; /* Pointer to WCS name separated by % */
char *headstart;
char *newhead;
@@ -641,7 +642,8 @@ int nlog; /* Note progress mod this rows */
int fd; /* File descriptor */
int nbimage, naxis1, naxis2, bytepix, nbread;
int bitpix, naxis, nblocks, nbytes, nbr;
- int x1, y1, nbline, impos, nblin, nyleft;
+ int x1, y1, nbline, nyleft;
+ off_t impos, nblin;
char *image, *imline, *imlast;
int ilog = 0;
int row;
@@ -2091,16 +2093,16 @@ char *filename; /* Name of file for which to find size */
if (strchr (filename, '='))
return (0);
- /* Then check file extension */
- else if (strsrch (filename, ".fit") ||
- strsrch (filename, ".fits") ||
- strsrch (filename, ".fts"))
- return (1);
-
/* Check for stdin (input from pipe) */
else if (!strcasecmp (filename,"stdin"))
return (1);
+ /* Then check file extension
+ else if (strsrch (filename, ".fit") ||
+ strsrch (filename, ".fits") ||
+ strsrch (filename, ".fts"))
+ return (1); */
+
/* If no FITS file extension, try opening the file */
else {
if ((comma = strchr (filename,',')))
@@ -2299,4 +2301,8 @@ char *from, *last, *to;
*
* Mar 29 2010 In fitswhead(), always pad blocks to 2880 bytes with spaces
* Mar 31 2010 In fitsrhead(), fix bug reading long primary headers
+ *
+ * Sep 15 2011 In fitsrsect() declare impos and nblin off_t
+ * Sep 15 2011 In fitsrtail() declare offset off_t
+ * Sep 15 2011 Declare global variable ibhead off_t
*/
diff --git a/libwcs/imhfile.c b/libwcs/imhfile.c
index a6dea7b..b618686 100644
--- a/libwcs/imhfile.c
+++ b/libwcs/imhfile.c
@@ -1,8 +1,8 @@
/*** File imhfile.c
- *** May 20, 2011
- *** By Doug Mink, dmink at cfa.harvard.edu
+ *** March 27, 2012
+ *** By Jessica Mink, jmink at cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
- *** Copyright (C) 1996-2011
+ *** Copyright (C) 1996-2012
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
This library is free software; you can redistribute it and/or
@@ -20,8 +20,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Correspondence concerning WCSTools should be addressed as follows:
- Internet email: dmink at cfa.harvard.edu
- Postal address: Doug Mink
+ Internet email: jmink at cfa.harvard.edu
+ Postal address: Jessica Mink
Smithsonian Astrophysical Observatory
60 Garden St.
Cambridge, MA 02138 USA
@@ -1033,7 +1033,7 @@ char *pixname; /* IRAF pixel file pathname */
char *hdrname; /* IRAF image header file pathname */
{
- int len;
+ int len, plen;
char *newpixname;
newpixname = (char *) calloc (SZ_IM2PIXFILE, 1);
@@ -1053,7 +1053,11 @@ char *hdrname; /* IRAF image header file pathname */
/* add name */
newpixname[len] = '\0';
- (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE);
+ plen = strlen (pixname) - 4;
+ if (len + plen > SZ_IM2PIXFILE)
+ (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE - len);
+ else
+ (void)strncat (newpixname, &pixname[4], plen);
}
/* Bare pixel file with no path is assumed to be same as HDR$filename */
@@ -1932,4 +1936,6 @@ FILE *diskfile; /* Descriptor of file for which to find size */
* Jan 8 2007 Align header and image buffers properly by 4 and by BITPIX
*
* May 20 2011 Free newpixname, not pixname in irafwimage()
+ *
+ * Mar 27 2012 Fix pixname's appending to newpixname to avoid overflow
*/
diff --git a/libwcs/imio.c b/libwcs/imio.c
index 232f2b1..b66334e 100644
--- a/libwcs/imio.c
+++ b/libwcs/imio.c
@@ -1,8 +1,8 @@
/*** File wcslib/imio.c
- *** June 11, 2007
- *** By Doug Mink, dmink at cfa.harvard.edu
+ *** April 12, 2012
+ *** By Jessica Mink, jmink at cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
- *** Copyright (C) 1996-2007
+ *** Copyright (C) 1996-2012
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
This library is free software; you can redistribute it and/or
@@ -120,6 +120,7 @@ int y; /* Zero-based vertical pixel number */
{
short *im2;
int *im4;
+ unsigned char *im1;
unsigned short *imu;
float *imr;
double *imd;
@@ -135,7 +136,8 @@ int y; /* Zero-based vertical pixel number */
switch (bitpix) {
case 8:
- dpix = (double) image[(y*w) + x];
+ im1 = (unsigned char *)image;
+ dpix = (double) im1[(y*w) + x];
break;
case 16:
@@ -214,11 +216,12 @@ int y;
double dpix;
{
- short *im2;
+ double *imd;
+ float *imr;
int *im4;
+ short *im2;
unsigned short *imu;
- float *imr;
- double *imd;
+ unsigned char *im1;
/* Return if coordinates are not inside image */
if (x < 0 || x >= w)
@@ -232,10 +235,11 @@ double dpix;
switch (bitpix) {
case 8:
+ im1 = (unsigned char *)image;
if (dpix < 0)
- image[(y*w) + x] = (char) (dpix - 0.5);
+ im1[(y*w) + x] = (unsigned char) (dpix - 0.5);
else
- image[(y*w) + x] = (char) (dpix + 0.5);
+ im1[(y*w) + x] = (unsigned char) (dpix + 0.5);
break;
case 16:
@@ -318,11 +322,12 @@ int y; /* Zero-based vertical pixel number */
double dpix; /* Value to add to pixel */
{
- short *im2;
+ double *imd;
+ float *imr;
int *im4;
+ short *im2;
unsigned short *imu;
- float *imr;
- double *imd;
+ unsigned char *im1;
int ipix;
/* Return if coordinates are not inside image */
@@ -338,10 +343,11 @@ double dpix; /* Value to add to pixel */
switch (bitpix) {
case 8:
+ im1 = (unsigned char *)image;
if (dpix < 0)
- image[ipix] = image[ipix] + (char) (dpix - 0.5);
+ image[ipix] = im1[ipix] + (unsigned char) (dpix - 0.5);
else
- image[ipix] = image[ipix] + (char) (dpix + 0.5);
+ image[ipix] = im1[ipix] + (unsigned char) (dpix + 0.5);
break;
case 16:
@@ -401,11 +407,12 @@ int w2; /* Number of horizontal pixels in output image */
int x2, y2; /* Row and column for output pixel */
{
- short *ims1, *ims2;
+ double dpix, *imd1, *imd2;
+ float rpix, *imr1, *imr2;
int *imi1, *imi2;
+ short *ims1, *ims2;
unsigned short *imu1, *imu2;
- float rpix, *imr1, *imr2;
- double dpix, *imd1, *imd2;
+ unsigned char *imc1, *imc2;
if (x1 < 0 || x2 < 0 || x1 >= w1 || x2 >= w2)
return;
@@ -415,61 +422,59 @@ int x2, y2; /* Row and column for output pixel */
switch (bitpix1) {
case 8:
+ imc1 = (unsigned char *)image1;
switch (bitpix2) {
case 8:
- image2[(y2*w2) + x2] = image1[(y1*w1) + x1];
+ imc2 = (unsigned char *)image2;
+ imc2[(y2*w2) + x2] = imc1[(y1*w1) + x1];
break;
case 16:
ims2 = (short *)image2;
- ims2[(y2*w2) + x2] = image1[(y1*w1) + x1];
+ ims2[(y2*w2) + x2] = (short) imc1[(y1*w1) + x1];
break;
case 32:
imi2 = (int *)image2;
- imi2[(y2*w2) + x2] = (int) image1[(y1*w1) + x1];
+ imi2[(y2*w2) + x2] = (int) imc1[(y1*w1) + x1];
break;
case -16:
imu2 = (unsigned short *)image2;
- imu2[(y2*w2) + x2] = (unsigned short) image1[(y1*w1) + x1];
+ imu2[(y2*w2) + x2] = (unsigned short) imc1[(y1*w1) + x1];
break;
case -32:
imr2 = (float *)image2;
- imr2[(y2*w2) + x2] = (float) image1[(y1*w1) + x1];
+ imr2[(y2*w2) + x2] = (float) imc1[(y1*w1) + x1];
break;
case -64:
imd2 = (double *)image2;
- imd2[(y2*w2) + x2] = (double) image1[(y1*w1) + x1];
+ imd2[(y2*w2) + x2] = (double) imc1[(y1*w1) + x1];
break;
}
break;
case 16:
+ ims1 = (short *)image1;
switch (bitpix2) {
case 8:
- ims1 = (short *)image1;
- image2[(y2*w2) + x2] = (char) ims1[(y1*w1) + x1];
+ imc2 = (unsigned char *)image1;
+ imc2[(y2*w2) + x2] = (unsigned char) ims1[(y1*w1) + x1];
break;
case 16:
- ims1 = (short *)image1;
ims2 = (short *)image2;
ims2[(y2*w2) + x2] = ims1[(y1*w1) + x1];
break;
case 32:
- ims1 = (short *)image1;
imi2 = (int *)image2;
imi2[(y2*w2) + x2] = (int) ims1[(y1*w1) + x1];
break;
case -16:
- ims1 = (short *)image1;
imu2 = (unsigned short *)image2;
imu2[(y2*w2) + x2] = (unsigned short) ims1[(y1*w1) + x1];
break;
case -32:
- ims1 = (short *)image1;
imr2 = (float *)image2;
imr2[(y2*w2) + x2] = (float) ims1[(y1*w1) + x1];
break;
case -64:
- ims1 = (short *)image1;
imd2 = (double *)image2;
imd2[(y2*w2) + x2] = (double) ims1[(y1*w1) + x1];
break;
@@ -477,33 +482,29 @@ int x2, y2; /* Row and column for output pixel */
break;
case 32:
+ imi1 = (int *)image1;
switch (bitpix2) {
case 8:
- imi1 = (int *)image1;
- image2[(y2*w2) + x2] = (char) imi1[(y1*w1) + x1];
+ imc2 = (unsigned char *)image2;
+ imc2[(y2*w2) + x2] = (unsigned char) imi1[(y1*w1) + x1];
break;
case 16:
- imi1 = (int *)image1;
ims2 = (short *)image2;
ims2[(y2*w2) + x2] = (short) imi1[(y1*w1) + x1];
break;
case 32:
- imi1 = (int *)image1;
imi2 = (int *)image2;
imi2[(y2*w2) + x2] = imi1[(y1*w1) + x1];
break;
case -16:
- imi1 = (int *)image1;
imu2 = (unsigned short *)image2;
imu2[(y2*w2) + x2] = (unsigned short) imi1[(y1*w1) + x1];
break;
case -32:
- imi1 = (int *)image1;
imr2 = (float *)image2;
imr2[(y2*w2) + x2] = (float) imi1[(y1*w1) + x1];
break;
case -64:
- imi1 = (int *)image1;
imd2 = (double *)image2;
imd2[(y2*w2) + x2] = (double) imi1[(y1*w1) + x1];
break;
@@ -511,33 +512,29 @@ int x2, y2; /* Row and column for output pixel */
break;
case -16:
+ imu1 = (unsigned short *)image1;
switch (bitpix2) {
case 8:
- imu1 = (unsigned short *)image1;
- image2[(y2*w2) + x2] = (char) imu1[(y1*w1) + x1];
+ imc2 = (unsigned char *)image2;
+ imc2[(y2*w2) + x2] = (unsigned char) imu1[(y1*w1) + x1];
break;
case 16:
- imu1 = (unsigned short *)image1;
ims2 = (short *)image2;
ims2[(y2*w2) + x2] = (short) imu1[(y1*w1) + x1];
break;
case 32:
- imu1 = (unsigned short *)image1;
imi2 = (int *)image2;
imi2[(y2*w2) + x2] = (int) imu1[(y1*w1) + x1];
break;
case -16:
- imu1 = (unsigned short *)image1;
imu2 = (unsigned short *)image2;
imu2[(y2*w2) + x2] = imu1[(y1*w1) + x1];
break;
case -32:
- imu1 = (unsigned short *)image1;
imr2 = (float *)image2;
imr2[(y2*w2) + x2] = (float) imu1[(y1*w1) + x1];
break;
case -64:
- imu1 = (unsigned short *)image1;
imd2 = (double *)image2;
imd2[(y2*w2) + x2] = (double) imu1[(y1*w1) + x1];
break;
@@ -549,10 +546,11 @@ int x2, y2; /* Row and column for output pixel */
rpix = imr1[(y1*w1) + x1];
switch (bitpix2) {
case 8:
+ imc2 = (unsigned char *)image2;
if (rpix < 0.0)
- image2[(y2*w2) + x2] = (char) (rpix - 0.5);
+ imc2[(y2*w2) + x2] = (unsigned char) 0;
else
- image2[(y2*w2) + x2] = (char) (rpix + 0.5);
+ imc2[(y2*w2) + x2] = (unsigned char) (rpix + 0.5);
break;
case 16:
ims2 = (short *)image2;
@@ -591,11 +589,11 @@ int x2, y2; /* Row and column for output pixel */
dpix = imd1[(y1*w1) + x1];
switch (bitpix2) {
case 8:
- imd1 = (double *)image1;
+ imc2 = (unsigned char *)image2;
if (dpix < 0.0)
- image2[(y2*w2) + x2] = (char) (dpix - 0.5);
+ imc2[(y2*w2) + x2] = (unsigned char) 0;
else
- image2[(y2*w2) + x2] = (char) (dpix + 0.5);
+ imc2[(y2*w2) + x2] = (unsigned char) (dpix + 0.5);
break;
case 16:
ims2 = (short *)image2;
@@ -656,14 +654,15 @@ int npix; /* Number of pixels to check */
double dmax = 0.0;
double ipd;
int ipix, pix2;
- char imaxc, ipc;
+ unsigned char *imc, imaxc, ipc;
pix2 = pix1 + npix;
switch (bitpix) {
case 8:
- imaxc = *(image + pix1);
+ imc = (unsigned char *)(image + pix1);
+ imaxc = *(im2+ipix);
for (ipix = pix1; ipix < pix2; ipix++) {
ipc = *(image + ipix);
if (ipc > imaxc)
@@ -758,7 +757,7 @@ int npix; /* Number of pixels to check */
double *imd, ipd;
double dmin = 0.0;
int ipix, pix2;
- char cmin, cp;
+ unsigned char *imc, cmin, cp;
pix2 = pix1 + npix;
@@ -766,6 +765,7 @@ int npix; /* Number of pixels to check */
case 8:
cmin = *(image + pix1);
+ imc = (unsigned char *)image;
for (ipix = pix1; ipix < pix2; ipix++) {
cp = *(image + ipix);
if (cp < cmin)
@@ -856,7 +856,7 @@ int npix; /* Number of pixels to extract */
double dpix; /* Value to add to pixels */
{
- char *imc, ccon;
+ unsigned char *imc, ccon;
short *im2, jcon;
int *im4, icon;
unsigned short *imu, ucon;
@@ -872,11 +872,11 @@ double dpix; /* Value to add to pixels */
switch (bitpix) {
case 8:
- imc = image + pix1;
+ imc = (unsigned char *) (image + pix1);
if (dpix < 0)
- ccon = (char) (dpix - 0.5);
+ ccon = (unsigned char) (dpix - 0.5);
else
- ccon = (char) (dpix + 0.5);
+ ccon = (unsigned char) (dpix + 0.5);
for (ipix = pix1; ipix < pix2; ipix++)
*imc++ += ccon;
break;
@@ -1538,4 +1538,6 @@ imswapped ()
*
* Jan 8 2007 Include fitsfile.h instead of imio.h
* Jun 11 2007 Add minvec() and speed up maxvec()
+ *
+ * Apr 12 2012 Fix 8-bit variables to be unsigned char
*/
diff --git a/libwcs/matchstar.c b/libwcs/matchstar.c
index 67b9485..375c150 100644
--- a/libwcs/matchstar.c
+++ b/libwcs/matchstar.c
@@ -1,8 +1,8 @@
/*** File libwcs/matchstar.c
- *** July 20, 2009
+ *** December 13, 2011
*** By Doug Mink, dmink at cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
- *** Copyright (C) 1996-2009
+ *** Copyright (C) 1996-2011
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
This library is free software; you can redistribute it and/or
@@ -969,7 +969,6 @@ int debug; /* Printed debugging information if not zero */
extern double getsecpix();
extern void getcenter(),getrefpix(),setdcenter(),setrefpix(),setsecpix();
- dmatch = (double) nmatch;
/* Too few hits */
if (nmatch < 2) {
@@ -1045,11 +1044,16 @@ int debug; /* Printed debugging information if not zero */
}
}
}
+ tx = tx + sbx[nmatch-1];
+ ty = ty + sby[nmatch-1];
+ tra = tra + gbra[nmatch-1];
+ tdec = tdec + gbdec[nmatch-1];
/* Reset image center based on star matching */
cra = -99.0;
cdec = -99.0;
getcenter (&cra, &cdec);
+ dmatch = (double) nmatch;
if (cra == -99.0 && cdec == -99.0) {
cra = tra / dmatch;
cdec = tdec / dmatch;
@@ -2039,4 +2043,6 @@ int nitmax;
*
* Jul 20 2009 Fixed matched star wrap around RA = 0:00:00
* Jul 20 2009 Fixed matched star wrap for bad matches
+ *
+ * Dec 13 2009 In WCSMatch(), add last x,y,ra,dec so means are means of all
*/
diff --git a/libwcs/temp b/libwcs/temp
index 28ca707..c6ba854 100644
--- a/libwcs/temp
+++ b/libwcs/temp
@@ -1,52 +1 @@
-/* poly.h
-*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-*
-* Part of: A program using polynomial fits
-* Author: E.BERTIN (IAP)
-* Contents: Include for poly.c
-* Last modified: 03/03/2004
-*
-*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-*/
-
-#ifndef _POLY_H_
-#define _POLY_H_
-
-/*--------------------------------- constants -------------------------------*/
-
-#define POLY_MAXDIM 4 /* Max dimensionality of polynom */
-#define POLY_MAXDEGREE 10 /* Max degree of the polynom */
-
-/*---------------------------------- macros ---------------------------------*/
-
-/*--------------------------- structure definitions -------------------------*/
-
-typedef struct poly
- {
- double *basis; /* Current values of the basis functions */
- double *coeff; /* Polynom coefficients */
- int ncoeff; /* Number of coefficients */
- int *group; /* Groups */
- int ndim; /* dimensionality of the polynom */
- int *degree; /* Degree in each group */
- int ngroup; /* Number of different groups */
- } polystruct;
-
-/*---------------------------------- protos --------------------------------*/
-
-extern polystruct *poly_init(int *group,int ndim,int *degree,int ngroup);
-
-extern double poly_func(polystruct *poly, double *pos);
-
-extern int cholsolve(double *a, double *b, int n),
- *poly_powers(polystruct *poly);
-
-extern void poly_addcste(polystruct *poly, double *cste),
- poly_end(polystruct *poly),
- poly_fit(polystruct *poly, double *x, double *y,
- double *w, int ndata, double *extbasis),
- poly_solve(double *a, double *b, int n),
- svdsolve(double *a, double *b, int m, int n,
- double *vmat, double *wmat);
-
-#endif
+ * Sep 15 2011 In fitsrsect() declare impos and nblin off_t
diff --git a/libwcs/webread.c b/libwcs/webread.c
index 34bef59..b513dd8 100644
--- a/libwcs/webread.c
+++ b/libwcs/webread.c
@@ -1,9 +1,9 @@
/*** File webread.c
- *** October 29, 2010
+ *** September 16, 2011
*** By Doug Mink, dmink at cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
*** (http code from John Roll)
- *** Copyright (C) 2000-2010
+ *** Copyright (C) 2000-2011
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
This library is free software; you can redistribute it and/or
@@ -49,9 +49,15 @@
#include <sys/time.h>
#include <sys/types.h>
+
+/* for MinGW */
+#ifdef MSWIN
+#include <winsock2.h>
+#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
+#endif
/* static int FileINetParse (char *file,int port,struct sockaddr_in *adrinet);*/
static int FileINetParse();
@@ -1036,4 +1042,6 @@ space2tab (tabbuff)
* Sep 25 2009 Free allocated pointers before returning after Douglas Burke
*
* Oct 29 2010 Declare match int in webrnum()
+ *
+ * Sep 16 2011 Add winsock2.h include for MinGW MSWindows C
*/
diff --git a/matchcat.c b/matchcat.c
index 56bfe23..28ce996 100644
--- a/matchcat.c
+++ b/matchcat.c
@@ -1,7 +1,7 @@
/* File matchcat.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -36,7 +36,7 @@ static double matchrad = 5.0; /* Initial match radius is 5 arcseconds */
int version = 0; /* If 1, print only program name and version */
static void usage();
-static char *RevMsg = "MATCHCAT WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "MATCHCAT WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
main (ac, av)
int ac;
diff --git a/matchstar.c b/matchstar.c
index 67b9485..8bb7160 100644
--- a/matchstar.c
+++ b/matchstar.c
@@ -1,6 +1,6 @@
/*** File libwcs/matchstar.c
*** July 20, 2009
- *** By Doug Mink, dmink at cfa.harvard.edu
+ *** By Jessica Mink, jmink at cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
*** Copyright (C) 1996-2009
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
@@ -20,8 +20,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Correspondence concerning WCSTools should be addressed as follows:
- Internet email: dmink at cfa.harvard.edu
- Postal address: Doug Mink
+ Internet email: jmink at cfa.harvard.edu
+ Postal address: Jessica Mink
Smithsonian Astrophysical Observatory
60 Garden St.
Cambridge, MA 02138 USA
diff --git a/revup b/nameup
similarity index 78%
copy from revup
copy to nameup
index 540b9fb..59188ac 100755
--- a/revup
+++ b/nameup
@@ -3,7 +3,7 @@ while test $1
a=$1
b=$1x
mv $a $b
- sed -f revup.sed $b >$a
+ sed -f nameup.sed $b >$a
echo $1 updated
/bin/rm $b
shift
diff --git a/nameup.sed b/nameup.sed
new file mode 100644
index 0000000..0e6260d
--- /dev/null
+++ b/nameup.sed
@@ -0,0 +1 @@
+1,$s/Doug/Jessica/g
diff --git a/nedname.c b/nedname.c
index 25ceb91..46573e3 100644
--- a/nedname.c
+++ b/nedname.c
@@ -1,6 +1,6 @@
/*** nedname.c - Find name of object from its position as command line arguments
*** February 25, 2009
- *** By Doug Mink, after IPAC nearposn.c
+ *** By Jessica Mink, after IPAC nearposn.c
*/
#include <stdlib.h>
@@ -9,7 +9,7 @@
#include "libned/ned_client.h"
#include "libwcs/wcs.h"
-static char *RevMsg = "WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
extern int ned_errno;
static void PrintUsage();
diff --git a/nedpos.c b/nedpos.c
index e73006f..199536a 100644
--- a/nedpos.c
+++ b/nedpos.c
@@ -1,6 +1,6 @@
/*** nedpos.c - search object by its name from command line arguments
*** October 29, 2010
- *** By Doug Mink, after IPAC byname.c
+ *** By Jessica Mink, after IPAC byname.c
*/
#include <stdlib.h>
@@ -10,7 +10,7 @@
#include "libwcs/wcs.h"
#include "libwcs/fitsfile.h"
-static char *RevMsg = "NEDPOS 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "NEDPOS 3.8.5, 12 April 2012, Jessica Mink SAO";
extern int ned_errno;
static void PrintUsage();
diff --git a/newfits.c b/newfits.c
index 2584238..cb19af0 100644
--- a/newfits.c
+++ b/newfits.c
@@ -1,7 +1,7 @@
/* File newfits.c
* May 10, 2006
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -47,7 +47,7 @@ extern void setcdelt();
extern void setproj();
extern struct WorldCoor *GetFITSWCS();
-static char *RevMsg = "NEWFITS WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "NEWFITS WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int verbose = 0; /* verbose/debugging flag */
static int bitpix = 0; /* number of bits per pixel (FITS code, 0=no image) */
static int version = 0; /* If 1, print only program name and version */
diff --git a/remap.c b/remap.c
index 4f14932..c302211 100644
--- a/remap.c
+++ b/remap.c
@@ -1,7 +1,7 @@
/* File remap.c
* October 15, 2010
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1999-2010
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -50,7 +50,7 @@ static char *outname0 = "remap.fits";
static char *outname;
static char *wcsproj; /* WCS projection name */
-static char *RevMsg = "REMAP WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "REMAP WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
static int nfiles = 0;
static int fitsout = 1;
static double secpix = 0;
diff --git a/revup.sed b/revup.sed
index 05a7f46..9f81e55 100644
--- a/revup.sed
+++ b/revup.sed
@@ -1 +1 @@
-1,$s/3\.8\.3, 1 September 2011/3\.8\.4, 1 September 2011/
+1,$s/3\.8\.5, 27 March 2012/3\.8\.5, 12 April 2012/
diff --git a/scat.c b/scat.c
index 060e0c9..e8c6229 100644
--- a/scat.c
+++ b/scat.c
@@ -1,7 +1,7 @@
/* File scat.c
* April 21, 2011
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2011
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -33,7 +33,7 @@
#include "libwcs/fitsfile.h"
#include "libwcs/wcscat.h"
-static char *RevMsg = "WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
static void PrintUsage();
static int scatparm();
diff --git a/sethead.c b/sethead.c
index 85d74f2..950aa52 100644
--- a/sethead.c
+++ b/sethead.c
@@ -1,7 +1,7 @@
/* File sethead.c
* September 1, 2011
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2011
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -66,7 +66,7 @@ static int addwcs = 0;
static int errflag = 0; /* Error return from program */
static char *rootdir=NULL; /* Root directory for input files */
-static char *RevMsg = "SETHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "SETHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/setheadx.c b/setheadx.c
index 462eea9..91ea40b 100644
--- a/setheadx.c
+++ b/setheadx.c
@@ -1,7 +1,7 @@
/* File sethead.c
* August 19, 2009
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2009
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -66,7 +66,7 @@ static int addwcs = 0;
static int errflag = 0; /* Error return from program */
static char *rootdir=NULL; /* Root directory for input files */
-static char *RevMsg = "SETHEAD WCSTools 3.7.8, 17 August 2009, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "SETHEAD WCSTools 3.7.8, 17 August 2009, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/setpix.c b/setpix.c
index 7f3cb24..735154b 100644
--- a/setpix.c
+++ b/setpix.c
@@ -1,7 +1,7 @@
/* File setpix.c
* January 10, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -48,7 +48,7 @@ static int version = 0; /* If 1, print only program name and version */
static int logrange = 1; /* Log pixel change in image header */
static char *pform = NULL; /* Format in which to print pixels */
-static char *RevMsg = "SETPIX WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "SETPIX WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/simpos.c b/simpos.c
index 9e12bfd..a364cf5 100644
--- a/simpos.c
+++ b/simpos.c
@@ -1,6 +1,6 @@
/*** simpos.c - search object by its name from command line arguments
*** March 3, 2009
- *** By Doug Mink, sort of after IPAC byname.c for searching NED
+ *** By Jessica Mink, sort of after IPAC byname.c for searching NED
*/
#include <stdlib.h>
@@ -12,7 +12,7 @@
extern int ned_errno;
static void PrintUsage();
-static char *RevMsg = "SIMPOS 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "SIMPOS 3.8.5, 12 April 2012, Jessica Mink SAO";
int
main (ac, av)
diff --git a/simposx.c b/simposx.c
index 8faed65..cfd4cfa 100644
--- a/simposx.c
+++ b/simposx.c
@@ -1,6 +1,6 @@
/*** simpos.c - search object by its name from command line arguments
*** October 3, 2007
- *** By Doug Mink, sort of after IPAC byname.c
+ *** By Jessica Mink, sort of after IPAC byname.c
*/
#include <stdlib.h>
@@ -12,7 +12,7 @@
extern int ned_errno;
static void PrintUsage();
-static char *RevMsg = "SIMPOS 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "SIMPOS 3.8.5, 12 April 2012, Jessica Mink SAO";
int
main (ac, av)
diff --git a/sky2xy.c b/sky2xy.c
index f5dc2f1..db4de0a 100644
--- a/sky2xy.c
+++ b/sky2xy.c
@@ -1,7 +1,7 @@
/* File sky2xy.c
* September 25, 2009
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2009
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -39,7 +39,7 @@ extern struct WorldCoor *GetWCSFITS (); /* Read WCS from FITS or IRAF file */
extern char *GetFITShead();
static int version = 0; /* If 1, print only program name and version */
-static char *RevMsg = "SKY2XY WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "SKY2XY WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/skycoor.c b/skycoor.c
index 7280442..ef74dd4 100644
--- a/skycoor.c
+++ b/skycoor.c
@@ -1,7 +1,7 @@
/* File skycoor.c
* August 17, 2011
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2011
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -51,7 +51,7 @@ static double decpm = 0.0; /* Declination proper motion in mas/year */
static int epset = 0;
static int inhours = 0;
-static char *RevMsg = "SKYCOOR WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "SKYCOOR WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/sp2char.c b/sp2char.c
index baa851d..9ecbcf8 100644
--- a/sp2char.c
+++ b/sp2char.c
@@ -1,7 +1,7 @@
/* File sp2char.c
* April 3, 2006
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -40,7 +40,7 @@ static int verbose = 0; /* verbose/debugging flag */
static int version = 0; /* If 1, print only program name and version */
static char spchar = '_';
-static char *RevMsg = "SP2CHAR WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "SP2CHAR WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/sph.c b/sph.c
index b8ba23d..cfcb90b 100644
--- a/sph.c
+++ b/sph.c
@@ -224,11 +224,11 @@ double *lng, *lat;
return 0;
}
-/* Dec 20 1999 Doug Mink - Change cosd() and sind() to cosdeg() and sindeg()
- * Dec 20 1999 Doug Mink - Include wcslib.h, which includes wcstrig.h, sph.h
- * Dec 20 1999 Doug Mink - Define copysign only if it is not already defined
+/* Dec 20 1999 Jessica Mink - Change cosd() and sind() to cosdeg() and sindeg()
+ * Dec 20 1999 Jessica Mink - Include wcslib.h, which includes wcstrig.h, sph.h
+ * Dec 20 1999 Jessica Mink - Define copysign only if it is not already defined
*
- * Jan 5 2000 Doug Mink - Drop copysign
+ * Jan 5 2000 Jessica Mink - Drop copysign
*
- * Sep 19 2001 Doug Mink - No change for WCSLIB 2.7
+ * Sep 19 2001 Jessica Mink - No change for WCSLIB 2.7
*/
diff --git a/subpix.c b/subpix.c
index 9fc4c9c..e5d2146 100644
--- a/subpix.c
+++ b/subpix.c
@@ -1,7 +1,7 @@
/* File subpix.c
* June 21, 2006
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -38,7 +38,7 @@ static int newimage = 0;
static int verbose = 0; /* verbose flag */
static int version = 0; /* If 1, print only program name and version */
-static char *RevMsg = "SUBPIX WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "SUBPIX WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/sumpix.c b/sumpix.c
index 72350e0..2d00c64 100644
--- a/sumpix.c
+++ b/sumpix.c
@@ -1,9 +1,9 @@
/* File sumpix.c
- * January 11, 2007
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * February 1, 2012
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
- Copyright (C) 1999-2007
+ Copyright (C) 1999-2012
Smithsonian Astrophysical Observatory, Cambridge, MA USA
This program is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ static void usage();
static void SumPix();
extern double PhotPix();
-static char *RevMsg = "SUMPIX WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "SUMPIX WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
static int verbose = 0; /* verbose/debugging flag */
static int version = 0; /* If 1, print only program name and version */
@@ -136,8 +136,11 @@ char **av;
else if (isnum (*av) || isrange (*av)) {
if (crange == NULL)
crange = *av;
- else
+ else {
rrange = *av;
+ if (fn != NULL)
+ SumPix (fn, crange, rrange);
+ }
}
/* read filename */
@@ -152,8 +155,14 @@ char **av;
SumPix (fn, crange, "0");
else if (rrange)
SumPix (fn, "0", rrange);
- else
- SumPix (fn, "0", "0");
+ else {
+ if (ac > 0) {
+ if (!isnum (*(av+1)) && !isrange (*(av+1)))
+ SumPix (fn, "0", "0");
+ }
+ else
+ SumPix (fn, "0", "0");
+ }
}
}
@@ -522,4 +531,6 @@ char *rrange; /* Row range string */
* Jan 10 2007 Declare RevMsg static, not const
* Jan 10 2007 Include wcs.h
* Jan 11 2007 Add PhotPix to compute circular aperture photometry
+ *
+ * Feb 1 2012 Improve argument parsing so order doesn't matter
*/
diff --git a/testrot.c b/testrot.c
index aff6d12..017156d 100644
--- a/testrot.c
+++ b/testrot.c
@@ -1,7 +1,7 @@
/* File testrot.c
* June 19, 2002
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
*/
#include <stdio.h>
@@ -24,7 +24,7 @@ static int hms = 0; /* 1 for output in hh:mm:ss dd:mm:ss */
static int nf = 0;
static int version = 0; /* If 1, print only program name and version */
-static char *RevMsg = "TESTROT WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "TESTROT WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
main (ac, av)
int ac;
diff --git a/tmcat.c b/tmcat.c
index 180534c..12886d0 100644
--- a/tmcat.c
+++ b/tmcat.c
@@ -1,6 +1,6 @@
/*** File tmcat.c
*** July 1, 2003
- *** By Doug Mink, SAO
+ *** By Jessica Mink, SAO
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/tmcate.c b/tmcate.c
index 9a8de28..017369c 100644
--- a/tmcate.c
+++ b/tmcate.c
@@ -1,6 +1,6 @@
/*** File tmcate.c
*** March 11, 2005
- *** By Doug Mink, SAO
+ *** By Jessica Mink, SAO
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/tmxcat.c b/tmxcat.c
index af079b3..fe88225 100644
--- a/tmxcat.c
+++ b/tmxcat.c
@@ -1,6 +1,6 @@
/*** File tmxcat.c
*** January 9, 2004
- *** By Doug Mink, SAO
+ *** By Jessica Mink, SAO
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/wcshead.c b/wcshead.c
index 17b0a05..ef4709a 100644
--- a/wcshead.c
+++ b/wcshead.c
@@ -1,7 +1,7 @@
/* File wcshead.c
* December 21, 2007
- * By Doug Mink Harvard-Smithsonian Center for Astrophysics)
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink Harvard-Smithsonian Center for Astrophysics)
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1998-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -47,7 +47,7 @@ static int restwave = 0; /* If 1, print first dimension limits */
static int printhead = 1; /* 1 until header has been printed */
static char *rootdir=NULL; /* Root directory for input files */
-static char *RevMsg = "WCSHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink SAO";
+static char *RevMsg = "WCSHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink SAO";
int
main (ac, av)
diff --git a/xy2sky.c b/xy2sky.c
index 4c5c41d..5d9e44c 100644
--- a/xy2sky.c
+++ b/xy2sky.c
@@ -1,7 +1,7 @@
/* File xy2sky.c
* September 22, 2010
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2010
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -49,7 +49,7 @@ static int printhead = 0;
static char printonly = 'n';
static int version = 0; /* If 1, print only program name and version */
-static char *RevMsg = "XY2SKY WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "XY2SKY WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/xy2sky1.c b/xy2sky1.c
index 2aac084..c3c46f5 100644
--- a/xy2sky1.c
+++ b/xy2sky1.c
@@ -1,7 +1,7 @@
/* File xy2sky.c
* July 18, 2007
- * By Doug Mink, Harvard-Smithsonian Center for Astrophysics
- * Send bug reports to dmink at cfa.harvard.edu
+ * By Jessica Mink, Harvard-Smithsonian Center for Astrophysics
+ * Send bug reports to jmink at cfa.harvard.edu
Copyright (C) 1996-2007
Smithsonian Astrophysical Observatory, Cambridge, MA USA
@@ -51,7 +51,7 @@ static int sizeset = 0;
static int scaleset = 0;
static int version = 0; /* If 1, print only program name and version */
-static char *RevMsg = "XY2SKY WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink at cfa.harvard.edu)";
+static char *RevMsg = "XY2SKY WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink at cfa.harvard.edu)";
int
main (ac, av)
diff --git a/yb6cat.c b/yb6cat.c
index 180534c..12886d0 100644
--- a/yb6cat.c
+++ b/yb6cat.c
@@ -1,6 +1,6 @@
/*** File tmcat.c
*** July 1, 2003
- *** By Doug Mink, SAO
+ *** By Jessica Mink, SAO
Copyright (C) 2006
Smithsonian Astrophysical Observatory, Cambridge, MA USA
diff --git a/zgethead b/zgethead
index acb47bb..aa15358 100755
--- a/zgethead
+++ b/zgethead
@@ -2,7 +2,7 @@
# zgethead:
# Get header parameters from compressed FITS files
-# By Doug Mink, November 12, 2008
+# By Jessica Mink, November 12, 2008
if test -z $1
then
diff --git a/zimhead b/zimhead
index 5de5400..31a3590 100755
--- a/zimhead
+++ b/zimhead
@@ -2,7 +2,7 @@
# zimhead:
# Get header from compressed FITS files
-# By Doug Mink, November 24, 2008
+# By Jessica Mink, November 24, 2008
if test -z $1
then
--
Create, display and manipulate the world coordinate system
More information about the debian-science-commits
mailing list